NOTICE

This version of Food Log is not the latest version. Please see the Food Log info page here for the newest version.

Food Log User's Manual

Food Log is an Android app to help keep track of what you eat. You make "entries" in the log every time you eat or drink. Each entry contains the date and time and (optionally) which foods you ate. You can attach notes to the entries if you require.

If you want to keep track of your calories you can enter the calories per serving for each food. Food Log will calculate the calories for each entry by looking at the calories for each food in the entry and the number of servings for the foods.

You can even enter the ingredients for each food and use the notes section to store the recipe for making the food.

How detailed you want to get is up to you. It is not required to enter calories or ingredients for foods, or even to enter foods for the entries. Obviously, some of the functions of the app will not work if don't enter the required information. For example, if you don't enter ingredients for foods you won't be able to search for entries or foods by ingredient.

The screenshots in this document were taken from an Android tablet running Android 4.4.2 (KitKat). They might be slightly different than what you see when running the app on your device but the controls should work similarly. One difference may be that this tablet has a hardware menu button whereas most newer devices don't have menu buttons. Devices without a menu button will have a menu icon on the action bar:

Menu button on action bar
Menu button on action bar.

Devices with a menu button will not have this icon.

Credits

This app uses the Caldroid widget from github. See this link for Caldroid copyrights and licenses.

This app uses the OpenCSV library from sourceforge. See this link for the OpenCSV license.

Icons and app store graphics were made with clip art from openclipart.org. Specifically the following images were used:
Pencil, Notebook, White plate, Restaurant

Contents

Main Screen

When the app is launched it will take you to the main screen.

Main Screen
Main Screen.
At the top right of the action bar, the ? Help button will set this screen in Help Mode. The New Entry button lets you create a new log entry which records what foods you had and when you had them. The Calendar button shows a calendar with all your log entries. The Foods button lets you enter new foods into the Food Log database or search for existing foods in the database. You can edit a food to add details such as the calories per serving or ingredients it contains. With the Search button you can find entries in the log based on a date range, notes, foods or ingredients. The Settings button allows you to adjust your daily calorie limits.

When you press one of the above buttons you will be shown an advertisement. You will only be shown one advertisement each time you run the app. Usually this will happen the first time you press one of the buttons, but not always. You can usually dismiss the advertisement by pressing the device's back button. For some ads the back button may not work but the ad itself will have a way to close it and go back to the Food Log app, such as a button with an "X" or "Close" on it. Once you dismiss the ad the screen for the button you pressed will be shown.

In addition to those buttons you can press the menu button (either on the screen or the menu button on the device) for more options.

Options menu on the main screen
Options menu on the main screen.

The Export CSV option writes out the entire Food Log database of entries, foods and ingredients into a CSV file called "foodlog.csv" in the main storage area of your device. CSV stands for "comma separated values"; these types of files can be viewed by many programs such as Excel, Open / Libre Office, and many others. The format of the foodlog.csv file is described in the CSV Format section.

Besides viewing the database, another reason to export the database into a CSV file is to have a backup of the database which you can restore later. The Import CSV option lets you restore the database from the "foodlog.csv" file. Note that the database will be completely erased and rebuilt from the data in the CSV file, which means any additions or changes you have made since the CSV file was created will be lost.

If you do export the database be aware that if you uninstall the Food Log app from your device, the "foodlog.csv" file will not be erased automatically. You must remove that yourself.

The About menu option displays some information about Food Log.

Exit from the app by pressing the device's Back button from the main screen.

Entry Editor

An Entry in the log records the date and time you ate or drank along with the foods you had. Create new entries or edit existing entries with the Entry Editor. The Entry Editor screen looks like this:
Entry Editor
Entry Editor.

To change the entry's date press the button displaying the date (A). Similarly, change the entry's time by pressing button showing the time (B). If you want to enter any notes about this specific entry put them in the text box (C). You can look up this entry later using words in your notes (See Search). The calorie counter (D) is calculated automatically from the foods you enter; you cannot edit this field.

The second part of the screen (E) is for entering the foods you had. Each row is divided into 3 sections - the name of the food or drink, the number of servings you had, and any notes you want to record for that food. These notes are different from the food's general notes that you can enter into the food editor - these notes are just for this entry. At the very right is a red "X" (F) - press that to remove the food from the entry.

If you are editing an existing entry instead of creating a brand new entry, the foods for the entry will be shown (G). You cannot change the names of these foods, you can only change the number of servings and notes, or you can delete the food.

To add a new food to the entry press the Add Food button (H). You will get new blank row where you can enter the food name, servings and notes (I).

If you want to enter a food's details like calories and ingredients you can do it directly from the Entry Editor by long-pressing the name of the food. This will take you to the Food Editor. You can also update food details by going to the Food Search screen and looking up the food to edit it.

