<<tiddler>> using external files/URLs and/or alternative fallbacks

109 views
Skip to first unread message

Eric Shulman

unread,
Nov 26, 2007, 2:46:04 PM11/26/07
to TiddlyWiki
Usually, I don't make a big announcement about new TiddlyTools
plugins, but I think this one may provide some useful solutions for a
wide range of issues, so... I'd like to introduce:

http://www.TiddlyTools.com/#ExternalTiddlersPlugin

This plugin extends the <<tiddler>> macro syntax so you can retrieve
and wikify content from external files or remote URLs in addition to
tiddlers stored within the document. Simply use a local path/filename
reference, or a remote URL (http://) reference in place of the usual
TiddlerName parameter in the <<tiddler>> macro:
<<tiddler somefile.txt>>
<<tiddler /path/to/file.txt>>
<<tiddler http://www.somewhere.com/path/to/somefile.txt>>
That's it... the plugin does the rest. If the file or URL can be
read, it's contents are wikified, just as if they came from a tiddler
in the current document!

In addition to reading content from external text files, you can also
retrieve content from individual *tiddlers* contained in external
TiddlyWiki documents. Just list the desired tiddler(s) using a
"permaview" style suffix on the remote document URL:
<<tiddler http://www.TiddlyWiki.com/#HelloThere>>
If the remote URL is a valid TiddlyWiki document AND the named
tiddler(s) are found, they will be wikfied. If you include multiple
tiddlers (using a space-separated list in the URL), they are
concatenated with a newline in between before being rendered.

The plugin also adds another powerful enhanced feature to the
<<tiddler>> macro: you can list several alternative 'fallback'
references for the desired content source, separated by "|" (similar
to the usage for an external PrettyLink: [[text|URL]]). The enhanced
macro will try each alternative, in turn, until it succeeds in
retrieving content (or runs out of alternatives). For example:

<<tiddler [[HelloThere|http://www.TiddlyWiki.com/#HelloThere]]>>

will display the locally-stored [[HelloThere]] tiddler if it exists in
the document, and will automatically fall back to using the remotely-
hosted [[HelloThere]] content if the local tiddler is deleted (or was
never copied into the document!)

While this plugin has been reasonably well-tested, it is *very* new,
so please use it with care, and report any problems you have, so I can
fix them right away...

Please refer to the plugin documentation for additional details and
examples...

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

Dave Parker

unread,
Nov 26, 2007, 3:29:32 PM11/26/07
to TiddlyWiki
Does this replace the CoreTweaks you wrote earlier in the weekend
about his same thing? I.e., should I get rid of CoreTweaks and
replace it with this one?

DP

wolfgang

unread,
Nov 26, 2007, 3:53:04 PM11/26/07
to TiddlyWiki
Hi Eric,

Nice one.

If I understand the functioning of ExternalTiddlersPlugin right: it
only retrieves an external tiddler once it gets opened? - I just tried
it, and surprisingly YourSearch wasn't able to read the content of an
external tiddler even once the external tiddler has been rendered!

That would make it very fast in including many MB of text of other TWs
- because it wouldn't had to load a TWs full content - and if one
tiddler would be called - still it had to render only this single one.

However, to make use of thisExternalTiddlersPlugin's swiftness it
would be really great if there would be a mechanism added, which reads
the tiddler titles of whole external TW - keeping its titles available
- and only rendering one of them on demand within the tiddler macro
temporarily.

Would that be possible somehow?

Regards,

W.

PS: I ask this question because I want to be able to include TWs of
many MBs. However, in such realm IncludePlugin - which makes external
content fully searchable - becomes useless slow.

On 26 Nov., 20:46, Eric Shulman <elsdes...@gmail.com> wrote:
> Usually, I don't make a big announcement about new TiddlyTools
> plugins, but I think this one may provide some useful solutions for a
> wide range of issues, so... I'd like to introduce:
>
> http://www.TiddlyTools.com/#ExternalTiddlersPlugin
>
> This plugin extends the <<tiddler>> macro syntax so you can retrieve
> and wikify content from external files or remote URLs in addition to
> tiddlers stored within the document. Simply use a local path/filename
> reference, or a remote URL (http://) reference in place of the usual
> TiddlerName parameter in the <<tiddler>> macro:
> <<tiddler somefile.txt>>
> <<tiddler /path/to/file.txt>>
> <<tiddlerhttp://www.somewhere.com/path/to/somefile.txt>>
> That's it... the plugin does the rest. If the file or URL can be
> read, it's contents are wikified, just as if they came from a tiddler
> in the current document!
>
> In addition to reading content from external text files, you can also
> retrieve content from individual *tiddlers* contained in external
> TiddlyWiki documents. Just list the desired tiddler(s) using a
> "permaview" style suffix on the remote document URL:
> <<tiddlerhttp://www.TiddlyWiki.com/#HelloThere>>

Eric Shulman

unread,
Nov 26, 2007, 4:18:23 PM11/26/07
to TiddlyWiki
> Does this replace the CoreTweaks you wrote earlier in the weekend
> about his same thing? I.e., should I get rid of CoreTweaks and
> replace it with this one?

Yes.

-e

Fco Javier González Domínguez

unread,
Jan 6, 2014, 2:21:12 PM1/6/14
to tiddl...@googlegroups.com, TiddlyWiki
Hello Eric
I have use this function and in my Pc it works fine. But the same TW doesn't work in my ipad ( under TWMobile). In the past I use a Javascript function to do the same as your plugin, and it works fine with extenal files like xml files.
Do you know why it doesn't work on Ipad.
Thanks for all.
Reply all
Reply to author
Forward
0 new messages