One terminal command puts your recipes on iPad

Amanda and I cook our own meals the vast majority of the time. She’s much better at it than I am, but I do well if I have a good recipe to follow. The problem is that our growing pile of printed-out recipes was getting out of control. The solution was to use a digital recipe system, and I figured out how all of my recipes can be on the iPad (or just about any other web-enabled device) with a simple terminal command. I’ll share how I did it after the break.

It’s kind of cheating to say that I did this with one line of code. There are a few dependencies that you’ll have to satisfy before getting to that command:

  1. You need a computer running Apache
  2. Your recipes need to be stored in a directory as text files

I realized that Apache serves directories very nicely if there isn’t an index.html file for the browser to display. I’m using this to index my recipes. Since pretty much all web browsers can load and display a plain text files natively, getting to your recipes is as easy as clicking on the name of the file.

I’ve stored all of my recipes in my documents folder in a directory called recipes. I can create a symbolic link to this folder from my public web directory like this:

sudo ln -s /home/mike/Documents/recipes/ /var/www/recipes

Now just point your browser at that address:

http://your.server.ip.address/recipes

and you should see a listing of your recipes:

Recipes stored on the server are shown as an Apache server index screen.

You may notice that most of my recipes are from 2009. This is when I converted them from storage as notes on a Palm pilot over to text files. The nice thing about this setup is that it’s easy to cut and paste recipes from the Internet, and the files can be edited without root permissions since you linked to a folder in your own home directory.

Other ways to use Apache with your iPad

If you’re up to doing just a bit more work you can also make your music collection easily available on the iPad using a Linux server and an Apache module.

essential