To save the changes you made to the entry and exit from the Entry Editor press the Save & Exit button (J). You can also return to the previous screen by pressing the Back button on your device. If you have made changes to the entry you will get a chance to save them.

Calendar

The calendar screen shows your entries in a calendar format. If you have set your daily calorie limits (see Settings) the days will be color coded according to the number of calories consumed each day - green if under your normal calorie limit, yellow if over your normal limit and under your high limit, and red if over your high limit. If you have not set any calorie limits, any day with entries are colored green. Any day without entries will be white.

Calendar screen
Calendar screen.

You can navigate through the calendar by swiping the calendar left or right or pressing the left or right red arrows at the top (A).

From the calendar screen you can look at entries for any date. Touch a date and the entries for that date will show in the bottom part of the screen (or the right part of the screen when in landscape orientation).

Entries for a single day
Entries for a single day.
Entries for a single day (landscape mode)
Entries for a single day in landscape mode.

The times for the entries are shown (A) along with any notes for the entries (B). To edit an entry touch the entry's time (A). That will take you to the Entry Editor to change the entry.

To create a new entry for the date press the New Entry button at the bottom (C). That will take you to the Entry Editor with the date set to the selected date and the time set to noon. You can adjust the time within the editor.

To delete an entry press the red "X" at the right (D). To delete all old entries prior to a certain date, touch the date on the calendar, then press the menu button on your device (or the menu button on the action bar) and choose the Bulk Delete option.

Bulk delete menu item
Bulk delete menu item.

If you touch a date in the calendar without any entries (a white colored square), Food Log assumes you want to create a new entry for that date and takes you directly to the Entry Editor.

Foods

The Foods screen allows you to add new foods to the Food Log database or search the database for existing foods.

Foods menu
Foods menu.

The Search Foods button will bring up the Food Search screen. The Add Food button will bring up the Food Editor to create a new food in the database.

Food Search

In the food search screen you can look up the foods in the Food Log database by the food's name, an ingredient name that is contained in the food, or a word or phrase in the notes attached to a food or ingredient.

Food search screen
Food search screen.

Press the (A) radio button to look up foods by name, or press the (B) radio button to look up foods by ingredient name. Then enter the food or ingredient name in the text field (D). The name can be a whole name or part of a name. Case doesn't matter as all foods and ingredients are converted internally to lower case.

To search by notes attached to the food or ingredient press the (C) radio button. Then enter the word or phrase to search for in the text field (D). Use lower case for the words to search for and use upper case for operators like OR: e.g. bake OR fry. See the Search by Notes section for more examples of the kinds of searches you can do.

When you have entered the search terms into text field (D) press the search button (E). The search results will show up below the text field.

Food search screen with results
Food search screen with results.

Touching the name of a food from the results will bring up that food in the Food Editor. Note that you must touch the name of food, otherwise the touch might not register. This is especially true when the food contains a long note attached to it.

To delete a food touch the red "X" at the right of the food. If a food you want to delete is used in any entries you are not allowed to delete it, you will just get an informational dialog saying how many entries have that food in them.

Go back to the Foods screen by pressing the Back button on your device.

Food Editor

In the Food Editor you can create new foods or edit the details of existing foods.

Food editor
Food editor.

The Food Editor works much like the Entry Editor. At the top is a text field for the name of the food (A). You don't need to capitalize names of foods or ingredients since all food and ingredient names are converted to lower case in the database. If you enter the name of a food that is already in the database you will be given the option to edit that food.

Enter any notes for the food in the text field (B). Notes are optional but if you enter notes they can be used to look up the food or entries that have this food. Enter the calories per serving in the text field (C). Calories are also optional - if you do not count calories then you can leave this as 0.

The second part of the screen is for the ingredients contained in the food. Each row is divided into two sections, the ingredient name (D) and any notes about how this ingredient is used in this food (E). You do not have to enter ingredients for foods or enter notes for ingredients, but if you do they can be used to look up the food or entries that have this ingredient.

At the right of each row is a red "X" (F) - press this to remove the ingredient from this food. Press the Add Ingredient button (G) to add a new ingredient row to this food.

When editing an existing food, you cannot change the names of any ingredients already associated with that food. You can change the notes for those ingredients or you can remove them by pressing the red "X". You can add new ingredients to existing foods too.

To save your changes and return to the previous screen press the Save & Exit button (H). You can also return to the previous screen by pressing the Back button on your device. If you have made changes you will get a chance to save them or abandon them.

Search

The search screen allows you to search for entries by date, notes, foods or ingredients.

Search screen
Search screen.

Search by Date Range

To search by dates press the "Search by date range" checkbox (A), then press the Start Date button (B). This will bring up a window to select a date.

