Sustenance - A simple TOML-based calorie tracker

Prehab/rehab. Recovery optimization and nutrition. Boring, but a necessary evil for those who are willing to dive in the deepest depths of hell to become legend.
User avatar
atweiden
Posts: 7
Joined: Fri Aug 02, 2019 8:23 am

Sustenance - A simple TOML-based calorie tracker

Post by atweiden » Mon Aug 19, 2019 9:41 pm

Sustenance is a simple TOML-based calorie tracker. You can use it daily to count total calories, as well as your protein, carbs and fat intake.

With Sustenance, you can easily simulate what you plan to eat for the rest of your day, and then see what it adds up to in terms of cals/protein/carbs/fat. If the results of your experimentation are in line with your caloric goals, good; if not, keep experimenting.

Here's what Sustenance looks like in use:

Image

In this picture, you can see today I've eaten 1448 calories, 138g of carbs, 50g fat, and 100g of protein.

Here's what some food looks like:

Image

In the above picture, you can see that if I were to create a meal with:

Code: Select all

[[meal]]
date = 2019-08-19
time = 12:00:00

  [[meal.portion]]
  food = 'apple'
  servings = 2
I'd be eating two apples and getting roughly 150 calories, and 40g of carbs, from it.

Here's what a meal entry looks like:

Image

One of my all-time favorite meals is cheese and dates. For this meal, I had 120g of Comté, and a packet of dates.

To use Sustenance on your computer, you need to create one TOML file. I'm calling this file sustenance.toml in this example, but you can use anything you want. All you have to do is fill out this TOML file with the foods you're eating. Then whenever you eat a meal, write it down also in this TOML file. Run

Code: Select all

sustenance --date=2019-08-19 gen-macros /path/to/sustenance.toml
and it'll show you your macros for the day, like in the picture.

You may like Sustenance if:
  • You don't want to rely on a web browser or an internet connection to calculate your macros. With Sustenance, you do it all on the cmdline, no internet connection required.
  • You prefer using text files on your computer along with your favorite text editor to keep track of what you eat. With Sustenance, the meal log is written in TOML, and you can use any $EDITOR you want.
  • You don't mind sifting through the raw text output your macros are displayed in. Sustenance is kept super basic, no graphs, no pretty pictures.
Let me know if you're interested in using it, and I'll try and help you out with installation. Basically, install Rakudo Star on your computer, and then do:

Code: Select all

zef install Sustenance

magnat,
Posts: 67
Joined: Wed Jul 03, 2019 8:47 pm

Re: Sustenance - A simple TOML-based calorie tracker

Post by magnat, » Wed Aug 21, 2019 1:31 pm

why someone shoulds use that if in 2019y we have bunch of better programs count more stuffs , u even needn't know as many calories has X producnt , becuase they will tell u for example to using online Cronometer ? or to using offline MyFitnessPal ? i think ur program 'd be good but in 1950y ;DDD then u 'd get all the marked ;DDD but right now its senseless (just my subjective opinion)

User avatar
Vagabond
Site Admin
Posts: 759
Joined: Sun Nov 18, 2018 3:17 am

Re: Sustenance - A simple TOML-based calorie tracker

Post by Vagabond » Sat Aug 31, 2019 3:00 pm

Magnat, you are simply not the intended user type for Sustenance, that's all. This type of project is intended for people who love using computers and who prefer to use command lines for most things. Maybe their computer is sparse on resources. Maybe it's a matter of preference. Thing is, I don't know of command line programs for making food diaries. Now there's one, with at least one user for it.

Andy, maybe you could see if there's a way to add it to some repos? I'm sure some Linux enthusiasts would like to have a program like that.