Easiest way to batch create tiddlers that only differ on their titles?

My use case

I’m keeping a reading list. Relevant tiddlers are tagged as:

  • authors
  • books
    • some of which also tagged as collection
    • some of which also tagged as short stories (Not the cleanest approach ontologically, but it keeps my templates & filters simple). Short stories have a collection field with the title of the book they belong to.

I’d like to be able to provide a list of titles and a means to define fields to be applied to all of them (I guess by pressing a button?). Something like this, with two plain text input boxes:

Titles:

Story A
Story B
Story C

Fields:

tags:short book todo
author:[[Author Name]]
collection:[[Collection Name]]

Pressing the button should create 3 new tiddlers, all having the same 3 tags, same author and collection details.

There are probably more spot-on solutions for you but if the number of tiddlers is not huge, then maybe https://newtids.tiddlyhost.com/ could be of use. Basically, you could use excel to first make two columns with title and text and then just copy paste those columns into the newtids macro, where you add some tags via the macro UI. Then you need to manually click every title to have its tiddler created (this is why it is not appropriate for a huge number of tids).

1 Like

Thanks for the suggestion, I’ll have a look.

Thinking more about it, the fields don’t need (or even should) to be in free form. My (current) needs are quite specific, maybe I should settle with 3 single-line input boxes instead of a multi line text area.

It would keeps things simpler, one for each of tags, author and collection fields and directly feeding their values into a $action-setfield widget. No fancy parsing needed.

Then wrap that inside some form of iteration that splits the Titles text area into lines and feeds an $action-createtiddler.

Now all I need is the syntactic glue to piece that monster together :zombie:

I would definitely look at Commander, which is designed for tasks similar to this.

One question: Are you expecting to add fields to existing tiddlers, or are you creating them with this action and these fields? If it’s the former, would a slightly more sophisticated UI be an improvement: a search field that lets you select the title based on a few typed characters?

1 Like

I don’t know how to do it in batch mode, but the TiddlyWiki web interface has the option to clone a tiddler. If you have lots of tiddlers with exact;y same fields (except the title), why not creating just one, then clone it and rename the clones?

I think that your use case is a very specific one that you need repeatedly, but to use a more multi-purpose tool, here’s how you could accomplish your example using Wrangler: Easy querying and modification of your wiki

Generate 3 tiddlers with names as you described and add your tags. Enter those fields and click the “update” button.
{2ACA7499-6DCF-4E29-B846-2B2718D78C3D}

Then you’d fill each of the other cells if you like. In the fields block, just make the field you’re editing last (similarly click the update button here, then repeat for “collection”:
{014CA64E-5C89-4A67-AE8A-6E917AF83B53}

I’m working on the documentation right now, it’s a pretty cryptic tool, so I’d also recommend checking out TiddlyCommander from Kookma or EditTable from TiddlyTools as well which do similar things with more hand holding.

1 Like

Wow, so many interesting replies, thank you everyone :slight_smile:

I know of TiddlyCommander and use it regularly, I’ve also heard of Wrangler but I haven’t yet needed it. Both great tools but they’re not really what I’m after (though I could get by with using them). I even thought about using a spreadsheet and feeding it into the XLSX Utils plugin but that’s exponentially more labor intensive.

Creating dummy titles in TC/Wrangler and then renaming them by hand defeats the purpose of what I’m after: “Here are X lines of text, create a tiddler for each of them using the current line as the title”. I guess the tags/fields can be edited afterwards in TC/Wrangler.

Here’s my exact use case. I’m into reading short stories, and occasionally I stumble upon articles like “10 short stories by Author from their new Short Story Collection”. I want to keep a note of those 10 stories for future reference.

Right now I create 10 tiddlers by hand, copy & pasting the title of each one as I create them. Then I use TiddlyCommander to batch edit the author & collection fields and assign their tags. That’s 2 separate, manual operations in TC in addition to all the copy & pasting of titles.