Skip to main content

Cooking with Linux : The Ultimate Cooking Box

by Marcel Gagné

This article was first published in the August 2004 issue of Linux Journal.

The Ultimate Cooking Box!
Note : Images have be reduced. Click on an image to see the full size version.

It isn't that strange, mon ami. Every year at this time, we talk about the ultimate Linux box, François. We try to outdo each other in terms of graphics, speed, memory, disk space, and so on. The ultimate is invariably also a question of the latest and greatest. The trouble, I have, François, is that as new as all this hardware extravaganza is, it is all the same thing. Then it occurred to me that if my Linux box could help out in the kitchen, that would be truly something new.

Non, François, you do not have to worry, your job is safe. Besides, this is just the sort of thing that might help make your job easier, mon ami, non?. In fact, I would not be surprised if many of our guests might find that using Linux to help when it comes to cooking, is simply natural. Speaking of guests, I see they have arrived. Welcome, mes amis, to Chez Marcel. Make yourselves comfortable. Your usual tables are ready and François will be back shortly with the wine. Vite, François! Go to the cellar and bring back the 1997 Brunello di Montalcino immédiatement!

While my faithful waiter fetches the wine, I should tell you about today's menu. In honor of this issue's theme of the ultimate Linux box, I've located a few programs to make your Linux box cook. I don't mean screaming performance, mes amis, but cooking with food and wine.

Looking for a way to get my Linux box to help out in the kitchen led me to Krecipes at krecipes.sourceforge.net. Unai Garro, Jason Kivlighn, and Bosselut Cyril have been putting together a nice, open source package that makes creating and maintaining your own list of favorite recipes a breeze. Krecipes lets you create and edit your own recipes as well as import from popular exchange formats like RecipeML, MasterCook, Meal-Master, and others. It saves its own recipes in KreML (Krecipes XML format). You can also maintain categories, track calories (fiber, fat, etc), create shopping lists based on selected meals, and more.

Ah, François, you have returned. Please, pour for our guests.

Krecipes stores its recipes in a database so you need to have either MySQL http://www.mysql.org) or SQLite (which you can find at [cw]http://www.hwaci.com/sw/sqlite/[ecw]) in order to use and compile the software. SQLite is a small program embeddable database that requires somewhat less overhead and administration than MySQL, though not as full featured or powerful. For an application like this, users may find it an attractive choice. The beauty of SQLite is that no database process needs to be running on the system in order to take advantage of SQL database capabilities, storage, and access.

If you have both MySQL and SQLite on your system, support will be compiled for both at build time. Speaking of building, this is a classic case of the extract and build five-step.

tar -xzvf krecipes_alpha_0.4.1.tar.gz
cd krecipes
./configure --prefix=/usr
make
su -c "make install"

On your first time with Krecipes (the program name is krecipes), a wizard will guide you through some basic setup including a choice of database in which to store the information. If you have compiled the program with both MySQL and SQLite, you can choose from either. Since we've already covered many programs that use a MySQL backend in this restaurant, I thought it might be nice to go with SQLite. I made that my choice, and clicked Next.

Once you have made that choice, Krecipes offers to populate the program with some sample recipes. Make sure you click on this check box before continuing with the setup and you'll wind up with a few examples to help familiarize yourself with the software.


[ Figure 1, "Marcel enters the details of his famous Spanish Omelette using Krecipes." ]

To create a new recipe, click File on the menu bar and select new or simply click the new recipe button in the top left hand side of the icon bar. The recipe dialog has three tabs. One is for the recipe basics -- the name, the author, which category it should be filed under (you can create new categories) and how many people the dish serves. See figure 1 for an example. The other two tabs are for the ingredients list and the description. In all cases, you can save your work at any time or return to it later for updates.

If you would rather take advantage of the many thousands of recipes available around the Internet in Meal-Master and RecipeML format, it's very easy to import these as well. All this talk of food, mes amis, just reinforces the importance of a well-stocked wine cellar. François, I see a lot of nearly empty wine glasses. If you would be so kind as to refill them.

Another great recipe manager you may want to investigate is Douglas Squirrel's LargoRecipes. LargoRecipes (named after the author's dog) lets you manage recipes, share them with friends (via web pages), create shopping lists, meal plans, and more. You can also import Meal-Master and RecipeML format recipes. Have a look at figure two for a sample of LargoRecipes in action.


[ Figure 2, "Dishing up some huevos rancheros with LargoRecipes" ]

To install Largo Recipes, you will need at least a 1.4 version of Java. That should pretty much tell you that there is no compiling involved in the installation. Download and save two files from the Largo website. The first is the largorecipes distribution (I'll get to the second file shortly). At the time of this writing, version 0.9.2.1 was available. To install the package, save the bundle to a directory of your choice (I created a Largo directory in my home directory) and execute the following command.

cd ~/Largo
java -jar largorecipes-0.9.2.1.jar

That is also the command you will use to run it on subsequent uses. On your first run, an installation dialog will appear. All of the supporting data files and directories will be created from where you run the installation. One of those directories will be called demo. This is where you will save the second file you download, the LargoRecipes demo file. It is also available from the LargoRecipes website's download page.

To activate the sample recipes (for the session only), click LargoRecipes on the menu bar and select Demonstration. If you would rather skip this and start importing recipes, consider checking out the LargoRecipes RecipeML archive. There are 10,000 recipes in zipped bundles available on the site (look for the link on the main page).

To share your recipes with others, LargoRecipes provides a web page export function. Click Internet on the menu bar and select Web Page. A list of available recipes will appear in the right hand window. Select the ones you want, the press Add to add them to the export list. When you have made all your choices, choose a title for the page but don't click "Go" yet. You should see a check box labeled "Include XML Download". Make sure that is checked on and a link will be provided on each recipe's page so that visitors to your site will be able to download RecipeML format copies of the recipes. They can then import those into their favorite recipe system.

For those of you who are curious, check out the resources section for a link to the RecipeML format specification. It's always good to know how these things work, non? I've also provided a link to the Meal-Master website. There are plenty of links there from which you will find a huge number of recipes ready for import into your favorite package.

Mon Dieu, mes amis, closing time has arrived and all I have done is make you more hungry. Perhaps François will be kind enough to refill our guests' glasses a final time. In the meantime, I shall bring out my famous baked double-butter brie with spicy mixed-berry coulis. With all these tempting tastes loaded on our Linux systems, appetizers are certainly in order. Until next time, mes amis, let us all drink to one another's health.

A votre santé! Bon appétit!

Resources

Krecipes
http://krecipes.sourceforge.net

LargoRecipes
http://largorecipes.sourceforge.net

Meal-Master website
http://home.comcast.net/~episoft/reclink.htm

RecipeML format specification
http://www.formatdata.com/recipeml/

SQLite
http://www.hwaci.com/sw/sqlite/

Marcel's Web site (check out the wine page)
http://www.marcelgagne.com/

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.