NEW: LinkifyPlugin - another improved version of RedirectMacro / AutoWeaving

334 views
Skip to first unread message

Tobias Beer

unread,
Apr 11, 2012, 3:38:13 AM4/11/12
to tiddl...@googlegroups.com
Hi everyone,

Inspired anwe by the recent discussion [1] about Autoweaving and RedirectMacro [2]...

A few months, ago I also played with ideas of enhancing this plugin.
Yesterday I turned this experiment into something that might be a worthy release candidate.

So, now there's also LinkifyPlugin...

Once the recently posted enhancements [1] to RedirectMacro reappear in a Pastebin,
perhaps we could for combining the two, if not already covered.


Hope you enjoy it,

Tobias.


Tobias Beer

unread,
Apr 11, 2012, 4:47:49 AM4/11/12
to tiddl...@googlegroups.com
Just so you know, two more additions are already in the pipe...

1) Allow for matching Uppcercase precisely via '
-> especially useful for short stuff, like country names, e.g. AT or IN

2) Allow to ignore the target tiddler itself via ~

Tobias.

PMario

unread,
Apr 11, 2012, 8:19:26 AM4/11/12
to TiddlyWiki
Hi Tobias,
Cool stuff !!
Do you have some info about the rendering performance impact of the
plugin for big TWs?

It seems the plugin creates a bunch of new formatters (this is a great
idea). But inside it uses "store.getTaggedTiddlers()" which needs to
iterate over the whole store, to create a static "exclude list" over
and over again. IMO the "exclude list" could be cached but some
measurements with big TWs would be needed.

have fun!
mario

Tobias Beer

unread,
Apr 11, 2012, 10:02:53 AM4/11/12
to tiddl...@googlegroups.com
Hi Mario,

Performance is an open issue / a black box at the moment.

You are perfectly right and I have noticed that myself that
the way excludes are implemented is not very performant

I guess, I will use the hijack for saveTiddler in order to update a global excludeForLinkify array,
so that this is only rebuilt upon saving a tiddler.

TB.

twgrp

unread,
Apr 11, 2012, 10:29:03 AM4/11/12
to TiddlyWiki
This looks very interesting and userful! Thank you Tobias!

On a related note (I think?)

The References command only lists tiddlers tagged with the current
tiddler name but totally misses out on tiddlers with the current
tiddlers name as a link in the texts. Ie deleting a tid risks leaving
dead links even if you check out the References first. I find it
surprising that this is not dealt with because what I must assume is
the coding for this ALREADY EXISTS for the Missing tab!

Additionally, default TW behaviour when you delete or rename a tag is
to not take other tiddlers into consideration that are affected by
this. Ie. renaming a tid simply kills tags to it and simply leave them
there! Simon Baird has the great RenameTagsPlugin [1] to solve this -
when you rename a tag (a tiddler name) you're prompted with a question
if you also wish to apply this to those tiddlers where this tag is
used.

Considering how LinkifyPlugin deals with links in the text, it touches
issues related to this. Just maybe you could extend the plugin to
cover these problems, i.e to also update links/tags? Would be very
useful (...and IMO it should even be in the core because what user
would NOT want, and even assume(!) this behavior?!)

<:-)


[1]
http://mptw.tiddlyspot.com/#RenameTagsPlugin


On Apr 11, 9:38 am, Tobias Beer <beertob...@googlemail.com> wrote:
> Hi everyone,
>
> Inspired anwe by the recent discussion [1] about Autoweaving and
> RedirectMacro [2]...
>
> A few months, ago I also played with ideas of enhancing this plugin.
> Yesterday I turned this experiment into something that might be a worthy
> release candidate.
>
> So, now there's also LinkifyPlugin...http://linkify.tiddlyspot.com/index.html
>
> Once the recently posted enhancements [1] to RedirectMacro reappear in a
> Pastebin,
> perhaps we could for combining the two, if not already covered.
>
> Hope you enjoy it,
>
> Tobias.
>
> [1]https://groups.google.com/forum/?fromgroups#!topic/tiddlywiki/reipjbj...
> [2]http://checkettsweb.com/styles/themes.htm#RedirectMacro

twgrp

unread,
Apr 11, 2012, 10:40:39 AM4/11/12
to TiddlyWiki
Oh, one more idea:

How about an option to automagically make appearences/mentions of
existing tiddlers into links - just like CamelCase words do! And, with
the smooth alternative to add a ~ if one wants to disable it locally.

Again, IMO this feels like the natural and more general case for TW or
any wiki. The CamelCase idea was, I must assume, a compromise to
easily make a link but with your LinkifyPlugin this could potentially
be made more general.

<:-)

Alex Hough

