A Fargo Script I Wrote for My Day Job

Part of my day job as a web producer involves resyndicating recipe content. I basically take a whole recipe from the original site, re-render it in HTML in a slightly different format, and post the HTML in a different CMS.

The format of a recipe step on the original site looks like this:

  • STEP 1

  • Whisk the eggs, sugar and flour.

I want it to look like this in the resyndicated format:

  • 1. Whisk the eggs, sugar and flour.

I've written a Fargo script to accomplish this, you can view the code here. If you select the top headline and copy it to your clipboard, you can paste the OPML straight into Fargo.

Visit the Fargo scripting page in the docs to learn how to install this script, or watch this video.

To make it work, I just copy the text from the original site and paste it into Fargo. "STEP X" is its own headline, the instructions are the headline below it. I run the script on the first headline. If the first four characters are "STEP" I remove all the characters before the number, add a period after the number and bold these two characters, then grab the instructions, append them after the step number, and remove the instructions line.


Last built: Tue, Mar 31, 2015 at 2:05 PM

By Jeffrey Kishner, Tuesday, December 10, 2013 at 11:26 AM.