Selecting a date
Selecting a date.

After selecting the date press the Set button; both the starting and ending dates will be set to the selected date. If you want to change the ending date press the lower button (C) and select another date. Food Log will search for all entries after the starting date's 12AM up to the ending date's 11:59PM when you press the Search button.

Search by Notes

To search by notes press the (D) checkbox and enter the word or phrase for which to search in the text field below (E). Use lower case for the words you want to search for and upper case for operators like OR (see examples below). All the notes will be searched - entry notes, food notes and ingredient notes.

As an example of how searching by notes works, let's look at an entry and its associated foods.

Example Entry
Example Entry.
First Example Food
First Example Food.
Second Example Food
Second Example Food.

The notes of this entry and the foods will be used to illustrate the various ways you can search for notes.

The simplest search you can do is to just enter one word. Each of the notes sections of the entry and the foods used in the entry will be searched for that word. Example: lunch will match for this entry since the entry's notes begins with the word "Lunch" (case does not matter).

If you enter multiple words, each word must appear in the same notes section. For example, bob cafeteria will match this entry because both words appear in the entry's notes section. The words lunch butter will not match this entry because the word "Lunch" appears in the entry's notes section and the word "butter" appears in different notes sections - in the entry notes for the Bread Roll and in the notes for the food Tomato Soup.

It is possible to search for words beginning with a prefix without giving a specific word by putting a "*" at the end of the search term. Example: this entry will match a search for trans* because the word "translucent" appears in the Tomato Soup food's notes. You can use a prefix anywhere you would use a full word.

You can search for a phrase by putting words inside double quotes. This differs from just entering multiple words by requiring the words occur in order and without any intervening words in between them. Example: "bob cafeteria" would not match this entry because though both words appear in the entry's notes section there are more words between them. The phrase "golden dinner" does match this entry because those two words occur in order in the Bread Roll food's notes.

You can combine most of the search types above with the set operators AND, OR and NOT. The AND operator is implicit when you enter multiple search terms, you don't need to write it out. Example: in the search terms lunch carol bob it is implied that the app should search for notes containing "lunch" AND "carol" AND "bob".

The OR operator works as you would expect - it searches the notes sections for one of many possibilities. You need to write out the OR operator explicitly, in uppercase. For example: breakfast OR lunch will match this entry because though it does not have the word "breakfast" in any of its notes sections it does have "Lunch". Another example: grate OR chop* will not select this entry because the word "grate" nor any word beginning with "chop" appears in any notes section.

The NOT operator is used to select notes that contain some words but not others. It is written as a "-" preceding a word or prefix. (It does not work on phrases.) Example: -bob carol will search for notes containing "carol" but not "bob". This search will match this entry because of the entry's notes for the food Tomato Soup - "had half of Carol's too". Another example: bob -carol will not match this entry because there are no notes containing "bob" without "carol". Incidentally, you cannot do a search for only negative terms; a search for -breakfast -dinner is illegal and will not match any entries. You must supply a word, prefix or phrase to search for along with the negative term(s): "at cafeteria" -breakfast -lunch (this is legal but will not select this entry because the note containing the phrase "at cafeteria" also contains "Lunch").

It is possible to combine operators too. The precedence of operators is NOT first, then OR then AND. For example: -grate chop OR dice onion searches for notes not containing the word "grate", and containing the either of the words "chop" or "dice", and with the word "onion" (which matches this entry's Tomato Soup's notes).

Search by Foods or Ingredients

To search by food or ingredient press the (F) checkbox and then press the the Add Food/Ingrd. button (G) to add a text field where you can enter the name of a food or ingredient. Unlike in the food search screen, here the name must be the full name, it cannot be a partial name. Case does not matter.

If you enter more than one food / ingredient to search for, each one can match either a food name or an ingredient name. This is different from versions of Food Log prior to 1.1 where all had to match either foods or ingredients.

You can combine search options. For example you could search for entries within a date range containing a certain food.

You can view the search results in the calendar or as a list. Choose how you want the results displayed by clicking the (H) or (I) radio buttons. Then press the Search button at the bottom to start your search and see the results.

Search Results in Calendar

The calendar showing search results works basically the same as when showing all entries (see Calendar).

Showing search
results in calendar
Showing search results in calendar.

When showing search results the very top will show what the search criteria were, how many matches were found and the date range in which the matches occurred (A).

Dates with matching entries are colored violet. Press on a date to see the list of matching entries for that date. Touch an entry's time (C) to view or edit the entry's details in the Entry Editor. Delete an entry by touching the red "X" (D) at the right of the entry.

When displaying search results in the calendar, calorie counts and the New Entry button are not displayed. Also, dates outside the matching date range are not selectable (shown grayed out (B)).

