Category: food


Tomato: A Minimalistic Command-Line Recipe Manager

February 21st, 2010 — 6:12pm

So I’m really excited!

After dabbling here and there in programming, I’ve finally finished my first actual Project. :) It’s a command-line recipe manager built on top of my husband’s Self-Modifying Perl Script.

Anyway, I hope you like it.

Click here to download Tomato.

Here’s the documentation:

~*~*~*~

Tomato
| A Minimalistic Command-Line Recipe Manager

To access this documentation from within Tomato, run the command
| $ doc

~*~

Hi! Welcome to Tomato!

What is Tomato?
|
| Tomato is a very simple command-line recipe manager. It allows
| you to keep your recipes as a collection of text files and
| provides rudimentary import and export utilities.
|
| Tomato is built on top of Self-Modifying Perl, a little
| platform my husband (Spencer) whipped up. Long story short, it
| provides a repl shell that simulates a command line
| environment, but at the end of the day, all of your data is
| contained in one file. If you want the techy 101, visit his
| site: www.spencertipping.com/#section=self-modifying-perl

The story behind Tomato.
|
| I’ve been looking for the right way to manage my recipes for
| years. I used to use full-featured graphical applications.
| They worked … okay. The problem was that I didn’t like to be
| locked into one format or have to jump through a lot of hoops.
| That inflexibility bought you a lot of features, like
| nutritional analysis and a shopping list manager, but it turned
| out I never used them. So after a while, I jumped ship.
|
| For a while, I used wysiwyg editors like Lyx. But it was still
| graphical (read: slooow) and it was clunky having all my
| recipes in one file. Eventually I started putting each recipe
| into its own text file. I liked the simplicity and the
| separation, but I wished there was some way to bundle it all
| together. Enter Self-Modifying Perl!!

What doesn’t Tomato do?
|
| As I’m sure you’ve figured out, Tomato is painfully simple.
| It really doesn’t do anything fancy.
|
| If fancy was what you were hoping for — such as the
| aforementioned nutritional analyses and shopping list managers
| — I recommend krecipes or gourmet, both of which are available
| through the package manager.

I want to try Tomato. Where do I start?
|
| Awesome! Well then, go ahead and download the Tomato file and
| drop it into whichever directory you’d like. You can also
| change its name to whatever you please, let’s say “orange”. Now
| on the command line, run “chmod u+x orange”. You should be all
| ready to go!

A little meta setup:
|
| To enter Tomato’s environment, run your file name on the
| command line. Unless you have your current path aliased, you’ll
| want to precede it with a “./” for your current directory:
|
| % ./orange
|
| Now that you’re in, you’ll notice you have a shell prompt that
| says “tomato$”. If you’d like to change the prompt, say to
| “orange” (to match your file name), you can say
|
| $ name = orange
|
| Your prompt should now read “orange$”.
|
| Next, you might want to name your recipe book, like so:
|
| $ title = “My Party Recipes”
|
| That way, when you export your recipes, it will be titled “My
| Party Recipes”.
|
| Not quite sure you typed that in right? No problem. Just ask
| Tomato to retrieve that value for you:
|
| $ name
| $ title
|
| You can reset these values anytime you’d like.

Creating and editing recipes:
|
| Now we’re ready to populate our recipe book! First of all, I
| recommend that recipes be named according to the following
| convention:
|
| category::recipe
|
| You are, of course, free to do otherwise, but you’re likely to
| break some of the utilities, such as show by category and
| recipe_export by category.
|
| To create a new recipe, use the “new” keyword followed by the
| recipe name. Both dashes and spaces are fine.
|
| $ new category::recipe
| $ new poultry::chicken-enchiladas
|
| To edit a recipe, simply type in its name:
|
| $ category::recipe
| $ poultry::chicken-enchiladas

Managing your recipes:
|
| To copy or move a recipe, you use “copy” and “move”, very much
| like you’d use “cp” or “mv” in bash:
|
| $ copy recipe1 recipe2
| $ move soup::egg soup::egg-drop
|
| To delete one or more recipes, use “remove”:
|
| $ remove recipe1 recipe2 recipe3

