Adaptor to suck plain files into a tiddlywiki

9 views
Skip to first unread message

Xavier Verges

unread,
Feb 19, 2008, 4:33:55 AM2/19/08
to TiddlyWikiDev
At last I got some understanding of the adaptor mechanism by reading
http://tiddlywiki.org/wiki/Dev:Server_Adaptor_Mechanism

I want to use a tiddlywiki to be able to tag reular files in the file
system and search in them. So, is there an existing adaptor that
handles that? And if not, what would be a good adaptor to take as a
starting point?

Juts for the record, the current itch is that I'm considering
transalting some big latex[1] files[2], and I'd like to break them up
into tinnier files and try to keep consistency in the work and track
progress by tagging them. But I'd be happy to use the same concept for
my source code or to have a "desktop flickr" [3].

[1]I'm up for some yak shaving, but I'm not considering writting any
latex wikifier. Or am I?
http://groups.google.com/group/TiddlyWiki/browse_frm/thread/c39cf453dbe7fd50

[2]Snake Wrangling for Kids. Learning to Program with Python
http://www.briggs.net.nz/log/writing/snake-wrangling-for-kids/

[3]"desktop flickr"
http://groups.google.com/group/TiddlyWiki/browse_frm/thread/e92ee312a4ffb128

Thanks in advance for any input.

-Xv

FND

unread,
Feb 19, 2008, 9:38:42 AM2/19/08
to Tiddly...@googlegroups.com
> I want to use a tiddlywiki to be able to tag reular files in the file
> system and search in them. So, is there an existing adaptor that
> handles that?

Sort of; there are various plugins that allow you to include external
files, but none of them make use of the adaptor mechanism AFAIK.

We had discussed this a while ago on [tw], which prompted me to start
developing the MasterIncludesPlugin*.
I've summarized the available options here:
http://www.tiddlywiki.org/wiki/Including_External_Data
(Still missing pros & cons for each plugin.)

HTH.


-- F.


* This intentionally doesn't use the adaptor mechanism, as that would
complicate including plugins.

Xavier Verges

unread,
Feb 19, 2008, 10:52:34 AM2/19/08
to TiddlyWikiDev
(Jumping and waving my arms upon seeing that Martin has been in the
[twdev] some minutes ago)

Martin!! Martin!! Take a look at this thread, please! Martin!! :-)

On Feb 19, 10:33 am, Xavier Verges <xver...@gmail.com> wrote:
> And if not, what would be a good adaptor to take as a
> starting point?

-Xv

Martin Budden

unread,
Feb 20, 2008, 7:40:09 AM2/20/08
to Tiddly...@googlegroups.com
Xavier,

the best starting point for what you are trying to do is the local file adaptor:

http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/adaptors/LocalAdaptorPlugin.js

It's some experimental work I did a while go, looking at storing
tiddlers as individual files (the idea was to allow very large
TiddlyWikis). The work is incomplete, and it only works in Firefox,
but it should provide a useful starting point for you.

Martin

wolfgang

unread,
Feb 20, 2008, 4:51:18 PM2/20/08
to TiddlyWikiDev
Hi everyone,

sorry for my ignorance, but how to I make heads and tails out of the
hints in the LocalFileAdaptorPlugin:

> Adaptor for moving and converting data to and from file-based TiddlyWikis:
>
> path/TiddlyFile.html
> path/content/<x>.tiddler
> path/content/revisions/<x>.<nnnn>.tiddler

Though I mentioned that installing LocalFileAdaptorPlugin adds the
item 'local' to the allready existing 'file' under the 'Specify the
type of the server:' import dialog box in the backstage. However,
whether I tried it with different TiddlyWikis, html or text files, it
didn't import them as tiddler for me.

Do I have to place a macro in a tiddler to import a file? How to
externalize tiddlers?

Would appreciate any advise which directs me to a starting point,

W.

On 20 Feb., 13:40, "Martin Budden" <mjbud...@gmail.com> wrote:
> Xavier,
>
> the best starting point for what you are trying to do is the local file adaptor:
>
> http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/adaptors/Lo...
>
> It's some experimental work I did a while go, looking at storing
> tiddlers as individual files (the idea was to allow very large
> TiddlyWikis). The work is incomplete, and it only works in Firefox,
> but it should provide a useful starting point for you.
>
> Martin
>

Martin Budden

unread,
Feb 21, 2008, 11:18:18 AM2/21/08
to TiddlyWikiDev
Wolfgang,

what the local adaptor does is save tiddlers in individual file.
Assume your tiddlywiki is at path/TiddlyFile.html then the tiddler
"Home" will be saved in tiddler format at:

path/content/Home.tiddler

If you then edit that tiddler and save it, it will save the chaned
version as above, and the previous version at:

path/content/revisions/Home.1001.tiddler

