How to consolidate 'shared resources'

28 views
Skip to first unread message

Smandoli

unread,
Dec 24, 2010, 2:30:57 PM12/24/10
to TiddlyWiki
I stumbled onto communitysupply.tiddlyspace (thank Mario P.). I
realized: I can simplify my local TW work by stashing all the
"everywhere needed" tiddlers in a separate TW. That would be like
having a single CSS document that supplies (and harmonizes) countless
HTML documents.
================
(A) Has anyone posted a good how-to on this?
(B) Are there any 'gotchas' with this approach?
(C) Are there any special considerations for various kinds of
tiddlers?
. . . 1. Plugins
. . . 2. Scripts (that aren't plugins)
. . . 3. Config files (such as ColorPalette)
. . . 4. ... ?
(D) What tools will I be using?
. . . 1. ExternalTiddlersPlugin
. . . 2. LoadTiddlersPlugin
. . . 3. TemporaryTiddlersPlugin
. . . 4. ... ?
================
I LOVE being a newbie. Mostly I love having your community support.

Smandoli

unread,
Dec 24, 2010, 3:12:38 PM12/24/10
to TiddlyWiki
Here is the kind of "gotcha" I must learn. I tried using
ExpandSlidersScript and TiddlerMap ... and what I wanted was an index
of the tiddlers on the shared-resource TW, but while it worked fine,
it displayed all the client TW tiddlers. Which makes sense. But I
will be investigating how to make the shared-resource tiddlers appear.

Yakov

unread,
Dec 25, 2010, 4:03:34 PM12/25/10
to TiddlyWiki
Wow! Great post! Actually you've answered your quesions to some
extent.. I have no idea why TemporaryTiddlersPlugin interested you in
this context; at the same time ExternalTiddlersPlugin allows what you
need.. to some extent.

Both ExternalTiddlersPlugin and LoadTiddlersPlugin don't allow to edit
shared tiddlers from the TW in you're currently working, as I
understand.

LoadTiddlersPlugin's description says about "tiddlers from remote
sources" so if this is true and you're planing to work with local
sourses, you have to choose ExternalTiddlersPlugin. Unfortunately, it
seems that you wouldn't find the transcluded content if you use the
search engine, but this can be of little importance for you.

However, as I know, transclusion can't add executable text. I mean,
this wouldn't help to make "shared plugins" system. As for "scripts",
you'd better specify what you mean, so that someone can answer. If you
mean somewhat like InlineJavascript, this perhaps can work. Macros
would work for sure. As I understand, not CSS nor ColorPalette would
work also. Without adding some other script that would render them and
add to the loaded CSS.

I'll try to make it clearer. CSS is rendered from the *code* of
StyleSheet and "imported" CSS tables (see [1], question 3). The CSS-
parser wathces the code of tiddler, not somewhat after wikifying. Now
we have a possibility to "include" smth with <<tiddler>> macro. If you
write it in "escaping zone", CSS-parser wouldn't see it at all since
it is a comment in CSS syntax. And if you write it in the CSS code,
CSS-parser would see this as a syntax error.

So, if you want to get CSS from a "transcluded" tiddler, you need to
make the CSS-parser get code from the external "tiddler" and these
plugins don't do that.

However, CSS can be imported from external CSS files by the CSS
@import dirrective (I didn't tried this, thought). JavaScript can be
shared by making a .js file, adding

<script src="./pluginInFile.js"></script>

into the the MarkupPreHead and making a tiddler with systemConfig tag
which would load functions defined in the pluginInFile.js. This may
demand some scripting work from you, though.

The 2 plugins are useful for shared content (like terminology).

As for ColorPallete and Themes, I suspect there's no way for sharing
them (unless there exists some special plugin).

Thanks for sharing plugins and for causing me to think about this
problems more carefully.

[1] http://groups.google.com/group/tiddlywiki/browse_thread/thread/3fe78f17f5d54376/6ad31eb727a124cc#6ad31eb727a124cc

Smandoli

unread,
Dec 25, 2010, 4:26:24 PM12/25/10
to TiddlyWiki
Thanks Yakov. Here is what I got in conclusion:
(1) ExternalTiddlersPlugin will let me put all my "meta" information
in one spot, available to my other TW docs. This will work great with
tiddlers like plug-in documentation and my cheat-sheets for standards/
conventions, or favorite color palette schemes for reference. Thanks
for the note about search transcluded content -- not an issue.
(2) I'm not much of a coder ... that Nov. 28th link you included is
interesting, but beyond me. SO, everything else will stay local.
... have a great rest of Christmas Day.

PMario

unread,
Dec 25, 2010, 5:42:47 PM12/25/10
to TiddlyWiki
On Dec 24, 8:30 pm, Smandoli <themanthurs...@gmail.com> wrote:
> I stumbled onto communitysupply.tiddlyspace (thank Mario P.).  I
> realized:  I can simplify my local TW work by stashing all the
> "everywhere needed" tiddlers in a separate TW.  ...
That's the nature of tiddlyspace. That means, everything which is
public can be included into an other space. If you put things
together, that you know, you'll need in every space, that's the way to
go. A little bit more see below. But don't forget, to make them
public !

>That would be like
> having a single CSS document that supplies (and harmonizes) countless
> HTML documents.
jup
> ================
> (A)  Has anyone posted a good how-to on this?
http://faq.tiddlyspace.com/#[[How%20do%20I%20include%2Fexclude%20spaces%3F]]
There is one thing, that you have to take care of

a)system-space, public, .. Getting Started (overwritten)
b)plugin-space, public, .. Getting Started (overwritten)
c)your-space, public, .. Getting Started (overwritten)
d)your-space, private, .. Getting Started (valid, visible)

