My first plugin - Recipes plugin

208 views
Skip to first unread message

odin...@gmail.com

unread,
Nov 13, 2020, 1:09:14 PM11/13/20
to TiddlyWiki
Hello all!

This plugin is a plugin that adds a way to input, store and display recipes in your Tiddlywiki. All the information of the recipe is stored in user-fields, so the template is highly customizable without the need to change every recipe.

Features
  • A input form to add recipes
  • A nice presentation of the recipe
  • The box around the ingrediënts list changes depending on the theme. It takes on the colour of the page-background.
  • By default, each recipe gets tagged 'Recipe'.

This is the first time I packaged and have published a plugin. It is a very simple one, but I do use it in my own tiddlywiki. I am mainly sharing it with this forum to look for feedback. I want to learn more about wikitext and how to make stuff. What would be some things to add that aren't too challenging?

Looking foward to see what you folks think.

Charlie Veniot

unread,
Nov 13, 2020, 9:48:38 PM11/13/20
to TiddlyWiki
That's a right lovely job.  Well done !

TW Tones

unread,
Nov 14, 2020, 12:13:47 AM11/14/20
to TiddlyWiki
Odin,

Thanks for sharing into the community. In the attached tiddler you can see how I use a view template, this allows you recipes text field to be empty as the view template transcludes the recipe, template on tiddlers tagged recipe. 

This leaves the text field free for other notes, and displays then at the bottom below you recipe.

I also noticed that a number of fields storing text details are text blocks, stored in regular fields. This means if edited in edit mode they may loose all their new line characters. Consider hiding such fields from edit mode. Do do this create a tiddler an include it in your plugin in the following name;
  1. $:/config/EditTemplateFields/Visibility/fieldname 
    • and place the value hide (or show) in the text field.
for example
  • $:/config/EditTemplateFields/Visibility/recipe-instructions  
    • and place the value hide (or show) in the text field.

And it will not longer appear in the edit view

If you are interested then we can look at ways to reuse $:/plugins/Odin/Recipe/RecipeTemplate on existing recipes to edit them.

Good work and once again, thanks for sharing with the community.
Tones
templates_recipe.json

clutterstack

unread,
Nov 14, 2020, 5:55:46 PM11/14/20
to TiddlyWiki
This is a very nice plugin. I am now wishing I were not too lazy to prepare a dahl like that.

davidn...@gmail.com

unread,
Nov 14, 2020, 10:06:20 PM11/14/20
to TiddlyWiki
Recipe formatting looks fantastic. I did notice that in the ingredients list some of the list items are merged together instead of displaying as separate list items (see attached image). I had a quick look at the recipe-ingredients field value but could not see anything about the problem ingredients that stood out as different.

--
Regards,
David.
ingredients.png

odin...@gmail.com

unread,
Nov 15, 2020, 2:22:07 PM11/15/20
to TiddlyWiki
Thanks for the encouraging words, everyone!

@David
That is a mistake by me. I forgot to put in some * and enters. Should be fixed now. I think it isn't really showable in the fields, so I guess I have to be diligent when entering recipes, because there isn't a way to edit recipes atm. Because when editing the fields, the formatting gets lost.

@TW-Tones
Thank you for the great feedback! It is funny I didn't think of using the view template based on tags trick for the template. I have used it before, just didn't think of it. I added it to the plugin. The thing about hiding is a great tip, but I think for now I want to have it showing, because it makes it easier to debug atm. What do you mean with reusing the template to edit? To edit current recipes, or to edit the template? If it is the former I am very interested!

I also added a search. You are now able to filter recipes based on title, author, ingredients, portions size and source.  I am low key proud that I managed to figure this one out myself:) The updated plugin is on the same URL:   http://odinjorna.nl/recipes.html
Op zondag 15 november 2020 om 04:06:20 UTC+1 schreef davidn...@gmail.com:

TW Tones

unread,
Nov 15, 2020, 6:27:35 PM11/15/20
to TiddlyWiki
odin,

@TW-Tones
Thank you for the great feedback! It is funny I didn't think of using the view template based on tags trick for the template. I have used it before, just didn't think of it. I added it to the plugin. The thing about hiding is a great tip, but I think for now I want to have it showing, because it makes it easier to debug atm.

Hiding is important if you want to stop people editing fields containing line breaks, but until you have a nice way to edit an existing recipe there is no use for it.

 I will reply again in a sec, as the new google groups has a but
Tones 
 

TW Tones

unread,
Nov 15, 2020, 6:38:26 PM11/15/20
to TiddlyWiki
Odin,

My time is somewhat limited so I edited you new form to not name the tiddler, thus it operates on the current tiddler, I added the view templates tag and the edit form appears on all recipes. 

I will leave it to you to develop a way to toggle your edit mode.

Tones

$__plugins_Odin_Recipe_RecipeForm.json

David Gifford

unread,
Nov 15, 2020, 9:16:54 PM11/15/20
to TiddlyWiki
Added to the toolmap! (https://dynalist.io/d/zUP-nIWu2FFoXH-oM7L7d9DM) under Home and Lifestyle. Great job.

odin...@gmail.com

unread,
Nov 16, 2020, 7:30:58 AM11/16/20
to TiddlyWiki
@TW Tones. Thanks for the tips and beginnings of the edit forms. I managed to figure out a way to edit recipes. I also added a toggle to hide the two fields.

@David Gifford. Thanks! That is really great. It is an honour being on the list I have used so much in the past :) I Changed the host to github. Can you adjust the link to https://odinjorna.github.io/recipe-plugin/ ?

Made some updates. The current features are:
  • An input form to add recipes
  • A nice presentation of the recipe
  • The box around the ingrediënts list changes depending on the theme. It takes on the colour of the page-background. Try this out by changing the palette of this wiki.
  • By default, each recipe gets tagged 'Recipe'. This can be changed in the config tab.
  • A search function to search based on recipe title, author, portions, kitchen and source.
  • A config tab to change the default tagging and hide the recipe-instruction and/or recipe-ingredient fields
  • A UI to edit recipes.
 You can try it out, or download it from:  https://odinjorna.github.io/recipe-plugin/   

Op maandag 16 november 2020 om 03:16:54 UTC+1 schreef David Gifford:

David Gifford

unread,
Nov 16, 2020, 8:14:05 AM11/16/20
to TiddlyWiki
I updated the toolmap link.
Reply all
Reply to author
Forward
0 new messages