Search Results in List

The other way to show search results is in a list.

Showing search
results in a list
Showing search results in a list.

The top line (A) shows what the search criteria were and the second line shows how many matches were found. Touch the entry's time (B) to view or edit the entry's details in the Entry Editor. Delete an entry by touching the red "X" at the right of the entry (C).

Settings

In the settings screen you can set your calorie limits.

Settings
Settings.

Touch the "Normal Calorie Limit" or "High Calorie Limit" rows to set each one respectively. They are initially set to 0, and you can leave them like that if you do not want Food Log to color code your calendar dates. Alternatively, you can set only the "Normal Calorie Limit" and leave the "High Calorie Limit" at 0. In that case the calendar will show days over the normal calorie limit in yellow and ones under the limit in green.

Help Mode

In almost every Food Log screen, at the top right of the action bar is the ? Help button. This may show as just a ? on smaller devices. Pressing this will make the current screen go into Help Mode. In this mode, pressing any of the on-screen controls like buttons, text entry fields, checkboxes, etc. will show a message describing what that control does. Here is a message describing the New Entry button of the Main screen.

Help Mode window
for New Entry button
Help Mode window for New Entry button.

You have the option to get more information about that screen by pressing the More Help... button. That will open a browser to this web page and jump to the section describing the screen.

To get out of Help Mode and go back to using the app normally press the ? button again.

CSV Format

Food Log can export its database to a CSV format file. You can access this option from the main screen by pressing your device's menu button or pressing the menu icon on the action bar. The CSV file will be named "foodlog.csv" in your main files directory. This section of the manual describes the format that Food Log uses to write its database to the CSV file.

The general format of CSV files are described in many places on the web such as this article from Wikipedia. This is a description of the Food Log data that is in the exported file.

Here is some sample data from a Food Log CSV file:

"FormatVersion","3.2"
"Time zone","America/Denver"
"Created","7/7/16 5:55 PM"
""
"Food","Calories","AutoAdd","Notes","Ingredient","Ingrd. Notes"
"bacon","400","no","a serving is 4 strips"
""
"banana avocado pudding","250","no","From www.vibrantvegan.com
Place ingredients in blender, blend until smooth.  Pour into bowl or cup."
"banana avocado pudding","","","","avocado","one-half"
"banana avocado pudding","","","","bananas","1-2"
"banana avocado pudding","","","","cocoa","1-2 teaspoons (optional)"
"banana avocado pudding","","","","vanilla","half teaspoon (optional)"
""
"breadsticks","0","yes",
""
""
"Date Time","Notes","Calories","Food","Servings","Food Notes"
"1/31/16 12:00 PM","","0"
""
"2/1/16 9:00 AM","","720"
"2/1/16 9:00 AM","","","bacon","1.0",""
"2/1/16 9:00 AM","","","eggs","1.0",""
"2/1/16 9:00 AM","","","toast","1.0",""
"2/1/16 9:00 AM","","","orange juice","1.0",""
""

At the beginning of the file is the FormatVersion line which assigns a number to the format of the CSV file and the database. Versions of Food Log prior to 1.1 did not have this line.

The next line gives the time zone in which all dates and times in the CSV file are stored. The time zone used by Food Log is the time zone of the Android device.

Following that is the creation date and time of the CSV file.

After that comes a blank line (empty quotes "") and then the food section. All the foods in Food Log's database will be listed in this section in alphabetical order. The first line gives the headers for each column of the food section. The columns are mostly self-explanatory except AutoAdd - this will be "yes" if this food was added to the database automatically and has not been modified since it was added. This happens when you add a food to an entry that is not already in the database. If you edit a food that was automatically added, for example to set the calories per serving or add ingredients and save it, it is no longer considered to be automatically added and the AutoAdd column will be "no". (Food Log versions prior to 1.1 did not have the AutoAdd column in the CSV file.)

For each food, the first line of data gives only the food name, calories, auto-add and notes values. If ingredients were entered into the database for this food then they will be listed in subsequent lines, giving the food name, ingredient name and ingredient notes (the calories, auto-add and notes columns will be empty for these lines). The end of the food's data is indicated by a blank line.

The end of the food section is indicated with another blank line.

Then the Entries section begins. All Entries in the database will be listed here in chronological order. The first line of this section gives the column headers. Then, for each entry the first line of data gives the date + time, entry notes and the total calories for the entry. If the entry has foods they are listed in subsequent lines giving the date + time, food name, number of servings and food notes (the entry notes and calories columns are empty in these lines). A blank line signals the end of data for that entry. The Entries section continues to the end of the file.


© Yasantha Samarasekera 2017
$Id: fe38d559440300553dce70be1abcfc6ea788fabe 2017-12-12 11:58:13 -0700 $