unread,
Apr 11, 2012, 11:43:07 AM4/11/12
to tiddl...@googlegroups.com
This could be a something that could be used in Grounded Theory research?
- just add the coded terms to linkify config then use 'references' 

It would be better than changing the text.

Alex

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To post to this group, send email to tiddl...@googlegroups.com.
To unsubscribe from this group, send email to tiddlywiki+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.


Message has been deleted

Tobias Beer

unread,
Apr 11, 2012, 2:20:58 PM4/11/12
to tiddl...@googlegroups.com

Am Mittwoch, 11. April 2012 16:40:39 UTC+2 schrieb twgrp:
How about an option to automagically make appearences/mentions of
existing tiddlers into links - just like CamelCase words do! And, with
the smooth alternative to add a ~ if one wants to disable it locally.

 Hi twgrp,

Yes, that seems quite straight forward to be added. So, I will add this option to the to do list.

On the other hand, if you had a tiddler called [[Cheese]] and also wanted to linkify {cheeses} then this would require an additional entry in LinkifyConfig anyways.

Therefore, in my code, I will first process all tiddlers from LinkifyConfig and then loop all other tiddlers - exclude all of those to be excluded and those that are already linkified - and eventually add linkification formatters for the rest

Tobias.

Tobias Beer

unread,
Apr 11, 2012, 2:22:13 PM4/11/12
to tiddl...@googlegroups.com
Hi Alex,

A)
For now, please note that linkified text currently does not trigger for the tiddler to be listed under references.

This would require to render all tiddlers in the background and then parse the wikified dom for linkified references. This sure is doable but potentially very CPU consuming with large numbers of (big / recursive / computed) tiddlers. So, while this could sure be an enhancement, this kind of reference search might eventually not be responsive enough to replace the core tiddlyLinks <> reference mechanism.

But, I'll add that to the list of things to investigate.

B)
Perhaps I could add / provide a little wikification profiler that indicates how long wikification takes for individual tiddlers. So one could eventually exclude them via a noLinkify tag in case they don't even contain linkified content but rather dynamically aggregated data via fET or the <<tiddler>> macro.

C)
The search for #hashtags as in http://hashtags.tiddlyspace.com is potentially more performant since the RegEx probably has less matches to take care of, but then the same mechanism for searching references - be that in a shadow tiddler (as is) or a popup would be quite an intriguing thing.

Tobias.

Tobias Beer

unread,
Apr 11, 2012, 2:30:23 PM4/11/12
to tiddl...@googlegroups.com
Hi twgrp,

Well, there are two solutions to the problem:

1)
Assuming that in the future you were to use linkify in the first place, you can simply modify LinkifyConfig to now point to the new tiddler while keeping all existing occurences as-is. When a tiddler get's renamed, I might even add a confirmation promt that asks the user whether or not the new tiddler title should be added to the LinkifyConfig, while replacing any existing entries in a way where the new tiddler title was prepended to the configuration line.

2)
When it comes to renaming tiddlers, I believe the best thing to be invented were a kind of ranaming workflow. A plugin would gather all standard and non-standard references and allow you to chose those that you actually want to replace. You would then submit upon which those tiddlers where updated accordingly. This seems first and foremost a time consuming matter in terms of coming to grips with all (potentially) required regexes. But it's doable and I am sure many people would absolutely want that.

Tobias.

Tobias Beer

unread,
Apr 11, 2012, 5:51:32 PM4/11/12
to tiddl...@googlegroups.com
Autolinking tiddlers is now available with version 0.9.1 of LinkifyPlugin, see...
http://linkify.tiddlyspot.com/index.html#%5B%5BVersion%20History%5D%5D

Tobias
Message has been deleted

Tobias Beer

unread,
Apr 11, 2012, 6:10:12 PM4/11/12
to tiddl...@googlegroups.com
There now is a new Version for LinkifyPlugin:
http://linkify.tiddlyspot.com/index.html#%5B%5BVersion%20History%5D%5D

Version 0.9.1:
> optional auto-linkification for all tiddlers
> refactoring (addFormatters, linkifyHandler)
> performance increase with respect to excluded tiddlers -> index of excluded tiddlers now rebuilt on saveTiddler
> all linkification formatters are now inserted last in formatters array
> target tiddlers prefixed with ~ in LinkifyConfig are no longer linkified themselves
> implemented marker 0! to prepend formatter to formatters array, instead of appending it (default)


Tobias

twgrp

unread,
Apr 12, 2012, 5:11:55 AM4/12/12
to TiddlyWiki
Wow, already auto-link for all tiddlers - you're really evolving this!

Some thoughts on syntax:

