lee-dohm / meal-tracker

A command-line tool for doing meal tracking

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Meal Tracker

Build Status

A command-line tool for doing meal tracking.

Research shows that meal tracking is the absolute best thing you can do to lose weight. A 2008 study showed that the simple act of recording what you eat helps keep one mindful of your eating habits, making changing them easier:

Keeping a food diary doesn't have to be a formal thing. Just the act of scribbling down what you eat on a Post-It note, sending yourself e-mails tallying each meal, or sending yourself a text message will suffice. It's the process of reflecting on what you eat that helps us become aware of our habits, and hopefully change our behavior ...

-- Keith Bachman, MD

The more food records people kept, the more weight they lost ...

-- Jack Hollis, PhD, lead author of the study

Installation

If you already have Elixir installed, the current released version can be installed locally without cloning the repository using:

mix escript.install github lee-dohm/meal-tracker v0.2.0

If you want the latest development version, leave off the version tag.

Use

Adding an item to your daily log

Once the tool is built and placed somewhere on your PATH, execute the following to add a single item to your log:

track add [food]

Where food follows one of the following patterns:

  • Ceasar Salad
  • 3x Apple
  • 355 milliliter Pepsi

The new food item will be added to your log at ~/meal-tracker/[date].md. Your log will look something like this:

# 2019-07-21

* 10 ounce Rib Eye Steak

Printing today's information

Print today's log with:

track status

Other commands

You can get the list of commands with:

track help

Configuration

Configuration of the Meal Tracker app is stored in ~/.meal-tracker. The following values are supported:

  • root The directory where the Meal Tracker data will be stored, default: ~/meal-tracker

Common Tasks

This project follows the GitHub "scripts to rule them all" pattern. The contents of the scripts directory are scripts that cover all common tasks:

  • script/bootstrap — Performs first-time project setup (beyond installing the Elixir environment)
  • script/build — Builds the project
  • script/test — Runs automated tests
  • script/clean — Deletes all generated files
  • script/console — Start the REPL for the project with appropriate libraries already loaded
  • script/doc — Generate and open the developer documentation for the project
  • script/install — Installs the executable on the system PATH

Acknowledgements

This tool is heavily influenced by todo.txt by Gina Trapani. Many thanks for reaffirming the power of plain text with such a great tool and awesome ideas!

License

MIT

About

A command-line tool for doing meal tracking

License:MIT License


Languages

Language:Elixir 89.1%Language:Shell 10.9%Language:Ruby 0.0%