Saturday, May 29, 2010

Control the calories you eat with Cron-o-meter

After playing around with some on-line calorie counter sites, specially this one, I decided a local software would fit my needs best, rather than going on-line every time I needed to check-in my meals.
After some searching I stumbled upon cron-o-meter. It's an open source JAVA program so I can run it both in my Ubuntu Lucid Lynx and Windows XP installs.
I have two disk partitions in my computer, so I needed to do some tweaking to make it work.

Here's how:
  1. download the windows installer and install as usual
  2. set up the a user profile following the software instruction. This creates a "cronometer" folder on the local applications settings folder. We'll use this folder from the linux install to share the profile data.
  3. download the zip file from sourceforge and unzip, this is the generic version, works on linux or mac-os
  4. create a cronometer.sh script with this contents:

    #!/bin/sh

    # INSTRUCTIONS
    # 1) Install Java 1.5 or later for Linux (http://java.com/download/)
    # 2) Download Mac OS X Version and Unzip in desired location
    # 3) Place this launcher script next to the application bundle
    # 4) Execute script to launch CRON-o-Meter

    cd "CRONoMeter.app/Contents/Resources/Java/"
    java -cp cronometer.jar:jcommon-1.0.10.jar:jfreechart-1.0.6.jar:swingx-0.9.3.jar:cronometer.jar:usda_sr22.jar:crdb_004.jar:docs.jar ca.spaz.cron.CRONOMETER


  5. before running the program create a simbolic link to the windows folder

    ln -s /media/HDC-SYSTEM/Documents\ and\ Settings/austin-user/Application\ Data/cronometer .cronometer

    If you already ran cron-o-meter once, delete the ~/.cronometer directory before running the ln command above.

  6. Run the application using the cronometer.sh script. It will launch the application and any custom foods or entries you create on both sides will get synchronized automatically.

No comments: