My mother spent the better part of the past few years collecting and documenting all our family recipes and put them in a Microsoft Word document that she’s been printing and binding for the family. I wanted to take those recipes and convert them into YAML and import them into Paprika for her. I want to automate the process, but I’m not sure where to begin. All the recipes list the ingredients first and then the instructions (nothing surprising about this). There is no demarcation (e.g., a heading) between ingredients and instructions. So, how I program something to recognize the dividing line between ingredient and instruction is my main mystery. Same with the dividing line between the last recipe’s instructions and the next recipe’s title, although that might be a little easier to solve. I’d like to do it with the least manual labor (e.g., prep work in the Word document) as possible–even though, that may mean more work on the “solution.”
This seems like it could be a good project for Awk or Sed or maybe a PERL program. (I’m tool agnostic, and if I could do it on Shortcuts in iOS that would be fun.) If anybody has advice on how I might accomplish this, I’d be most appreciative. I don’t need anybody to do it for me; I’m looking at this as an opportunity to develop a skill. But if this wheel has already been invented, I’m happy to use what’s already out there.