If you have several spaces, that contain a tiddler with the same name.
Your private space will allways win. So the order you include spaces
sometimes is important. That's the way it works.
And it's good, that it works that way.

> (B)  Are there any 'gotchas' with this approach?
I think, the above is the most important one. .. and

Tiddlers, that you include from other spaces, work like "shadow"
tiddlers in your space. If the author updates them. The next time you
do a browser reload, you'll get a new version.

You need to "clone" them if you want to change them. __But__ if the
original tiddler is changed, you'll still see _your_ version. So. At
the beginning, don't mess around with the core/system plugins :)

> (C)  Are there any special considerations for various kinds of
> tiddlers?
>  . . . 1.  Plugins
>  . . . 2.  Scripts (that aren't plugins)
>  . . . 3.  Config files (such as ColorPalette)
Plugins, can be kept in one space per plugin + plugin configuration.
Or if there are plugins, which need to be together, keep them in one
space. But don't add anything else to this space, because it may
interfere with your "private" space. See the "Getting Started"
example. I have and use some "naked" spaces, which only include a
"public" version of the needed plugin. If the author of the original
plugin, sets up a space, I use that one. see: http://tagsearchplugin.tiddlyspace.com/
as an example.

At the moment, you have to decide, if you want to have many seperate
spaces with 1 plugin, or 1-2 supply spaces with several plugins. I
think, in the future, we'll see, what wins.

> (D)  What tools will I be using?
>  . . . 1.  ExternalTiddlersPlugin
>  . . . 2.  LoadTiddlersPlugin
>  . . . 3.  TemporaryTiddlersPlugin
IMO none of them with tiddlyspace.

1&2 .. use the TS include mechanism instead.
3 .. Prevents saving of tiddlers. Is done differently in TS.

The above (D) is 90% true. I don't want to write about the 10% at the
moment. I think It'll be confusing.

>    I LOVE being a newbie.  Mostly I love having your community support.
:)

have fun!
mario

Smandoli

