I’ve been generating many figures, and I want to be able to find them again and browse them easily. Organizing them on disk just isn’t cutting it. My solution for now is to use a local TiddlyWiki as the glue for my figures, since I can embed figures in tiddlers (the microcontent entries that are the bread and butter of TiddlyWikis), and tag and search those entries. Bonus: I can zip everything up and send TiddlyWiki + images to my advisor so he can browse and search them as well.
Try this Python script, addtiddler.py, to insert tiddlers into an existing TiddlyWiki. You can optionally specify an image name (relative to the output file, see the documentation in the source code) to be embedded. You can use this script from the command line using options, or import it into another script.
I tried to add lots of comments so you can modify it for your own needs. Let me know if you find bugs so I can fix them.
Hi, Thankyou very much for this useful tool first of all. Here’s what I found:
C:\Program Files (x86)\Python26> python N:\Scripts\Python\addtiddler.py -i N:\Scripts\Help\script_repo_help.html -o N:\Scripts\Help\script_repo_help_TEST.html –image images/headFrogManv06.jpg –tags “images” –description “test image” –resize
Traceback (most recent call last):
File “N:\Scripts\Python\addtiddler.py”, line 347, in
resize=options.resize)
File “N:\Scripts\Python\addtiddler.py”, line 298, in addtiddler
if tempfile:
UnboundLocalError: local variable ‘tempfile’ referenced before assignment
Try adding:
to the top of the file.
Note however that’s it’s been a while since I’ve used this script — I don’t know if it’ll even work with recent versions of TiddlyWiki. When I get some time I’ll update this script.
Yessir, that did the job. It works from a script and from commandline just fine. Now i’m wondering about this:
Process is inactive for 15 seconds. Waiting……………..
Process is inactive for 30 seconds. Waiting……………..
Process is inactive for 45 seconds. Waiting……………..
Process is inactive for 60 seconds. Terminating…
…but I understand you probably don’t have time, thanks anyway!