Open michaelbogdan opened 4 years ago
Thanks for writing this up! I've been using org-chef to collect recipes from websites and was recently looking for a way to share them with family and friends. The Nextcloud Cookbook app looks promising, but it requires the Schema.org JSON format. It would be perfect if there were an easy way to migrate between it and org-chef, and this seems like the obvious approach.
In theory, I would be happy to help with this. In practice, I have very little relevant experience and not much time in the next couple months, but I'd still like to try. I imagine the export could be accomplished through an ox-json-recipe.el package, modeled after the ox-* ones in contrib, but what about import—is there any infrastructure within Org for importing other formats? Can capture templates do this??
As is,
org-chef
is capable of working with semi-structured data and is internally semi-structured. Some recipe sources provide recipes in some type of standardized, structured format and it would be nice to pull data from there, too.One example of a JSON source is this JSON list of recipes on GitHub which can be parsed almost as-is.
The advantage of JSON and similarly YAML or XML is that it forces us to specify the recipe format and makes it easy to export recipes from
org-mode
to other, specialized programs or websites. Some wordpress plugins for example are capable of taking in JSON and uploading as a recipe.Examples of JSON recipe schemas are
Both offer more structure than
org-recipe
currently supports, most notably structured information about ingredients and their amounts. Having structured ingredients would help to autogenerate nutrition values (#6), and having structured amounts helps with conversions between metric and imperial/customary (#4), as well as automatically scaling recipes up or down. It would also make implementing #21 easier with better access to structured ingredients.