Here is the quick description:
This lets you fetch tiddlers from other wikis online. The wikis can be on 
the same server or other servers.
To use it, on your own wiki, enter a wiki url and a filter. Click on the 
Fetch button and the tiddlers from the wiki at the url given that match the 
filter are copied into your wiki.
Both wikis involved need the plugin in order for this to work.

For demonstration, I have one wiki on my domain 
http://ooktech.com/jed/ExampleWikis/FetchTiddlers/
and I have one wiki on tiddlyspot http://tiddlerbundletest.tiddlyspot.com/

Remember, both wikis need the plugin so you won't be able to pull anything 
from another wiki unless you install the plugin on that wiki too. Be 
careful when doing that since to my knowledge me and mat are the only 
people who have done anything with this yet and there may be some bugs we 
haven't seen yet.


The longer description:
This was a mostly unplanned result of the tiddler bundles I have been 
working on and it still has some leftovers from that that I will change or 
remove soon.
There are two wikis involved, I am going to call the one you control the 
local wiki and the wiki that you want to fetch things from the remote wiki.
I made a new tiddler message based on how fetching plugins works, but 
instead of fetching existing objects it talks to the remote wiki and the 
remote wiki bundles the desired tiddlers together and sends the bundle.
There are four steps to this:
1) The user of the local wiki triggers the tm-fetch-bundle wiki message, 
which uses postMessage and a hidden iframe to send a message to the remote 
wiki with information about the desired bundle
2) The remote wiki has a listener when receives the message and creates the 
requested bundle and then uses postMessage to send it back to the local wiki
3) The local wiki has a listener which receives the message from the remote 
wiki and adds the received bundle as a tiddler in the local wiki.
4) The hidden iframe is closed.

The tiddlers are currently all bundled when sent so that the received 
object doesn't have any properties that will maliciously affect the 
receiving wiki. I need to change tiddler bundles so that they are displayed 
inside code blocks so none of the wikitext is rendered. I am hoping to add 
more to the messages passed between the wikis so that if desired the local 
wiki can just directly import a tiddler instead of a bundle, but for now I 
want to make things as safe as possible for users.
Since nothing is saved until the user manually saves the wiki I don't think 
that the send bundle message can be abused, but as part of improving the 
messages I will probably add some very primitive authentication so you can 
set the local wiki to only accept bundles from approved remote wikis. And 
remote wikis can be set to only accept the bundle request if the local wiki 
has been approved. Since javascript is used for the negotiations we should 
be able to have pretty complex behaviour for requests and replies.

This may be used as a way to make a multi-user wiki. Each user would have 
their own version and they would edit it however they like, then they would 
periodically fetch changes from the other users. We need to come up with 
some method of version control for this to work, but it should be a start.

This last bit is a note that I should probably expand upon and put as an 
issue on github:
I don't know if the close/reload plugin library problem has been solved, 
but if not than we should be able to apply how I close the iframe here to 
closing plugin libraries. Even if that isn't the case, how we handle plugin 
libraries needs to be made more generic so that the same mechanism can be 
reused for other inter-wiki communication. This isn't any big change, just 
a thought before we make other things that use the mechanism. Also as part 
of the re-factoring we should make it easier for plugin writers to add 
browser messages without needing to edit 
$:/core/modules/startup/browser-messaging.js

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/9c1b8ce4-c1ff-4cd2-864a-74665f13acea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to