Diet Tracker
Version 1.7.1 released on 14-Feb-08. It is a bug release
About
Diet Tracker is a set of Perl codes to help you keep track of your diet progress. It uses a MySQL database to store and display your daily weight variations and calorie intake as you progress in your diet.
This software was inspired by Jeremy Zawodny's Excel spreadsheet that does a lot of the same thing. Srijith wanted an online version that was simple and intended for a single user. Not finding any, he wrote the first version of Diet Tracker. Kyle Farnung helped add new functionalities into the 1.5 release of the code.
Features
Online, accessible 24h/day
Tracks calorie intake per day
Graphs to track weight and intake history
Moving average calculation to even out jitters
Automatic BMI calculation
Autocomplete feature for food items entered earlier
Ajax based inline edit of entered values (weight, intake etc.)
Clean interface
Screenshots
There is nothing much to see other than the front page, the details of calorie intake and the weight variation. Please find below screenshots of these three views. Click on the images to get a bigger image.
There are three views of Diet Tracker
Main Screen
This gives a crisp summary of your current status with graphs and forms to enter new values
Calorie intake history
History and graph of calories consumed per day. The details are expandable/collapsible.
Weight history
History and graph of weight variation.
Download
Diet Tracker v 1.7.1
Copyright © 2006-2008 Srijith K. Nair, Kyle Farnung
Release date: 14-Feb-2007 (version 1.7.1)
License - GNU General Public License (GPL)
Requirements
You will need the following Perl modules
CGI
GD::Graph::lines
Config::Simple
Time::localtime
Math::Business::SMA
In addition, you will need a web server that can execute Perl files as well as a MySQL database to hold the data.
Installation
- Create a MySQL database
- If this is a new install, copy config.pl.dist to config.pl and edit to suit your needs
- chmod 666 config.pl (so that it can be edited online)
- Read the 'Note' below and initialise the database with the SQL schema in mysql.txt
- chmod 755 all .pl files, except config.pl (read above)
- If your server is configured to execute .cgi files instead of .pl
- rename all .pl files, except config.pl, to .cgi
- edit all files in tmpl/ directory to reference the new .cgi files intead of .pl
Note - The MySQL initialisation schema provided uses the table prefix of 'dt_'. If you want a different prefix, you will have to manually edit the mysql.txt file and make the changes. Then edit the option 'dbprefix' in config.pl to reflect your preferred value.
Upgrading from 1.7 to 1.7.1
Either
Or
- Download the 1.7.1 release and follow steps given for 'Upgrading from 1.5 to 1.7'
Upgrading from 1.5 to 1.7
- Backup current config.pl file (eg: mkdir backup; mv dt/config.pl backup/)
- Delete all files from old install
- Upload the new files into the installation directory
- Copy config.pl.dist to config.pl
- Consult the backedup config.pl to set values in the new config.pl file
- Note and edit the other new configuration variables introduced in this release - days_per_page, daily_clr, avg_clr
Upgrading from 1.0 to 1.5
- Backup the current config.pl file
- Overwrite all the existing files with the new files
- Copy config.pl.dist to config.pl
- Edit config.pl to old values.
- Ensure that value for 'dbprefix' is not set.
- Note and edit the other new configuration variables introduced in this release - dbserver, en_autosuggest, target_weight
Follow the Installation instructions above.
Bugs
None yet, though limitations do exist.
Limitations
- There is no user management (login, multiple users etc.). It is suggested that the installation be hidden behind Apache's htaccess protection.
Changelog
- Version 1.7.1 on 14-Feb-2008
- Corrected bug in intake template
- Corrected wrong weight difference indicator for 0 diff
- Version 1.7 on 08-Feb-2008
- Ajaxified inline edit for intake items (name, calorie)
- Ajaxified inline edit for weight
- Ability to delete weight entries
- Ability to edit config file online
- Display current day's intake details on front page
- Help links to figure out not-too-obvious features (like inline edit)
- Ability to specify color of graph lines
- Ability to sets number of days to display in each page
- Version 1.5 on 27-Jul-2007
- History based autocomplete functionality to the intake form field
- Optimized and secured SQL queries
- Added/Updated javascript (JQuery)
- Added error checking to user entries
- Added more statistics to the main page
- Support for non-local MySQL server (dbserver in config)
- Support for table prefix (dbprefix in config)
- Uses last entered weight for BMI calculation instead of displaying 'not defined'
- Removed need for HTML::Template Perl module to be installed. Needed files distributed along with the Diet Tracker code.
- Removed dependency on frames
- Cleaned up XHTML and CSS to remove layout tables
- Validated XHTML and CSS
- Added icons to clarify actions
- Version 1.0 on 09-Oct-2006