Viewing your recipes:
|
| To manage your recipes effectively, it would be very helpful to
| be able to see what you’ve got to work with! To see a list of
| your recipes, say
|
| $ show
|
| If you’d like to see a list of only the recipes in certain
| categories, you can say
|
| $ show category1 category2 category3 …
| $ show poultry dessert soup
|
| Lists are very helpful, but what about viewing the contents of
| recipes? Obviously, to see the contents of one recipe you can
| simply open it in the editor. But what about a plurality? For
| these occasions, Tomato provides the “view” command, which
| works just like “show”:
|
| $ view
| $ view category1 category2 category3
|
| The top statement will print out every recipe, while the bottom
| will confine itself to the categories given.
|
| Can’t remember what categories you have available? View a list
| of them like so:
|
| $ categories

Importing:
|
| When importing, you can either be inside Tomato or outside it
| in your bash shell. Unfortunately, whichever environment you
| choose, you won’t be unable to tab out file names from the
| other. So pick your poison based on your situation. :S
|
| To import from within Tomato, use the following syntax:
|
| $ recipe_import file1 file2 file3 category::recipe-name
|
| Notice you can specify more than one file to be imported;
| Tomato will simply concatenate their contents and deposit the
| whole thing into “category::recipe_name”.
|
| To import from outside Tomato, you’ll use bash to feed the
| contents of your files to Tomato’s “recipe_import” function:
|
| % cat file1 file2 | tomato recipe_import category::recipe-name

Exporting:
|
| Fortunately, exporting is more easily done from within Tomato.
| To export your entire recipe book into one text file
| (“recipes.txt”),
|
| $ recipe_export recipes.txt
|
| Unless otherwise specified, “recipes.txt” will be dropped in
| the same directory that your Tomato file is in (your working
| directory).
|
| If you’d like to export only certain categories into a single
| external file, use the (now-familiar) syntax
|
| $ recipe_export category1 category2 category3 recipes.txt
|
| I purposely emphasize SINGLE external file because Tomato also
| provides a utility to export each recipe into its own file.
|
| $ recipe_export_each
| $ recipe_export_each category1 category2 category3
|
| The new files will have the same names as their Tomato
| counterparts (in a more shell-friendly format) and will be
| dropped inside the working directory.
|
| It’s worth mentioning how to export from outside Tomato. In
| this case, use the “view” command and pipe Tomato’s output into
| a file of your choosing:
|
| % tomato view > recipes.txt
| % tomato view category1 category2 category3 > recipes.txt
|
| You may have noticed that Tomato doesn’t provide a utility to
| export just one recipe. You’re right — to export just one
| recipe, simply do a “save as” from within your editor. In Vim,
| use the command “:w! recipe.txt” and a copy will be saved in
| your working directory (unless, of course, you specified
| otherwise).

Miscellaneous things:
|
| As you may have noticed, Tomato has a simplistic autocomplete.
| It’s not quite as sophisticated as the bash shell’s, but it
| gets the job done!
|
| After performing certain operations, such as importing,
| copying, or moving a recipe, the autocomplete will be a little
| behind. To “tell” autocomplete about your changes, reload
| Tomato by saying
|
| $ reload
|
| This is a good thing to do in general whenever it feels like
| you and Tomato aren’t on the same page. :)

~*~

Written by:
|
| Joyce Tipping <joyce@spencertipping.com>
|
| Feel free to contact me with any comments or complaints. :)

Comment » | food, programming

It’s the darned mushrooms!!!

September 6th, 2009 — 8:00am

I’ve FINALLY figured it out!

Six months ago, I woke up with severe abdominal cramps that I assumed was food poisoning, maybe from eating out the night before. I thought “It happens” and shrugged it off. But after that, every few weeks my stomach would cramp up after a meal and leave me groaning for hours. It seemed completely arbitrary. Sometimes it was chicken, sometimes beef, sometimes well-cooked, sometimes nearly raw; but the crazy thing was, I could eat the exact same stuff other days and be fine. I was totally mystified, especially since my stomach has always been pretty hardy.

But I caught it in the act last night. This time, when my phantom came, all I’d had to eat was a few bites of a mushroom and shrimp stir-fry, made with pre-cooked shrimp no less. I knew it couldn’t be the shrimp because I’d eaten out of that very bag many times before without ill consequence. So I got suspicious: Was it the mushrooms?

Spencer and I put our heads together and sure enough, here’s a list of Major Incidents and what we could remember about the meal that caused them:

