heikkilevanto / beertracker

Simple script to track the beers I drink
GNU General Public License v2.0
2 stars 1 forks source link

Refactor: Collect all data as references to records #322

Open heikkilevanto opened 1 month ago

heikkilevanto commented 1 month ago

Do not collect various hashes and arrays when reading the file. Instead, collect references to the record in various hashes, for example $restaurants{$restauranttype} = $rec That way, we can access not only the restaurant name, but the last time we visited it, and several other details. In time this will make small lists easier to manage.

heikkilevanto commented 3 weeks ago

Or maybe just store the index in @records for the first (or last) entry for each date, and take it from there.

heikkilevanto commented 2 weeks ago

Collecting first- and lastdateindex for each effdate. Using them in plotting the graph. This is the way to go.