TiddlyWiki for recipes

724 views
Skip to first unread message

Peter Dörrie

unread,
Nov 21, 2015, 5:30:44 AM11/21/15
to TiddlyWiki
I've been using TW for quite a while for some basic notebook-style applications and it worked nicely for that. Now I want to attempt customizing it as a cookbook/recipe collection. I've a good idea what I want to do and I'm sure that I can make it happen with my (very limited) coding skills, but before I sink many hours of work into this project, I wanted to ask the community if what I want to do is technically feasible. I'd appreciate tips and instructions on how to make individual features happen, but I'm also fine with a simple "possible/not possible" on each point. I'll use the online documentation to piece the rest together.

Ratings
I want to rate my recipes using a scale of one to five stars or something similar. Ideally, I want to be able to change the rating without opening the edit window on a recipe tiddler.

Last cooked date
I want to be able to set the date I last cooked a recipe. Again, ideally without entering edit mode, just from the "front end" of a tiddler.

Ingredients and measurements
I'd like to have a separate entry field for ingredients and measurements and leave the main tiddler text field for the cooking instructions. Ideally I'd be able to choose from different measurement types (my recipes use both metric and imperial measurements) and in a perfect world I'd be able to scale amounts on the fly (if I want to cook for four instead of two people, for example).

Additional categories/tags
Instead of using only the standard tags, I'd like to use specific fields to define seasons or meal types (breakfast, lunch, dinner, etc) for individual recipes.

Notes
An additional text field to store notes on a recipe, in case I don't want to mess with the recipe itself.

Multiple operator search
Bringing all this together, I'd like to filter recipes based on all the extra metadata. For example, I'd like to be able to query the database for "recipes that are four stars or more, which I haven't cooked in at least a month and are suitable for a winter dinner dish that includes potatoes). Ideally, I'd have a series of drop-down menus to select the filters and an automatically updating list of fitting recipes.

Any feedback would be appreciated. I will of course share the results with the community, if I indeed manage to produce something presentable.

Many thanks,

Peter


Jed Carty

unread,
Nov 21, 2015, 5:47:47 AM11/21/15
to TiddlyWiki
Yes, that is possible and most of it shouldn't require anything too complex. The biggest challenge for something like that in tiddlywiki is creating a useful interface and organization. The multiple operator search is a bit more complex than the rest, but if you create the rest of it the way you describe it can be added in afterward. The implementation would depend on how everything else is done so if you get to that point and need help ask then.

I have the start of a similar tool here, so feel free to borrow/steal/modify/ignore it or pieces of it if you want. I am not sure if I am going to have time to finish it any time in the foreseeable future so I hope you can put something nice together than I can use. :D

Mat

unread,
Nov 21, 2015, 10:26:55 AM11/21/15
to TiddlyWiki
[Turns out I was not one hour late for hangout #91 but one week early! So, finally I have a little time to spend catching up on the boards!]

@Peter - I'd say TW is perfect for this and it really should not be particularly difficult.

Not only that, I also think it is one of those classic examples that would be a really good showcase for TW if it was nicely implemented.

If you intend to include a lot of images, you should investigate which is the best alternative for this. (I'm unsure myself.)


Ratings
I want to rate my recipes using a scale of one to five stars or something similar. Ideally, I want to be able to change the rating without opening the edit window on a recipe tiddler.
Last cooked date
I want to be able to set the date I last cooked a recipe. Again, ideally without entering edit mode, just from the "front end" of a tiddler.
Ingredients and measurements
I'd like to have a separate entry field for ingredients and measurements and leave the main tiddler text field for the cooking instructions. Ideally I'd be able to choose from different measurement types (my recipes use both metric and imperial measurements) and in a perfect world I'd be able to scale amounts on the fly (if I want to cook for four instead of two people, for example).

You might want to check out the Fast New Tiddler concept (do a search. Initially called the Stealth method or something like that). It includes a way to put directly editable fields in a tiddlers viewmode.
 
Additional categories/tags
Instead of using only the standard tags, I'd like to use specific fields to define seasons or meal types (breakfast, lunch, dinner, etc) for individual recipes.

Of possible interest for you are "typed tags". AFAIK there is still no conclusive solution to this but I know there have been experiments made (by, I believe, @Jed and @Tobias).

Notes
An additional text field to store notes on a recipe, in case I don't want to mess with the recipe itself.

I'd experiment by making a copy of the current text field (and make sure it is tagged just like the standard one to include it in the viewtemplate and edittemplate. Basically it is just adding a field but I interpret your wish as that you want the content to be visible in viewmode.

Or you could just make a child tiddler to the original one and simply have the original tiddler display the contents of all child tiddlers (that are perhaps tagged in some specific way). This should be very simple.

BTW, you should use some kind of template for the recipes.
 
Multiple operator search
Bringing all this together, I'd like to filter recipes based on all the extra metadata. For example, I'd like to be able to query the database for "recipes that are four stars or more, which I haven't cooked in at least a month and are suitable for a winter dinner dish that includes potatoes). Ideally, I'd have a series of drop-down menus to select the filters and an automatically updating list of fitting recipes.

Sure. You'll just have to study the filter syntax a bit.

Recipes is probably as close to a stereotype as you can get for "these kinds of systems"´.

<:-)

Tobias Beer

unread,
Nov 21, 2015, 10:28:13 AM11/21/15
to TiddlyWiki
Hi Peter,

Doesn't have all your bells and whistles (yet),
but perhaps a good starting point...


Best wishes,

— tb

Andy Pastuszak

unread,
Feb 28, 2016, 6:27:22 PM2/28/16
to TiddlyWiki
Tobias,

This looks very nice.  Any plans to keep working on this?

Andy
Reply all
Reply to author
Forward
0 new messages