unread,
Dec 25, 2010, 6:55:56 PM12/25/10
to TiddlyWiki
Mario wrote:
> That's the nature of tiddlyspace. That means, everything which is
> public can be included into an other space. ...
--------------------
Mario, my interest is in USB wiki documents. What you wrote is
interesting, but I'm thinking inclusion of spaces is a different set
of techniques that doesn't apply. My own reference to tiddlyspace
was only to say what got my thoughts going.

(Not to divert this thread, but I blogged yesterday about how it's
hard to get a sense of traction at tiddlyspace. I haven't given up;
but the USB work is a lot more gratifying and I tend to want to stay
there.) [1] http://themanthursday.com/where-is-tiddlywiki-community/
Message has been deleted

Smandoli

unread,
Dec 25, 2010, 7:09:59 PM12/25/10
to TiddlyWiki
PROGRESS UPDATE: After Yakov's reply I decided to only re-use
(transclude?) some common
reference tiddlers. For example, "MyNews", a tiddler that reminds me
of latest intentions and directives for all my TiddlyWiki work.

(1) In a wiki called shared_wiki.html, I put the MyNews tiddler. I
put in some content, and at the bottom I placed [[Source: //
shared_wiki//|./sharedwiki_wiki.htm]] so when viewing from another TW
I'll have fast access for editing. (I'm still confused whether I
should make that at Permalink ... I have to test on that.) I tagged
the MyNews tiddler "universal" to help me remember I did intend MyNews
to go to all my wikis (plus later I'll probably find a very useful
MatchTags kind of plug-in that lets me leverage it).

(2) In another wiki, programming_wiki.html, I imported the
ExternalTiddlersPlugin. Then I made a tiddler called MyNews. This
tiddler simply contains: <<tiddler "./shared_wiki.htm#[[MyNews]]" >>

This seems to work well.

Måns

unread,
Dec 28, 2010, 7:19:09 AM12/28/10
to TiddlyWiki
Hi Yakov

> [1]http://groups.google.com/group/tiddlywiki/browse_thread/thread/3fe78f...

Great blogpost! Thanks for sharing your thoughts..-
I like your perspective for 2011 and I agree upon your analysis of why
there is a (seemingly) lack of documentation...

Happy new Year

Cheers Måns Mårtensson

Yakov

unread,
Dec 29, 2010, 2:31:41 AM12/29/10
to TiddlyWiki
Thanks Måns. Though I'm not sure what perspective you're talking
about :)

Anyway, Happy New Year everybody! I think it will bring even more
progress.

whatever

unread,
Dec 29, 2010, 4:33:19 AM12/29/10
to TiddlyWiki
Have you tried Udo's IncludePlugin (http://tiddlywiki.abego-
software.de/#IncludePlugin) and ForEachTiddlerPlugin (http://
tiddlywiki.abego-software.de/#ForEachTiddlerPlugin)?
Specific example: http://tiddlywiki.abego-software.de/#[[List Tiddlers
of the "Master" TiddlyWiki (when using the IncludePlugin)]]. There are
also other examples.
w

Smandoli

unread,
Jan 3, 2011, 3:16:06 PM1/3/11
to TiddlyWiki
I rolled it all back. No external tiddlers.

I didn't like having to manage the dependencies. Also I didn't like
the extra load time.

Maybe I'll revisit this in a few months and it will look easy. I
notice there are synch tools that only load on prompt, or on change.
Heck, that's probably what "sync" is on my toolbar!

Apologies to everyone out there who actually HAS to manage
dependencies just to keep giving me the tools I love! And to Whatever
-- sorry I didn't get to check out your suggestions.

Yakov

unread,
Jan 10, 2011, 4:16:31 AM1/10/11
to TiddlyWiki
I think you really should try IncludePlugin. Looks like it's the most
powerful tool for the issue available. Also, it would be nice to fill
the thread with a small report about this way of "sharing".
Reply all
Reply to author
Forward
0 new messages