change case: tiddler title

114 views
Skip to first unread message

Mohammad

unread,
Dec 20, 2018, 10:50:33 AM12/20/18
to TiddlyWiki

I have hundreds of tiddlers tag with "bibtex", how can I simply change the title of tiddlers from uppercase to lowercase or sentence case?

  • Pseudo code

<$button> Change case
<$list filter="[tag[bibtex]]" variable="tid">
operation to change the case of tid tittle
</$list>
</$button>


-- Mohammad

Mark S.

unread,
Dec 20, 2018, 12:41:03 PM12/20/18
to TiddlyWiki
Doing things to titles is tough, because titles are key to TW. I think you would need to clone each tiddler with a new title. Then delete the original tiddler. If you expect list and tag fields to be updated, that would make it even harder. And, of course, any links to the old tiddlers will be broken.

A upper case converter macro written in wikitext would take all day to write, be slow, and leave fringe cases.

But here's a mas_toupper filter operator you can cautiously experiment with. It worked once ;-) I thought a filter operator would probably work best with a large number of tiddlers to convert. But maybe a "upcase" macro would be useful too.

-- Mark
x$__MAS_filters_mas_toupper.js.json

Diego Mesa

unread,
Dec 20, 2018, 12:55:14 PM12/20/18
to TiddlyWiki
Hey Mohammad,

For this kind of work, I usually just "power down" my wiki (Im on node), and use command line based tools to make edits to the .tid files. As Mark noted, this would break all normal links to the tiddler. As a quick aside, this is why I don't like titles being used as uniqueIDs in TW, and I make extensive use of Mario's Unilink plugin.

However, if you're working in the command line you could regular expressions for the link problem by also changing all links to the appropriate case. This is also straightforward in a full-featured language like python, for example.

Mohammad

unread,
Dec 20, 2018, 1:27:14 PM12/20/18
to TiddlyWiki
Hello Mark
 Many thanks for your help. I understood titles are not as easy as other filed to manipulate.

@Diego
Actually these tiddlers are imported as bulk biblio data from Mendely and it uses very bad style for title like "FOGLER2018335".
They are not as  single tiddler, but yes, it is possible to do the job OFF-WIKI or off-road :-)


--Mohammad
 

Diego Mesa

unread,
Dec 20, 2018, 1:40:17 PM12/20/18
to TiddlyWiki
Hey Mohammad, 

In this issue:


I detail the changes I made to make sure the title of the tiddler is the title of the paper

Mohammad

unread,
Dec 20, 2018, 2:34:29 PM12/20/18
to TiddlyWiki
Thanks Diego!


TonyM

unread,
Dec 20, 2018, 8:04:55 PM12/20/18
to TiddlyWiki
Mohammad,

  • Have you considered using the title to set the caption field (in your preferred case), and not bother renaming them?
  • If you want to in a list of tiddlers you can use CSS to change the case as its displayed in a list (not permanently)
  • Using a copy/clone tiddler process to new titles, with a new tag, then delete the originals (with no new tag) is another way.
Regards
Tony

TonyM

unread,
Dec 20, 2018, 8:07:33 PM12/20/18
to TiddlyWiki
Post Script,

Rather than editing the tiddly wiki, perhaps export all bibtex tiddlers, edit the json file (notePad++) and re-import them.

Perhaps renaming the tag they were exported with before re-importing so old have one tag, new have the original tag.

Regards
Tony

Mohammad

unread,
Dec 21, 2018, 12:06:25 AM12/21/18
to TiddlyWiki
Hi Tony,
 Actually I did the last! Editing off-wiki.

Many thanks for your help.

--Mohammad
Reply all
Reply to author
Forward
0 new messages