Both for linkifying multiple words (eg: these multiple words) and for
matching exactly as-is (eg: zoOM not matching Zoom) I suggest using
regular double quotes ("..."), at least as an additional option to
your current syntax. For one it would be the same syntax for both
these cases but, more importantly, double quotes are somewhat of a
defacto standard to specify exactness and delimit multiple words, eg
in search engines (not to mention literature).
(A minor additional benefit, for the multiple words, is that it would
allow it to be the last word(s) defined also, not forcing the user to
come up with yet another word.)

For suffixes (that is one GREAT feature, btw) it'd be more natural
with the ^ in the end of the word, were all suffixes are added.
And if it could be a * instead of ^ it would again be more natural
although one may mistakenly assume it would include every possible
ending... unless (yet another suggestion):
How about letting the user define the "Suffixes" in LinkifyConfig?
This is very much desired for non-English users or the suffix feature
is lost. This would also make that * very natural (the user has
defined everything it covers).

Forgive me if I insensitively suggest things that are difficult to
implment. I can imagine it is difficult to work with double quotes etc
in code.

Again, what a wonderful plugin this is becoming!!!! Thank you
Tobias!!!

<:-)
Message has been deleted

Tobias Beer

unread,
Apr 12, 2012, 5:13:33 AM4/12/12
to tiddl...@googlegroups.com
Hi Mario,


Am Mittwoch, 11. April 2012 14:19:26 UTC+2 schrieb PMario:
It seems the plugin creates a bunch of new formatters (this is a great
idea). But inside it uses "store.getTaggedTiddlers()" which needs to
iterate over the whole store, to create a static "exclude list" over
and over again. IMO the "exclude list" could be cached but some
measurements with big TWs would be needed.

This is now changed from version 0.9.1 on...
http://linkify.tiddlyspot.com/index.html#%5B%5BVersion%20History%5D%5D

The index for excludes is (re)built upon load and whenever a tiddler is saved.

Cheers, Tobias.

PMario

unread,
Apr 12, 2012, 10:59:26 AM4/12/12
to TiddlyWiki
On Apr 12, 11:11 am, twgrp <matiasg...@gmail.com> wrote:
> For suffixes (that is one GREAT feature, btw) it'd be more natural
> with the ^ in the end of the word, were all suffixes are added.
> And if it could be a * instead of ^ it would again be more natural
> although one may mistakenly assume it would include every possible
> ending... unless (yet another suggestion):
I'd +1 this

As I saw ^this the first time, I thought it means: find "this at the
start of the line", which is the meaning if used within a regExp.

===
>How about letting the user define the "Suffixes" in LinkifyConfig?
>This is very much desired for non-English users or the suffix feature
>is lost. This would also make that * very natural (the user has
>defined everything it covers).
-1

If it is configurable, it will cause different types of configuration
tiddlers, which will be incompatible. Imo this limits the "global"
usability of the plugin,

-m


twgrp

unread,
Apr 12, 2012, 11:16:16 AM4/12/12
to TiddlyWiki
PMario wrote

> If it is configurable, it will cause different types of configuration
> tiddlers, which will be incompatible. Imo this limits the "global"
> usability of the plugin,

Could you please elaborate a little here. Why would defining the
suffixes in the LinkifyConfig cause different types of configuration
tiddlers? (Or do you mean between different users? Having only English
suffixes literally limits the global usefulnes of it).
An idea would perhaps be a hard coded standard set of suffixes, as
already implementetd, but allowing the user to manually add
additionall ones. Maybe this would not "limit the global usability" as
you put it, or?

<:-)

Tobias Beer

unread,
Apr 12, 2012, 12:44:31 PM4/12/12
to tiddl...@googlegroups.com
Hello twgrp and PMario,

The current discussion might be a bit misleading in that I started by using the term "prefix" and now you are talking about suffixes too.

In fact, these characters are rather meta characters, switches or flags.

1) They could be configurable since they (currently) do not end up in the regex that is used for matching. BUT, I agree with Mario that for readability's sake alone this should not be pursued. I believe that it is fairly safe to expect people not to use characters like ^  '  * or ~ at the beginning or end of either their tiddler titles or the text they want to match. If one out of a Million should do this... well, bummer. Perhaps I will allow \\ to escape a meta character in order to use it in its literal sense.

2) You are right, Mario. The ^wordroot nomenclature is rather misleading. I will therefore change it as you suggest to wordroot* which sure is a lot more natural.

Thus, I would currently vote to change the meta characters like so:

^PrependToFormattersArray
-> instead of the ugly "prefix" 0!

'MatchLETTERSasis
-> a single quote would trigger matching lower and uppercase letters exactly as defined

config*
-> the new wildcard at the end of the word instead of the beginning

