Connectify action plugin request to programmers

55 views
Skip to first unread message

springer

unread,
Dec 31, 2019, 8:06:36 AM12/31/19
to TiddlyWiki
Taking Mohammad's suggestion, I'm making a new thread with a clear description of one desired plugin for TW5 (to serve as a partial successor to RedirectMacro and other AutoLink type plugins for TW Classic). The easiest fix to implement, I imagine, is just an action assigned to a button as follows:

(1) Simple interface to confirm filter condition. By default the plugin displays a title list for non-system tiddlers without the excludeConnectify tag. User is warned to review the list to confirm that all of these strings should be converted into links *throughout* the set of tiddlers that meet the filter condition. (Looking at the list, user realizes there's a tiddler called "about" and fixes that fact, since it would probably be terrible if all instances of the word "about" became links to that tiddler. Maybe the tiddler should be revised to put "about" in the caption field, while the title is made more descriptive. Etc.)

(1a) Ideally, we also see a list of aliases (but not captions) that exist for those tiddlers that meet the filter condition. (If there are multiple alias plugins, perhaps this is harder. But if they all use a field called "aliases" maybe it doesn't matter?)

(1b) Allow more complex filter conditions? one could have more complex conditions, like an opt-in tag (require an includeConnectify tag), or some more complex Boolean condition (like non-system tiddlers that have the tag "definition" but not the tag "obsolete"). All this could be user-configurable, though first version could be simple.

(1c) Allow configuration of Case-specificity? Do you want to strings like Tiddler Name
and Tiddler name to become links to tiddler name? What about vice versa? (By default, instances of Philosophy in the text will become links to philosophy, but not vice versa. That way, author can capitalize a tiddler title, like Mill, exactly when it's a proper name, trusting it would not become accidentally become a link when tiddler text mentions chances to mill around with philosophers. )

(1d) Allow for an escape character where a particular instance of a string within tiddler text should not become a link, the way ~ prefix serves to keep an instance ~McBoatface from becoming a link. (Leave out of initial version? User can simply scan for likely trouble and keep marginal tiddlers out of the filter condition.)

(2) Connectify! button performs action: Executing the macro searches within the text of all tiddlers that meet the filter conditions, and replaces all instances of tiddler name with [[tiddler name]] links. It also replaces all instances of each alias string with [[alias string|tiddler name]] links.

For now, that would be a huge step toward recovering the functionality of RedirectMacro. The more ambitious variant of the plugin would also tweak the tiddler save process so that, if the tiddler's in the filter condition, potential links (to other filter-condition tiddler titles and aliases) within the tiddler's text would be converted into [[links]] during the save process. Then the user can occasionally "clean up" with the button action so that existing tiddler text can "notice" linking opportunities that have developed since the last use of the action.

Mohammad

unread,
Dec 31, 2019, 1:40:22 PM12/31/19
to TiddlyWiki
Springer,
 Can we simplify or divide it to some smaller steps?

For example

When you finish editing a tiddler a button on the edit toolbar clicked and process the text field and convert all title words to title links?

OR

Can we tag newly created tiddler and then from page controls click a button to process them?


--Mohammad

springer

unread,
Dec 31, 2019, 1:51:45 PM12/31/19
to tiddl...@googlegroups.com
Mohammad,

It's absolutely possible to have smaller steps! And there are really two separate elements in my vision for this TW5 project (successor to RedirectMacro): one is a change to the individual tiddler edit-save process; the other would be a macro call that can be executed across lots of tiddlers at once.

Because some people are worried about the processing load required to scan for potential links on tiddler save, I thought having a filter-list action button (that handles all tiddlers in the class at once, but would only be executed intentionally, so that one doesn't constantly bog down the editing process) would be a non-burdensome first step.

Also, for my own purposes, I'm upgrading a wiki that I developed for years with the benefit of Redirect Macro. So I have hundreds of tiddlers that now don't show any internal links, but which used to look like a dense network of virtually interlinked tiddlers because of that plugin. So, I'd love a function that upgrades this old set of tiddlers, refurbishing them all with internal links, as a one-off procedure. (But then I imagine this very action script/macro as a nice maintenance step supplement to any modification of the on-save plugin, since presumably the on-save function doesn't modify any tiddler other than the current one.)

-Springer
Reply all
Reply to author
Forward
0 new messages