Jump to content

Find and replace recipe text

Recommended Posts

This is an embarrassingly simple workflow but as it's invaluable to me I thought I'd post it here in case it gives others ideas for similar workflows.


I have a major Scrivener recipe project in which I keep all recipes I've cooked and enjoyed over the years. My pet aversion is to tbsps and tsps (and, indeed, to tbsp and tsp) so I have been tediously converting those to the less confusing tablespoons and teaspoons (etc.)—which reduces the chance of unpleasant culinary mishaps.


Only this morning did it dawn upon me (the stegasourus apparently had a brain so small it was only dimly aware it was alive: maybe it was my ancestor) that this miserable task could be automated in Alfred <sigh>.


I thus present:



…which, as a Universal Action, working on selected text, will convert your spoons. (I have to confess I was very tempted to call the workflow merely Spoons but felt that wasn't perhaps very helpful.)


OK, OK - if you must know the recipe is for Brazilian carrot cake (courtesy of https://www.cuisinefiend.com/992/brazilian-carrot-cake), and very tasty it is, too!


GitHub download link…just in case anyone actually wants the workflow.



Link to comment

I appreciate this workflow is likely to have zero interest or relevance to others but, regardless of that, I've updated it to version 2.0. 😀


This version:

  • allows you to choose one of two default plain text editors (TextEdit and CotEditor);
  • pastes the selected recipe text into the default editor, selects it and runs the workflow;
  • updates the selected text with the revised text and selects that so that you can copy and paste it for further processing;
  • plays a purely optional sound effect at the end.

If nothing else, the workflow is a demonstration of how you can chain some routine text replacements which you may frequently need and run them in a single workflow.


GitHub download link



Link to comment
  • 7 months later...

On the basis there are six other people in the world who do similar things with printed recipes that I do here is version 3.1 of the workflow.


Not content with replacing teaspoons and tablespoons the latest version:

  • deletes bullets from the original text;
  • then trims white space from the beginning and end of each line of the original text;
  • displays the result in the new Alfred 5.5 Text View where you can edit it or continue simply to copy it to the clipboard ready to paste into whatever recipe editor you are using.

DO NOTE: This version requires Alfred 5.5 or later.



Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...