~DoNotLinkify
-> to not linkify the first term but only define it as the tiddler to which all other terms linkify ...separated by |


Keep in mind that - at the moment - the wildcard * is only intended to serve for word endings.
It currently is not intended to be used as {wild*card} or {*card} or even {*middle*}.
I might check as to how hard it would be to allow it both at the beginning or at the end of a term.

Eventually, I don't think that these metacharacters should cover the full range of what RegEx has in store, because no one will want to use that.

Perhaps, I can imagine another pair of metacharacters like this...

(any regex you want to be matched)

Thus, any term wrapped in parentheses is evaluated as a RegEx. However, I am not sure that there will be many people that know how to make use of that or even want to in the context of LinkifyPlugin.


Cheers, Tobias.

Måns

unread,
Apr 12, 2012, 2:47:45 PM4/12/12
to TiddlyWiki
Hi Tobias

> So, now there's also LinkifyPlugin...http://linkify.tiddlyspot.com/index.html

> Hope you enjoy it,

You've just saved me hours and hours of tedious manual work !!!!

( http://synopse.tiddlyspace.gir.dk/ a slowly growing database of
subjects/themes and texts for my students - "All Danish I'm afraid -
however *very* usefull when you are a danish student and linkifyPlugin
is at play "... )

THANKS A LOT!!! :-D

Cheers Måns Mårtensson

PMario

unread,
Apr 12, 2012, 7:27:27 PM4/12/12
to TiddlyWiki
On Apr 12, 6:44 pm, Tobias Beer <beertob...@googlemail.com> wrote:
> The current discussion might be a bit misleading in that I started by using
> the term "prefix" and now you are talking about suffixes too.
hihi,
one finger is not enough, we'll take the hand.

> Thus, I would currently vote to change the meta characters like so:
>
> ^PrependToFormattersArray
> -> instead of the ugly "prefix" 0!
Do you have a special usecase, where it is necessary to put a user
defined formatter in front of the core formatters. I personally think,
this will only cause support requests because of broken core
formatting. Just my opinion.

I do like the other suggestions.

> Keep in mind that - at the moment - the wildcard * is only intended to
> serve for word endings.
that's what I thought.

> It currently is not intended to be used as {wild*card} or {*card} or even
> {*middle*}.
> I might check as to how hard it would be to allow it both at the beginning
> or at the end of a term.
I'd give that low priority.
A fast shot regexp for {wild*card} looks like: [\s](wild.*?card)[\s]
{*card} will be harder to create and imo
{*middle*} is a killer because of missing start and end definitions
(at least at 1am ;)

> Eventually, I don't think that these metacharacters should cover the full
> range of what RegEx has in store, because *no one* will want to use that.
I'd not implement this, until someone can name a really good reason
why s/he needs it :)

-mario

Tobias Beer

unread,
Apr 12, 2012, 8:26:11 PM4/12/12
to tiddl...@googlegroups.com
Now, that's a done, done and... done!

Check out the new version 0.9.5:
http://linkify.tiddlyspot.com/#%5B%5BVersion%20History%5D%5D

For the lazy bunch, these are the changes:
> changed (prefixes to) modifiers
> the sequence of modifiers (previously prefixes) is no longer of any relevance and can be freely assigned
> you can now escape a definition term via \\ and thus interrupt modifier detection for prefixes
> in the rare case where you also want to prevent modifier detection for the very last suffix in the configuration, use \\ at the end of a term
> refactoring -> sanitize()


Enjoy!

Tobias.

Tobias Beer

unread,
Apr 12, 2012, 8:29:56 PM4/12/12
to tiddl...@googlegroups.com
Great to hear (from you) Mans!

I am quite sure that all this work in the end is sure going to pay off for someone. :-D

Cheers, Tobias.

twgrp

unread,
Apr 12, 2012, 8:58:38 PM4/12/12
to TiddlyWiki
Please forget my configurability suggestion, it was a misunderstanding
on my part. (..but, in cased the post at 11:11 was missed, I do think
that "zoOM" is more natural than 'zoOM ).

Here are some other thoughts:

1) How would you linkify a common multiple word root such as snow
board (snow boarding, snow boarder, snow boarders etc)?

