Sample Food Vault for Tracking Consumed Nutrition Values

Some irrelevant comments

A Done is A Done. As long as it’s functional I am fine with how nasty the codes are…

  • Initially I do not intend to use Obsidian as a food consumption record app, since Excel exists and the idea of All-in-One just makes the vault complex. This complexity is the main reason why I archived my first vault and started a second one.
  • Later I found the mobile app that I used for food recording before had an unacceptable amount of ads and pop-ups, besides editing Excel files on phones seems… pathetic. Plus there is no way for me to bring my laptop near the food preparing area, so here I am.
  • There will be some loss in the calculation due to how I Round these values. Nutrition Values are just some estimation. The most important part is to Keep Calm and Take Care Ourselves :smile:

Download

How does the vault work

  1. Manually input one ingredients and its nutrition values (NV) per markdown file. These values will be processed to NV/gram and be stored in property. This includes Calorie(kJ), Protein, Fat, Carbohydrates and Sodium. Preset amount is also needed for easier input, like 125g/box of blueberries.
  2. Retreive Those Values using Templater, put them in different locations and ask Dataview to calculate and sum the values, as for how i did that… please download the vault because I myself also do not know how to explain the code.
  3. If it’s daily note, store the net weight of food and netValue of those 5 NVs mentioned above as properties. I do not feel like tracking them at the moment though, i made this because i wanted to see if i could achieve this

  • Thanks holroy for providing all kinds of dataviewjs answers on this forum!
  • Thanks GPT for helping me understand javascript and troubleshooting codes.
  • Hope you find this somewhat useful. I am happy if some of the part in this vault helps you!
1 Like

Nice idea. Thanks.

I really need this, but I would be unable to create it myself.
Thank you so much for sharing this!
Your instructions are great too!
:grinning:

Seems like a great system! I recently built something similar but that uses AI to calculate calories. Might not be as precise but it’s super quick and convenient. It uses the dataview, tracker, and FIle Organizer 2000 plugins. I explain how everything works in this video if you’re curious: https://www.youtube.com/watch?v=VkBy4SDrBCI

1 Like

Awesome!
I’m checking it out now!