Disable CameCaseLinks in TWC-formatted Tiddlers in TW5

64 views
Skip to first unread message

Kevin Kleinfelter

unread,
Sep 19, 2017, 9:36:10 PM9/19/17
to TiddlyWiki
Oh my.  I imported 700+ TWC tiddlers from a wiki which has CamelCaseLinks disabled via a plugin.  Of course, that plugin won't work in TW5, and the TW5 control panel setting to "Enable automatic CamelCase linking" does not disable CamelCaseLinks in tiddlers marked type = text/x-tiddlywiki.

How can I disable CamelCaseLinking in text/x-tiddlywiki tiddlers?
TIA

Mat

unread,
Sep 20, 2017, 3:21:24 AM9/20/17
to TiddlyWiki
It sounds like you want to keep the "type = text/x-tiddlywiki" - why? Do you not intend to convert them?

What, specifically, do the links look like? Just a plain CamelCase word?

<:-)

Kevin Kleinfelter

unread,
Sep 20, 2017, 8:10:40 AM9/20/17
to TiddlyWiki
Thank you for your reply. 

From what I've read, there is no automated process to mass-convert TWC tiddlers to TW5 (or Markdown).  With 700 TWC-formatted tiddlers to convert, I just can afford to take a week off from work and lovingly hand-convert each one.  As I have a need to update content in a tiddler, I'll probably convert it to Markdown.  I refer to tiddlers much more often than I update them, so some of these tiddlers will remain TWC for a long time.  (Although I suppose I *could* get a price from Amazon's Mechanical Turk for a mass-conversion.)

Yes, I'm just seeking to suppress CamelCase word and CamelCaseWord and ReallyCamelCaseWord.

Mat

unread,
Sep 20, 2017, 9:39:04 AM9/20/17
to TiddlyWiki
From what I've read, there is no automated process to mass-convert TWC tiddlers to TW5 (or Markdown).  

Partly true; if there is "code" in the tiddler, it is not usable in TW5 - but e.g plain text tiddlers are OK, including CamelCase and [[spaced links]]. If I recall, also the text styling is the same. Not 100% sure.

Anyway, as you know there is also the less pretty notification that the tiddler is converted etc. You might want to still convert them to rid this and, after, remove the "changcount" field - but only after first tagging (or befielding) them all with e.g "TWC" so you can easily find them later. Currrently it is the 'type' field that causes that notification. 

This should make CamelCase suppressable like normal TWC.

I made Batch Manipulator for mass conversion. It would also allow you to filter out specific tiddlers for conversion (e.g by tag).
Remember to back up first, if you use it.

<:-)


@TiddlyTweeter

unread,
Sep 20, 2017, 10:15:08 AM9/20/17
to TiddlyWiki
Batch Manipulator is excellent.

I could have benefited from it with my last girlfriend.

Josiah

BJ

unread,
Sep 20, 2017, 10:32:20 AM9/20/17
to TiddlyWiki
Hi Kevin,

put the code below in a tiddler with type application/javascript and add a new field called module-type and give it a value of global. You will need to then save and reload you tw for the change to happen.

try {
var rules = require("$:/plugins/tiddlywiki/tw2parser/wikitextrules.js").rules||[], n;
for( n=0; n<rules.length; n++) {
        if (rules[n].name=="wikiLink")  rules[n].match=".^";
}
}
catch (e) {}


all the best

BJ

Kevin Kleinfelter

unread,
Sep 20, 2017, 10:51:33 AM9/20/17
to TiddlyWiki
Perfect.  That got it.  

In order for me to move from TWC to TW5 with a non-trivial knowledge base, I need to have a gradual migration path.   I appreciate the helpful intent of the 'just migrate all your content to TW5 format', but I really need to avoid breaking current content, and I just can't make the time right now to review hundreds of updated tiddlers.
Reply all
Reply to author
Forward
0 new messages