2) Regarding ^ or 0!, if I understand it correctly, the purpose is to
first locally disable the CamelCase linking feature and apply linkify
instead.
If LinkifyPlugin is used, is there actually any need for the CC
linking feature? Please let me explain:
I use CC almost exclusively for one thing, ie. choosing a tiddler name
that AVOIDS forcing me to use [[ ]] later on. That, actually, is
pretty much it. If I didn't have to take this into consideration, I'd
gladly skip it. There is one more common *occurence* of the CC which
is an incidental (accidental?) one - namely when you write a text and
only later realize that "ah, darn, that was apparently a CC word...
gotto add ~". That is CORRECTING a mistake, which is at par with
AVOIDING, if now worse.
...my point? Well, just maybe it makes sense with an option (a
checkbox?) in LInkifyPlugin to turn off CC. If links are automatically
created with linkify, particularly for/to tiddler names, then I see
little point with the whole CC issue. Obviously(?) anyone can still
write things in CC format and if Linkify is later disabled then I
presume the CC feature would be activated again.


<:-)

On Apr 12, 6:44 pm, Tobias Beer <beertob...@googlemail.com> wrote:
> range of what RegEx has in store, because *no one* will want to use that.

Albert Riedinger

unread,
Apr 14, 2012, 8:35:05 AM4/14/12
to tiddl...@googlegroups.com
Hi Tobias,

thank you very much for your wonderful plugin! It will save me a lot of time and makes TiddlyWiki complete. I hope that this concept would become a core element of the next TW release. I think that the WikiWords approach is less flexible and easy to use ... and also a bit outdated.

I'm new to TW and used Tomboy a lot in the past, where automatic linkification is the regular way to reference notes, so I missed this feature from the beginning.

I have to test your plugin a little bit further in the next time, especially with my imported Tomboy notes which are huge with lots of references. I'll give you more feedback in near future.

I have three suggestions for new features, which would me (and maybe others) make VERY happy :)

1A. a possibility to define global modifiers in LinkifyConfig → EXAMPLE: line @@@|@@@s [[@@@ – Discussion]] ... could mean: all tiddlers like "Wiki", "TiddlyWiki", "Command", "Plugin" and so on, would be referenced by the words "Wikis", "TiddlyWikis", "Commands", "Plugins" and also by "Wiki – Discussion", "Command – Discussion" ...

2. a macro which would create an input field in EditTemplate for editing aliases of the tiddler (see for example TiddlerAliasPlugin[1]) ... this macro could edit the corresponding line in LinkifyConfig → it would simplify the whole process

3A. like in Tomboy[2] → automatic refactoring linkifications after renaming a tiddler (a bit complicated and maybe an idea for another plugin) ... to avoid unwanted edits: after renaming a tiddler a pop up window could appear with a list of tiddlers where the automatic linkifaction changes would be applied by LinkifyPlugin → users could exclude those tiddlers where they won't these changes to be applied (same solution as in Tomboy)

OR ... 3B. same as 3A → without editing the linkifications inside tiddlers, but rather automatically adding an alias of the renamed tiddler to the corresponding line in LinkifyConfig (user would be asked before adding) → EXAMPLE: tiddler with the name [[Wiki]] → renamed to [[TiddlyWiki]] → line in LinkifyConfig: "Wiki" → changes to: "Wiki|TiddlyWiki" OR "Wiki|*Wiki"→ after further renaming [[TiddlyWiki]] to [[Wiki – TiddlyWiki]] → line in LinkifyConfig changes to: Wiki|TiddlyWiki [[Wiki – TiddlyWiki]] OR "Wiki|*Wiki [[Wiki – TiddlyWiki]]"

OR ... 3C. a combination of 3A + 3B → the user decides which refactoring method would be executed (on a by-tiddler-basis like in 3A?)

My english is not the best, but I hope you'll understand my suggestions. Please ask if not :)

Kind regards,
Albert

[1] http://tiddlywiki.abego-software.de/Beta.html#TiddlerAliasPlugin
[2] http://projects.gnome.org/tomboy/

twgrp

unread,
Apr 14, 2012, 4:30:20 PM4/14/12
to TiddlyWiki
"zoOM", *ildcard*, and on and on = ([\:][\-\o]?[\D]) !!!!!!!!!!!!

Tobias is KICKING BUTTOCKS!

I embarassedly agree with PMario that we're pushing you and "taking
yoru full hand" - but... this is just so good. So, dare I suggest yet
another detail:

I notice way to make a full line not linkify is a blank space at
start. May I suggest minimizing the nomenclature and stick with the ~
sign also here? I.e to not linkify a line it could be a ~ AND a space
(or perpahs ~: as in "don't linkify the following"). I think it
makes more sense mnemonically. It would require to hide the signs used
of course.
...and this would also make sense to expand to full paragraphs with
perhaps something like {{~{...

<:-)


On Apr 14, 2:35 pm, Albert Riedinger <albert.riedin...@googlemail.com>
wrote:
> >https://groups.google.com/forum/?fromgroups#!topic/tiddlywiki/reipjbj...
> > [2]http://checkettsweb.com/styles/themes.htm#RedirectMacro

Tobias Beer

unread,
Apr 16, 2012, 3:37:09 AM4/16/12
to tiddl...@googlegroups.com
@Everyone,

A) First of all, please let me know, if you would agree to the following: For the sake of being able to use the regex modifier in full, I want to change the plugin so that terms are separated via || instead of just | ... which would then allow to use the somewhat crucial pipe | character inside a regex.

B) Should auto linkification for all tiddlers be default, instead of having to turn it on explicitly?