There is no specif ability to import plain text, but you can import
from TiddlyWikis using import on the backstage bar in the normal way.

I have an example TiddlyWiki that uses the localadaptor, the easiesy
way to get it is to use Saq's chef utility to build it from
subversion. Just click on:

http://api.lewcid.org/chef/chef.cgi?recipe=http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/verticals/testTiddlerRevisions/TiddlerRevisions.html.recipe

wolfgang

unread,
Feb 21, 2008, 2:33:47 PM2/21/08
to TiddlyWikiDev
> I have an example TiddlyWiki that uses the localadaptor, the easiesy
> way to get it is to use Saq's chef utility to build it from
> subversion. Just click on:

...like magic - or fast food!

Though this way it took me some time to realize that the
LocalFileAdaptorPlugin also needs the AdaptorCommandsPlugin and some
settings from the 'settings' tiddler. But finally also I could cook it
the traditional way myself. 8-) Thanks to this example file. I believe
a 'requires' slice in the plugin description table would make it
easier in this case.

So it's actually not converting data to and fro - it is much more an
automatic individual tiddler revision creation facility from the point
onward, these plugins are installed and changes are made. It even
saves the tiddler in the subfolder 'content' as soon as the 'done'
toolbar button is pushed! That is quite interesting. To find a way to
temporarily disable the creation of revised tiddlers - which rarely
would be needed for all tiddlers - I discovered that even while
temporarily disabling the Plugins the externalized tiddlers are still
recognized. Which for example the similar but manually externalizing
(via tags) ArchivePlugin by Jack isn't able to.


But that brings me to an other question about the BackupTiddlerPlugin,
which allegedly backs up tiddlers individually if chkAutoSave is set
and might be similar in its functions to LocalAdaptorPlugin, but never
worked for me. What other dependencies I could have overseen with
this?

Thanks again for your reply,

W.


http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/experimental/BackupTiddlerPlugin.js
http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/adaptors/LocalAdaptorPlugin.js
http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/adaptors/AdaptorCommandsPlugin.js
http://api.lewcid.org/chef/chef.cgi?recipe=http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/verticals/testTiddlerRevisions/TiddlerRevisions.html.recipe

On 21 Feb., 17:18, Martin Budden <mjbud...@gmail.com> wrote:
> Wolfgang,
>
> what the local adaptor does is save tiddlers in individual file.
> Assume your tiddlywiki is at path/TiddlyFile.html then the tiddler
> "Home" will be saved in tiddler format at:
>
> path/content/Home.tiddler
>
> If you then edit that tiddler and save it, it will save the chaned
> version as above, and the previous version at:
>
> path/content/revisions/Home.1001.tiddler
>
> There is no specif ability to import plain text, but you can import
> from TiddlyWikis using import on the backstage bar in the normal way.
>
> I have an example TiddlyWiki that uses the localadaptor, the easiesy
> way to get it is to use Saq's chef utility to build it from
> subversion. Just click on:
>
> http://api.lewcid.org/chef/chef.cgi?recipe=http://svn.tiddlywiki.org/...

Marc J. Cawood

unread,
Feb 25, 2008, 2:45:21 PM2/25/08
to TiddlyWikiDev
On Feb 19, 10:33 am, Xavier Verges <xver...@gmail.com> wrote:
> At last I got some understanding of the adaptor mechanism by readinghttp://tiddlywiki.org/wiki/Dev:Server_Adaptor_Mechanism
>
> I want to use a tiddlywiki to be able to tag reular files in the file
> system and search in them. So, is there an existing adaptor that
> handles that? And if not, what would be a good adaptor to take as a
> starting point?
This is not related to TW but I wrote a GUI for Index Server which
also has a plugin to allow you to tag any files on your system. The
GUI gives you a full text search (i.e. PDF, DOC etc) but also indexes
the tags and descriptions you give. Send me a mail if you want a copy.

wolfgang

unread,
Mar 15, 2008, 10:59:32 AM3/15/08
to TiddlyWikiDev
Hi Martin,

what settings I would have to use to convert large TiddlyWikis to save
their tiddler each externally?

- Since it does that only after a 'done' on each tiddler - and not by
importing them via the backstage 'import'.

Thanks in advance,

W.

wolfgang

unread,
Mar 16, 2008, 11:32:25 AM3/16/08
to TiddlyWikiDev
> what settings I would have to use to convert large TiddlyWikis to save
> their tiddler each externally?

Forget my last question, I wrongly understood LocalAdaptorPlugin in
that I thought it would not only write tiddler revisions as separate
files, but would also read the tiddler contents from there (as
ArchivePlugin). - But instead it keeps the content of the tiddlers in
the TW StoreArea itself.

Regards,

W.
Reply all
Reply to author
Forward
0 new messages