Cooking with Linux - The Ultimate Cooking Box

by Marcel Gagné

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 one another in terms of graphics, speed, memory, disk space and so on. The ultimate, invariably, is 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 truly would be something new.

Non, François, you do not have to worry, your job is safe. Besides, this is exactly the sort of thing that might help make your job easier. In fact, I would not be surprised if many of our guests 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. 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 (see the on-line Resources section). 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 them from popular exchange formats, including RecipeML, MasterCook, Meal-Master and others. It saves its own recipes in KreML (Krecipes XML format). You also can maintain categories, track calories (fiber, fat and so on), 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 or SQLite (see Resources) installed before compiling and using the software. SQLite is a small program-embeddable database that requires somewhat less overhead and administration than MySQL, but it's not as full-featured or powerful. For an application such as this, users may find it to be an attractive option. The beauty of SQLite is 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 is 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"

During your first time with Krecipes (the program name is krecipes), a wizard guides you through some basic setup processes, 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 either. Because we've already covered many programs that use a MySQL back end 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 your selection, Krecipes offers to populate the program with some sample recipes. Make sure you click on this check box before continuing with the setup so you wind up with a few examples to help familiarize yourself with the software.

Cooking with Linux - The Ultimate Cooking Box

Figure 1. Marcel enters the details of his famous Spanish Omelette using Krecipes.

To create a new recipe, click File on the menubar 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 on the Internet in Meal-Master and RecipeML format, it's easy to import them. All this talk of food, mes amis, just reinforces the importance of a well-stocked wine cellar.

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 (through Web pages), create shopping lists, build meal plans and more. You also can import Meal-Master and RecipeML format recipes. Have a look at Figure 2 for a sample of LargoRecipes in action.

Cooking with Linux - The Ultimate Cooking Box

Figure 2. Dishing Up Some Huevos Rancheros with LargoRecipes

To install LargoRecipes, you need at least Java 1.4, which should tell you that no compiling is involved in the installation. Download and save two files from the LargoRecipes Web site (see Resources). 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 also is the command you use to run it on subsequent uses. On your first run, an installation dialog appears. All of the supporting data files and directories are created from where you run the installation. One of those directories is called demo. This is where you save the second file you download, the LargoRecipes demo file. It also is available from the LargoRecipes Web site's download page.

To activate the sample recipes, for this session only, click LargoRecipes on the menubar 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 menubar and select Web Page, and a list of available recipes appears in the right-hand window. Select the ones you want, and then 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 to provide a link on each recipe's page so that visitors to your site can download RecipeML format copies of the recipes. They then can 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 Web site. There are plenty of links there from which you can 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 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 certainly are in order. Until next time, mes amis, let us all drink to one another's health. A votre santé Bon appétit!

Resources for this article: /article/7608.

Marcel Gagné (mggagne@salmar.com) lives in Mississauga, Ontario. He is the author of Moving to Linux: Kiss the Blue Screen of Death Goodbye! (ISBN 0-321-15998-5) from Addison Wesley. His first book is the highly acclaimed Linux System Administration: A User's Guide (ISBN 0-201-71934-7). In real life, he is president of Salmar Consulting, Inc., a systems integration and network consulting firm.

Load Disqus comments

Firstwave Cloud