@Albert,

I'm glad you enjoy the plugin.

As for your suggestions, I believe I will tackle them in this order as time allows:

+2) Editing linkification in the edit template.

+3b) Redirect linkification upon rename
-3a) I concur, this is something for a more complex "RenameTiddlers" kind of macro.

?1) Global modfifiers...
Here I find it hard to make up my mind. Should this apply to all tiddlers? If not, (how) should one decide which tiddlers to include or exclude from these global modifiers, via some tag or via a config line? Should a plural-s perhaps always be part of any modifier that doesn't include wildcards? Anyhow, if implemented, I believe this should be part of the regex that tries to match tiddler text, instead of having multiple formatters for each (under the hood).

@twgrp
"I notice way to make a full line not linkify is a blank space at start. May I suggest minimizing the nomenclature and stick with the ~ sign also here?"

I beg to differ. We are only talking about LinkifyConfig and ways to write down comments next to a config line. A tilde ~ does only add distracting semantics from my point of view. I could perhaps allow for // but then the whole thing gets this technical feel to it which I don't see a need for. So, to turn the question around, why would you think that allowing for comment lines via blanks would be a bad idea... other than there perhaps being little to no other environment making use of comments this way.

Cheers, Tobias.

Albert Riedinger

unread,
Apr 16, 2012, 5:58:55 AM4/16/12
to tiddl...@googlegroups.com
Hi Tobias,

thanks for your answer! I'm glad you like some of my suggestions.

A) First of all, please let me know, if you would agree to the following: For the sake of being able to use the regex modifier in full, I want to change the plugin so that terms are separated via || instead of just | ... which would then allow to use the somewhat crucial pipe | character inside a regex.

+1

B) Should auto linkification for all tiddlers be default, instead of having to turn it on explicitly?

+1 → In my oppinion it is the main feature of your plugin. And as I mentioned in my last post, it is also a must-have feature for every modern wiki as it mimics the way information is interwoven in our brains. I think that the core developers of TW should give this concept a try!


+2) Editing linkification in the edit template.

+1

+3b) Redirect linkification upon rename

+2 :)

-3a) I concur, this is something for a more complex "RenameTiddlers" kind of macro. 

+1 → Hope that other devs here give it a try. Or I have to learn Javascript :)

?1) Global modfifiers...
Here I find it hard to make up my mind. Should this apply to all tiddlers? If not, (how) should one decide which tiddlers to include or exclude from these global modifiers, via some tag or via a config line? Should a plural-s perhaps always be part of any modifier that doesn't include wildcards? Anyhow, if implemented, I believe this should be part of the regex that tries to match tiddler text, instead of having multiple formatters for each (under the hood).

It should apply to all tiddlers. I thought that it would help to automatically linkify plurals and other grammatical forms.

Example: "@@@" (or another formatter / regex or sth. else) → means all single terms. "@@@|@@@s" → this line would help to linkify all(?) singular terms to its plural pendents. So "TiddlyWikis" AND "TiddlyWiki" would reference to the tiddler "TiddlyWiki" ... 

Another example: "@@@|@@@-Plugin|@@@-Info" → every tiddler would reference to the related subtiddlers with the suffix "-Plugin" and "-Info" → so the terms "Linkify" "Linkify-Plugin" "Linkify-Info" would all reference to the tiddler "Linkify", the same with "TiddlyWiki" "TiddlyWiki-Plugin" "TiddlyWiki-Info", which would reference to the tiddler "TiddlyWiki".

I don't really know, if "global" modifiers would make sense. This idea came into my mind, as I often had to reference manually to plural forms or genetive cases of some terms. Hope that helps to understand the use case for my suggestion.

--------

I hope it is not too impertinent to ask for another feature, which is the most important to me. As I often use tiddler names with spaces and/or dashes to create subtiddlers it would be nice if the auto-linkification feature could take this into account. As you can se in the below example, the terms "Tomboy 2.0 – Plugins" doesn't reference to the corresponding tiddler "Tomboy 2.0 – Plugins" but rather to "Tomboy 2.0" ... the same with the second and third list item → TW linkifys the CamelCase terms, so your plugin ignores that there is a corresponding tiddler like "AutoWeavePlugin – Test" or "IntelliTaggerPlugin Documentation".
And what's wrong with zzConfig?


