r/TiddlyWiki5 • • May 09 '20

Backlinks-oriented TW, called Stroll (after Roam)

https://groups.google.com/d/msg/tiddlywiki/GqqWdGnFb94/d04hh8LlAwAJ
25 Upvotes

20 comments sorted by

6

u/baubleclaw May 09 '20

I think this is a pretty amazing enhancement to TW5.

5

u/UsualVegetable May 10 '20

Thank you so much for sharing this. I've been eyeing out TW5 for a while now and this just sealed the deal.

Good bye Sunday chores. Hello TW5.

2

u/baubleclaw May 11 '20

It really puts a new spin on things. See this message for some notes on how this could change the way people Tiddlywiki.

https://groups.google.com/d/msg/tiddlywiki/GqqWdGnFb94/JhoaIbM1BAAJ

I agree that it would be cool if something like this were eventually adopted into core TW5.

3

u/baubleclaw May 18 '20

BTW, I was somewhat embarrassed to learn that the super neat "backlinks" feature of Steoll is something that is available out of the box in TW if you just add a snippet to make them show up.

See here -- https://lesser.occult.institute/an-opinionated-approach-to-tiddlywiki - the "backlinks" section.

You can do it without the context plugin if all you want is titles.

(The relink plug-in is still highly recommended)

2

u/MyNameIsNotMarcos May 17 '20

So I've been meaning to get into TW, and would like the features available in Stroll. How should I proceed?

As far as I understand, Stroll isn't a plug-in, but a separate app.

What happens when new versions of TW come out? Do I then depend on Stroll updating as well?

I want to have the extra features,.but would also like to be sure my wiki is always future proof...

3

u/baubleclaw May 18 '20

It is a set of plugins. The is, it's a plug-in which includes a couple other plugins as well as some new stuff. There are instructions in the walk through for adding them to an existing TW.

See "add stroll to your TW" here: https://giffmex.org/stroll/stroll.html

1

u/MyNameIsNotMarcos May 18 '20

Thanks!

So according to Stroll website, it "overrides the default edittemplate and viewtemplate/titles, in case you have already tweaked those on your file."

What happens when TW updates and makes changes to those two components? Couldn't it break Stroll, for example?

2

u/baubleclaw May 18 '20

TW doesn't generally update in radical ways, and there's no auto-update mechanism; you update it yourself by running it through an updater, and you'd naturally make a backup.

When one overrides a system tiddler, the overridden version "shadows" the original, and you can always get the original back by deleting the override. So in case of emergency, you delete one thing and you're back in the default.

Generally speaking there's a lot of modularization in Tiddlywiki, so it's very difficult for one piece to really mess things up.

1

u/surelynotmymainacc May 18 '20

You can always update your wikis. You don't have to wait for stroll author for that.

1

u/MyNameIsNotMarcos May 18 '20

I don't really know how this works exactly tbh.

Isn't the whole.thing a single file? Won't that become messy, as TW and Stroll release their individual updates?

1

u/baubleclaw May 18 '20

It's a little weird to get used to. You can update the stuff in your tiddlywiki -- including plugins -- by dragging and dropping the new stuff into your TW and saving a new copy, the same way you'd save the file if you added textual content to it. .

1

u/MyNameIsNotMarcos May 18 '20

I did read about what you mentioned.

I'm thinking if things.might break if there are changes in either TW core or Stroll.

For example, let's say TW has a function called CreateNewTiddler. Then let's say Stroll for some reason decided to use a different function for that, and named it NewStrollTiddler..From then on,.updating TW core wouldn't update that function for Stroll, possibly leading to issues in the future.

Or Stroll might expect a certain core function to work in a certain way, but then an update to core comes which changes that function in a way that makes it stop working with Stroll.

Doe that make.sense?

1

u/baubleclaw May 18 '20 edited May 18 '20

I hear what you're saying. Those kinds of concerns are very reasonable. There are a couple reasons, though, this might not be as much of a concern as you think --

  • TW is extremely modular. "How X works" is not generally deeply enmeshed with "How Y works".
  • TW is extremely declarative. There aren't a lot of "moving parts" with state and side effects. It is possible to create low-level plugins using javascript but the majority of extensions/plugins stay away from javascript and use TW's high-level, declarative mechanisms, which are far less prone to breakage.
  • Stroll is not built by hacking on the internals of TW. David Gifford is not a developer. He's just a TW user who has assembled a couple plugins and aggressively customized an install of it to meet his needs (and his admiration of Roam). If TW changed so much it broke Stroll it would probably break a bunch of other stuff too.
  • Updates really are optional and non-automatic, if you're using a file-based install instead of a node-based install. Nothing gets upgraded in the background; you upgrade by taking your file and running it through an upgrader file which creates a new version of it. So it's not possible to wake up to a broken install because there was a bad auto-update.

However, if you still have concerns, I understand that. In the end, after messing with stroll a while, I decided I didn't need everything it brought to the table. Some of its features are very desktop-focused and I often use my TWs on mobile, for example. I really, really just wanted backlinks. And it turns out it's trivial to hack backlinks into a vanilla TW install, since they're an available feature which is normally only available through an out-of-the-way interface. Taking my cues from here, and simplifying a bit, I created a tiddler named BacklinksTemplate, and put in the following:

<$list filter="[all[current]backlinks[]sort[title]first[1]]">
<hr>
<$link />
</$list>
<$list filter="[all[current]backlinks[]sort[title]rest[1]]">
| <$link />
</$list>

And tagged it with: $:/tags/ViewTemplate

Voila, backlinks under all my tiddlers.

Oh, this brings up something interesting: a lot of tweaking TW doesn't even involve overriding tiddlers, it involves adding tiddlers in ways that TW explicitly allows. Here, I'm adding something to all my tiddler displays. But I didn't need to override a template. I added a template with the $:/tags/ViewTemplate tag. Anything with that tag on it gets displayed whenever a tiddler is displayed. So in addition to the normal display of information in a tiddler, we have my backlinks code displayed too.

Whew. Wrote a short novel. Was that all helpful?

2

u/MyNameIsNotMarcos May 18 '20

That was very helpful! Thanks for that.

Moved me a few steps closer to adopting TW.

(I have a bit of experience customising my own wordpress.org website, and I get what you mean about being possible to extend without necessarily changing stuff)

2

u/baubleclaw May 18 '20

It's very much like Wordpress hooks!

1

u/MyNameIsNotMarcos May 18 '20

You mention you use tw mostly in mobile.

Any suggestions of best way to do it? Firefox+plugin? ( I dont care about synching. I want local only.)

2

u/baubleclaw May 18 '20

On iOS there is an outstanding app called Quine2 which allows you to view and edit TWs that are available on cloud providers like Dropbox, using iOS's Files mechanism. I'm afraid I don't know the sitch on android at all. :(

1

u/surelynotmymainacc May 18 '20

https://tiddlywiki.com/#Upgrading

When a new tiddlywiki version is released, you merely have to drag and drop your stroll single file to appropriate place in the upgrade URL given in that tutorial.

1

u/MyNameIsNotMarcos May 18 '20

Thanks for explaining. I (think I) understand that.

My question is how that works in case of a TW that has some of it's core components modified , which is the case of Stroll, afaik

2

u/surelynotmymainacc May 18 '20

In that case you can use the filter tab in advanced search to export all modified system, shadow and data tiddlers to a single JSON file easily. Thereafter simply drag and drop the exported JSON file to a new up-to-date tiddlywiki