Linking multiple TWs together

560 views
Skip to first unread message

Yohan Fernando

unread,
Aug 9, 2018, 10:55:44 PM8/9/18
to TiddlyWiki
Hi,
Looking out for an option to link multiple TiddlyWikis together? That is, to have one main wiki, but be able to access the tiddlers, search the tiddlers from any wiki. I believe this is what the SharedTiddlersPlugin did. I believe it doesn't work in TW5? I got an alert mentioning its only meant for TW Classic.

Cheers,

Yohan

TonyM

unread,
Aug 10, 2018, 2:34:14 AM8/10/18
to TiddlyWiki
Yohan,

If you did have multiple wikis on top of NodeJS I believe you can "share" tiddlers across wikis (I have not done this).

I export tiddler bundles in JSON and import them as needed.

I believe there are other options so let us see if there is more feedback.

Mark S.

unread,
Aug 10, 2018, 2:46:24 PM8/10/18
to TiddlyWiki
That was a great feature that apparently is not possible in TW5.

Under node.js, you include separate systems of tiddlers by putting this in your "top" tiddlywiki.info file:

   "includeWikis": [
         "../test"
    ],

Usually this is inserted just before "build". Be sure to have backups. "test" should point to a directory that is a TW directory (i.e. has a tiddlywiki.info file). I found it rather fragile when setting up, but maybe I was just clumsy.

Other ideas.

If all the tiddlers in your "other" TW were tagged with a special marker, then you drag the entire TW into your TW file and import them all. Then delete them with a single button later. You could even have a view template that prevents you from editing the tagged tiddlers.

You could use tinka, or node.js to turn all your tiddlers in TW "B" into a plugin. Then you could drop the entire plugin into your TW file. Any changes you made would be to shadow tiddlers and would stick around (I think) when you later deleted the plugin.

-- Mark

Jeremy Ruston

unread,
Aug 10, 2018, 3:27:30 PM8/10/18
to tiddl...@googlegroups.com
That was a great feature that apparently is not possible in TW5.

The problem is actually that browsers have tightened their security restrictions over the last decade, and none of them any longer allow the external file access that made the SharedTiddlersPlugin possible. So not only can we not add anything like it to the single file configuration of TW5, it doesn't work in TWC any longer either.

Best wishes

Jeremy.

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/77665531-37cc-485c-ac61-3039f8b30df9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mat

unread,
Aug 10, 2018, 5:41:10 PM8/10/18
to TiddlyWiki
You should of course check out Jeds work: Bob (previously known as Multi-user TW or something along those lines)

<:-)

Mark S.

unread,
Aug 10, 2018, 6:13:49 PM8/10/18
to TiddlyWiki
Thanks for the explanation, Jeremy!

All this security, while we continue to type away on machines made vulnerable by Meltdown/Spectre. It's like posting "Slippery When Wet" warnings on the deck of the Titantic.

-- Mark

TonyM

unread,
Aug 10, 2018, 11:56:49 PM8/10/18
to tiddl...@googlegroups.com
Jeremy,

In a related technical question. We can use the tag $:/tags/RawMarkup to include external files, 

eg in a tiddler tagged  $:/tags/RawMarkup and containing 
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"> 
on save a reload we can access all the css from this that we want.

This is surely accessing not only an external file but a webresource.

Why can we not use this mechanism to access and address external files? and potentially tiddler and json files? 

Regards
Tony

TonyM

unread,
Aug 10, 2018, 11:58:16 PM8/10/18
to TiddlyWiki
Jeremy, this was for you, I accidentally addressed Jed but edited it.

Regards
Tony

Jed Carty

unread,
Aug 11, 2018, 5:41:12 AM8/11/18
to TiddlyWiki
Despite not being Jeremy I can answer a bit of that anyway.

That is similar to what twederation does and one of the biggest problems with that approach is that once you have loaded the file what do you do with it? You have to be able to pull out what you want from the loaded file and include it in the local file and while that is doable it isn't as straight forward as something like a rel='tiddler' link. You can load the file that way but loading the file and using it are different problems.

You probably could make a plugin that would load js files that defined tiddlers from some server and then include those tiddlers in your wiki, but that would mean that you have to package the tiddlers like that, put them on a server and then write all of the handlers to consume the packaged tiddlers. The version that does that to the full html wiki files is called twederation.

The adversarial model used by browsers is moving more and more toward treating the person using the browser as an adversary and remote servers as trusted, this means that loading local files is more and more difficult while loading files served by a remote server is still the same as it used to be. Webresources are easy to access, local files on your own computer that you control are harder.

Yohan Fernando

unread,
Aug 11, 2018, 9:54:24 AM8/11/18
to TiddlyWiki
Thanks Tony!

Wish I could contribute more with regards to the technical discussions around this topic! But as you say, I might use tiddler bundles to import tiddlers that I need to.

jwd

unread,
Aug 17, 2018, 9:14:34 PM8/17/18
to TiddlyWiki
I'm not sure if what I do will work for your 'linking' use case but
  1. I use Arlen's TiddlyServer implementation
  2. I created separate tiddlyiki's whose tiddlers I want to share or have in common in companion directories to where I keep my main TiddlyWikis, the ones where I want to access those shared/common tiddlers
  3. In TiddlyServer's settings.json I define those as 'internal' TWs, e.g:
            "internal": {
                "shared": "/path/to/TW/Shared",
                "common": "/path/to/TW/Common"
            },


  4. In the 'main' TW's that I want to link those with I include those wikis in the , e.g., in /path/to/TW/Home/tiddlywiki.info file:
        "includeWikis": [
                "../Common",
                "../Shared"
          ],
I'm not typically accessing those 'main' TWs at the same time so your use case may be different. Typically I am accessing one main TW at work and another main TW at home. But there are some aspects of each that I consider shared (tiddlers on tech I am using in both locations) or common (tiddlers that represent tweaks I have made to TiddlyWiki itself that I don't want have to make repeatedly. By using this approach, as I sync the shared and common tiddlers (in git repos) between systems, I simply restart my TiddlyServer instance and reload the browser tab that contains the main TW. In the very rare case where I have made changes in a shared/common tiddler via either of the main TWs a simple git merge or conflict resolution fixes things up.
Reply all
Reply to author
Forward
0 new messages