Hope that I don't stress your time that much.

Kind regards,
Albert

Tobias Beer

unread,
Apr 16, 2012, 3:56:01 PM4/16/12
to tiddl...@googlegroups.com

Hi Albert,

Am Montag, 16. April 2012 11:58:55 UTC+2 schrieb Albert Riedinger:

A)
Please check the documentation again.
Linkification for all of this is currently possible via LinkifyConfig.
Try to add all of this to your LinkifyConfig:

AutoWeavePlugin|AutoWeavePlugin *|AutoWeavePlugin – *
LinkifyPlugin|LinkifyPlugin *|LinkifyPlugin – *
IntelliTaggerPlugin|IntelliTaggerPlugin Documentation| IntelliTaggerPlugin – *
Tomboy 2.0|Tomboy 2.0 – *
zzConfig

This might seem a lot of stuff, but then that's the idea behind it. Linkification patterns currently require to exactly define for which tiddlers they should apply.


As for zzConfig, I can't quite tell what should be wrong with it...
  • Do you have it?
  • Have you turned on linkification for all tiddlers?
  • Is it in LinkifyConfig?
When tiddelers are excluded from linkification this only means that their body is not linkified. However, you can sure have such a tiddler as a linkification target.


B)
While this might reasonably work for all tiddlers:
@@@|@@@s|@@@*|@@@ – Discussion

...I don't really see that all tiddlers need this matching pattern but perhaps only those tagged xyz, so I would suggest something like the following:
{{GROUP{
%0*|%0 – *
+tagX tagY
tidA
tidB
}}}

In other words, I would envision it like defining Linkification for groups of tiddlers by wrapping the corresponding config in

{{GROUP{
...
}}}


The first line after that defines the patterns to be matched.

I would suggest to use %0 as a placeholder and not @@@, since there is a string function called format which directly works with that, e.g.:
someString.format([replace1,replace2,replace3,...]);
...whereas replace1 would be inserted for any %0, replace2 for %1, etc...

All other lines define the tiddlers like tidA tidB to be matched or alternatively all tiddlers tagged +tagX or +tagY.

So in pseudo-code...
1) get all tiddlers to match as [tagged(tagX) + tagged(tagY) + tidA + tidB]
2) create formatters for all those while replacing every %0 with the actual tiddler names

I think that's better than to have such a rule apply to all tiddlers.

In other words, if a line in LinkifyConfig starts with a css wrapper for a block, then - until the closing wrapper - everything that follows is supposed to define a linkification group with 1 line for rules and x lines for tags or tids.

Cheers, Tobias.

Albert Riedinger

unread,
Apr 23, 2012, 5:31:09 AM4/23/12
to tiddl...@googlegroups.com
Hi Tobias,

thank you for your detailed answer. Sorry for my late response, I've been very busy this last time.

A)
Ouh, I think I've expressed my concerns a bit ambigous in my last post.
I know that I could linkify all terms "Tomboy 2.0 – Plugins" to its corresponding tiddler "Tomboy 2.0 – Plugins" by adding the line Tomboy 2.0 – Plugins in LinkifyConfig. But I thought that the idea behind auto-linkification is to linkify all existing tiddlers with its corresponding terms. In my case to linkify the term "Tomboy 2.0 – Plugins" in all tiddlers with the already existing tiddler "Tomboy 2.0 – Plugins" rather than linkifying only the first part "Tomboy 2.0" with the tiddler "Tomboy 2.0".
I think that LinkifyPlugin should check if there ist "Tomboy 2.0 – Plugins" or maybe "Tomboy 2.0 – Plugins (Test)" etc. before linkifying with "Tomboy 2.0".

The same with "LinkifyPlugin – Test". In this case LinkifyPlugin should also override TWs auto-link function of CamelCase terms and linkify this term to the corresponding tiddler "LinkifyPlugin – Test" if it exists.

I think that it is more intuitive for users if the auto-link feature would take these cases into account. Maybe it would make sense to let the user decide by (de-)activating this behaviour like you've already done it with the auto-link feature.

Another test (note: every list item has its corresponding tiddler, but LikifyPlugin doesn't reference to it):

In terms of zzConfig. Yes, I activated linkification for all tiddlers; zzConfig exists; No, I didn't put zzConfig in LinkifyConfig as I thought it is enough to activate the auto-link feature. I think that LinkifyPlugin has problems to linkify those terms like zzConfig.

Hope that you'll understand what I mean. It's hard for me to explain it in English :)

B)
I like your suggested solution very much as it would meet more needs (not only mine I think). Would be happy to see it in future releases, if it is not too hard to implement it in your code.

