I am working on some tools to help me with meal planning and I’m running into a couple issues. So far, I have created a template for a weekly meal plan, and a recipe list that can be filtered and has a macro to add new recipes. My ultimate goal is to be able to list recipes with similar ingredients to the meals already added on my meal planning template.
I wrote a macro to add ingredients to recipes:
\define addIngredient()
<$action-listops $field="ingredients" $subfilter={{!!new_ingredient}} />
\end
<$edit-text tiddler=<<currentTiddler>> field="new_ingredient" tag="input" default=""/>
<$button actions=<<addIngredient>>> Add Ingredient </$button>
The first issue is that I’m having trouble figuring out how to automatically add the double brackets around ingredients with spaces.
The second issue is figuring out how to list all of the other recipes that have any of the ingredients that are in a tiddler’s ingredients list.
Any help that you can provide is greatly appreciated!