1. Steak salad, can’t remember the contents. Can’t even remember the name of the restaurant. It was somewhere in Burbank.
2. The Iron Skillet: Chopped sirloin steak, rare, topped with swiss cheese, mushrooms, and onions.
3. A supermarket meal: Rotisserie chicken, a peach, a tomato, two raw mushrooms, proscuitto, and Muenster cheese.
4. The next day. Lunch at the Loteria: Scrambled eggs and shredded beef. I also ate intermittently from our grocery bag, which still contained many mushrooms. My stomach hurt all day with a major showdown in the evening.
5. Fuddrucker’s: Ground beef burger with guacamole, mushrooms, and bacon.
6. Shrimp and mushroom stir-fry in olive oil, seasoned with coriander, garlic, and salt.

You can see why for the longest time, I thought it was the meat — the mushrooms usually accompany a steak or burger.

Now to be fair, I’ve had many minor stomachaches in addition to the big nasty ones, and I can also remember several other times when I ate mushrooms, but I can’t say for sure whether the mushroom-eating and stomachaches line up. So it’s still just a hypothesis. But until something solidly refutes it, I’m going to stay well away from the little buggers!

Anyway, I looked it up and the term is mushroom intolerance. It’s not an allergy because it doesn’t involve the immune system — if it did, I’d be vomiting, my throat would be swelling shut, and I’d be in a real pickle. But it’s just an awful stomachache (mild by comparison, eh?). Of course, I still haven’t the faintest why this is all happening. I’ve been eating mushrooms all my life. It’s not like I took a long break or anything; I ate them regularly right up to the point when all this started. Maybe that first incident really was food poisoning and it messed something up in my stomach. That would make more sense than my body suddenly boycotting mushrooms. But I’ve not had trouble with anything else, including very rare meat. From all the hubbub about cooking your meat lately, you’d think that raw meat would be the first thing to trigger stomach issues. But nope. Just mushrooms. Weird huh?

So now I feel like my gastrointestinal tract is conspiring against me. First carbs, then mushrooms. Pretty soon, I’ll have to subsist on a diet of ribeye steak and butter. (Actually, that sounds really good. Mmm.)

2 comments » | food, life

I Love Bok Choy

April 26th, 2009 — 8:17pm

bok-choy.jpg

Bok choy is simply the best vegetable ever created. When stir-fried with salt, it is crunchy, mild, and faintly sweet — delicious! Bok choy is such a staple in Chinese cuisine that its name, qing cai, translates to “green vegetable.” It’s a favorite of my mother’s — and now one of mine.

I can eat an entire head of bok choy in a morning. It’s just that good. But I have to say, I haven’t the faintest how vegetarians stay satiated because I’m always hungry again within an hour. For me, it just takes meat.

Comment » | food, life

Splenda

January 25th, 2009 — 10:30pm

I just don’t like Splenda. I tried it in a recipe a few days ago, and it tastes wrong to me.

Which is a huge shame, because low-carbers rely on sugar substitutes for sweetness. Sugar = carbs, pure and simple. There’s just no way around it. Nevertheless, no sugar substitutes for me. Sugar only has 3.4 carbs per teaspoon, so its okay in moderation. I’ll just nix the recipes that call for so much sugar that I can’t use the real stuff.

And desserts? Well, those are harder. My plan is to use pineapple or other sweet fruit. I can’t put in much before I exceed my carb limit so they won’t be very sweet; a bit sad. But I’m bolstered by the thought that as my taste buds readjust — and they already have a lot — I’ll be much more sensitive to sweetness and therefore require less of it.

After all, part of the spirit of low carb is to wean yourself off of sweets. If you’re getting the same experience for less sugar, well life’s just better that way.

Comment » | food, life

Exploding Anchor Hocking

January 19th, 2009 — 4:54pm

Yesterday, I set my brand new Anchor Hocking 1 cup measuring glass on the counter and measured out a half cup of refrigerated chicken broth. I went on preparing the meal. Fifteen minutes later, the glass exploded, throwing hundreds of tiny shards every which way in our little studio apartment.

I was understandably shocked. Now, I’d read the stories about exploding Pyrex and Anchor Hocking before I bought my measuring glasses. I believed them (it hardly sounded like something people would make up), but I didn’t figure it would happen to me. Besides, there were no alternatives in the same price range. So I went ahead and bought the Anchor Hocking set.

Unfortunately, the meal was not salvageable, which was a shame. We also spent nearly an hour vacuuming and cleaning. However, it wasn’t entirely terrible. My husband took me out to a lovely dinner. He also called Anchor Hocking and obtained a replacement.

Truth be told, I’m not entirely sure that I want a replacement. A refund and glasses from another manufacturer sounds better. However, I’m willing to give it another chance. I hope I don’t regret this one.

:)

In the aftermath

In the aftermath

1 comment » | food, life

Back to top