Tobias, thank you again for this plugin and your kind support. LikifyPlugin makes TW more complete.

Kind regards from Mainz :)
Albert

Tobias Beer

unread,
Apr 25, 2012, 2:19:54 AM4/25/12
to tiddl...@googlegroups.com
Hi Albert

Thank you for your detailed answer. Sorry for my late response, I've been very busy this last time.

Nay worries, same here ;-)
 

A)
Ouh, I think I've expressed my concerns a bit ambigous in my last post.

Yes, we probably had a little misunderstanding. So, essentially, what you want is for auto-linkification to work right without being required to use LinkifyConfig, i.e. for all of the following tiddler titles, you want correct auto-linkification, without having to list them in LinkifyConfig this way:

Test Test Test Test - Test Test – Test (Test Test Test)
Test Test Test – Test Test
Test Test (Test)
Testtiddler Test Test
Testtiddler – Test
Testtiddler - Test
Testtiddler

So, I think I am going to fix this in two ways:

1) obviously, I need to linkify tiddler titles in reverse order.
  • At least those titles that are contained in other tiddlers must be linkified after those that contain them, as in the example above.

2) apply auto linkification of tiddler titles before any of those defined in LinkifyConfig
  • that means I also have to rethink exclusion for tiddlers where I might not want auto-linkification
    • I would suggest to use the same exclusion definitions already possible via LinkifyConfig  for auto-linkification
  • perhaps I'll even have to combine both "loops" (1 = LinkifyConfig / 2 = AutoLinkify) before creating any formatters ...which would require some rather heavy refactoring... but well, what can you do.

In general, while discussions are needed ...when you are a heavy tester - as you are now - it were real good if you simply uploaded MTCs (Minimal Testcases) to Dropbox / TiddlySpot / TiddlySpace and then highlight directly in the example Wiki for what you think or know to be wrong. Understanding issues is a lot easier when shown in live examples.


In terms of zzConfig. Yes, I activated linkification for all tiddlers; zzConfig exists; No, I didn't put zzConfig in LinkifyConfig as I thought it is enough to activate the auto-link feature. I think that LinkifyPlugin has problems to linkify those terms like zzConfig.
 
As said, MTCs would clearly show this as well and I could even experiment in that wiki until I had it right.


Hope that you'll understand what I mean. It's hard for me to explain it in English :)

Don't worry, you're doing very well.


B)
I like your suggested solution very much as it would meet more needs (not only mine I think). Would be happy to see it in future releases, if it is not too hard to implement it in your code.

That's good, so I take that as a thumbs up ...what's left is to find some time to actually implement it. I will probably document it first, so I don't forget... and then perhaps provide a prioritized "next actions" list.


Kind regards - currently from Düsseldorf - back to you.  ;-)

- tb

Albert Riedinger

unread,
Apr 25, 2012, 7:03:26 AM4/25/12
to tiddl...@googlegroups.com
Hi Tobias,

glad to hear that you'll put some of my suggestions on your "next actions" list. Don't hestitate to involve me for testing or other tasks as long as it has nothing to do with programming ;) I'm more into graphics and video, though maybe TW could motivate me to start learning Javascript.

A) Sounds like a lot of work. But I think it's worth it, as it would make TW more intuitive and user-friendly for non-techie people like me :)

As you suggested I've created a MTC on tiddlyspot → http://linkifytest.tiddlyspot.com/

Hope that helps a bit. Like I said, feel free to ask for more help!

Regards,
Albert

Måns

unread,
Apr 25, 2012, 7:43:02 PM4/25/12
to TiddlyWiki
Hi @tobias

LinkifyPlugin ver. 0.9.6 beta doesn't seem to handle danish letters:
æ, ø and å very well :-( - or I'm doing sth wrong?

Checkout line 16 in the Linkify section - added suffixes are broken
when ø is introduced...
http://synopse.tiddlyspace.gir.dk/#LinkifyConfig

Cheers Måns Mårtensson

On 25 Apr., 13:03, Albert Riedinger <albert.riedin...@googlemail.com>
wrote:
> >    - At least those titles that are contained in other tiddlers must be
> >    linkified after those that contain them, as in the example above.
>
> > 2) apply auto linkification of tiddler titles *before* any of those
> > defined in LinkifyConfig
>
> >    - that means I also have to rethink exclusion for tiddlers where I
> >    might not want auto-linkification
> >       - I would suggest to use the same exclusion definitions already
> >       possible via LinkifyConfig  for auto-linkification
> >    - perhaps I'll even have to combine both "loops" (1 = LinkifyConfig /
Reply all
Reply to author
Forward
0 new messages