using tiddlywiki to grow web code.

7 views
Skip to first unread message

jk

unread,
Dec 29, 2007, 1:06:07 AM12/29/07
to TiddlyWiki
hi, all. i'm fairly new to tiddlywiki but am eager to learn.

however, there is one slightly "non-tw" thing i _really_ want
to do with it.

although i love tiddlywiki for it's micro-content, wiki, and non-
linear
concepts.. i'm still gonna be doing plenty of linear webpages as i
learn
more xhtml/css/javascript. i currently use a text-editor and ftp
program to
send these files to my webhost. but the thought occured to me, what if
i could just a stick a tiddlywiki on my website, and using a plugin
and
maybe a php file, create my html markup, css, js or whatever in a new
tiddler and export it as plain text with any extension
(.css, .html, .js,
.xml, .txt etc etc)

i could cook up new pages and scripts for my site, on my site.
this would be really useful to me, and i know its possible with tw.
i'm not sure there is a plugin to do what i aim, though, as plugins
with
similar functionality are usually for a different concept (such as
making
a tiddlywiki smaller..)

first i tried searching for something that will let me export tiddlers
as
html, and i found two candidates (tho there maybe more):

PublishMacro:
exports tiddler(s) to an html file with a linked stylesheet.
problem: i want to use my own markup,
this embeds tiddler content in its own.

ExportTiddlersPlugin:
problem: same as above.

so.. is there a plugin to export the body of a tiddler as a
plain text file with a chosen extension?

if this doesn't exist, it should!

it would really be cool if you could specify the filename in the
tiddler's
title, put the content in the tiddler's body, and tag it with e.g.
'export',
hit a button macro and be done!

note: i'm not trying to go against the "tiddlywiki concept".. i just
figured that i could extend tiddlywiki as a platform to grow web code.
it would be more seamless: when i want to add an additional page to
my site, maybe test out a javascript application or css layout in
plain
html, i could just go to my wiki-based home page, stick the web code
in a
tiddler, and export as another page/file on my site.
i'm tired of desktop applications.

well, i hope i expressed my goal as clearly as possible,
along with my intentions.

..any ideas?


thanks,

stephen

Eric Shulman

unread,
Dec 29, 2007, 5:02:03 AM12/29/07
to TiddlyWiki
> so.. is there a plugin to export the body of a tiddler as a
> plain text file with a chosen extension?

Try these:

http://www.TiddlyTools.com/#SaveTiddlerToFile
works with the local filesystem i/o functions

http://www.TiddlyTools.com/#SendTiddlerPlugin
works via http: POST to a server-side script

HTH,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

jk

unread,
Dec 29, 2007, 3:43:34 PM12/29/07
to TiddlyWiki
> Try these:
>
> http://www.TiddlyTools.com/#SaveTiddlerToFile
> works with the local filesystem i/o functions
>
> http://www.TiddlyTools.com/#SendTiddlerPlugin
> works via http: POST to a server-side script

thanks a lot! i tried both.
the first seems to do what i want it to do,
(it worked locally on my computer) but i'm
not sure how to get it to work with
a tiddlywiki on my webhost.

as for the latter, i honestly don't know
any php/server-side, but i checked w3schools
for some basics and managed to be a display
any html markup from a tiddler with a php
file with:

<?php echo $_POST["content"]; ?>

still,
i'd like to be able to export the tiddlers
as an actual file on my webhost. can i
do this SaveTiddlerToFile?

Eric Shulman

unread,
Dec 29, 2007, 4:23:53 PM12/29/07
to TiddlyWiki

> i'd like to be able to export the tiddlers
> as an actual file on my webhost. can i
> do this SaveTiddlerToFile?

nope. SaveTiddlerToFile uses **filesystem** functions to directly
read/write to your local hard drive. To do something similar for
server-side storage simply cannot occur without some kind of *server-
side script* functionality to which the data can be sent.

That is what SendTiddlerPlugin does... it packages up the tiddler data
as an http:// POST message that it sends to a server-side script for
remote storage. Without such a script, there is nothing on the server-
side to 'catch' the data.

Still, there may be a way for you to use SendTiddlerPlugin, even
though you don't know how to program the server-side: it *might* be
possible to use the "store.php" script from BidiX's UploadPlugin as
the remote 'catcher' for SendTiddlerPlugin... IF we can figure out the
proper SendTiddlerConfig definition to feed to BidiX's script...

-e

jk

unread,
Dec 29, 2007, 6:01:52 PM12/29/07
to TiddlyWiki
> Still, there may be a way for you to use SendTiddlerPlugin, even
> though you don't know how to program the server-side: it *might* be
> possible to use the "store.php" script from BidiX's UploadPlugin as
> the remote 'catcher' for SendTiddlerPlugin... IF we can figure out the
> proper SendTiddlerConfig definition to feed to BidiX's script...

that would rock!
i just now got my tiddlywiki online
with that same plugin.

it's at jk.vc/tw/

ok, now i have a problem... alot of options
are gone.. (such as 'new tiddler'.. i've
seen this before, but i thought it would
work when i got the UploadPlugin working.
do i a need a special version of tiddlywiki
for online? or could i fix this with a
plugin or two)

btw, if you wanna mess with itm the
user name is 'go' and pass is 'yoyo'..

thanks for the help ^^

wolfgang

unread,
Dec 29, 2007, 6:35:26 PM12/29/07
to TiddlyWiki
Hi jk,

> ok, now i have a problem... alot of options
> are gone.. (such as 'new tiddler'.. i've
> seen this before, but i thought it would
> work when i got the UploadPlugin working.
> do i a need a special version of tiddlywiki
> for online? or could i fix this with a
> plugin or two)

all you need is to create a tiddler tagged with systemConfig and the
following content:
__________

config.options.chkHttpReadOnly = false;
__________

W.

jk

unread,
Dec 29, 2007, 9:38:35 PM12/29/07
to TiddlyWiki
> all you need is to create a tiddler tagged with systemConfig and the
> following content:
> __________
>
> config.options.chkHttpReadOnly = false;
> __________

it didnt work. =(

wolfgang

unread,
Dec 29, 2007, 9:43:28 PM12/29/07
to TiddlyWiki
That's really strange.

In this case try it with EnableEdit bookmarklet, which you find on the
this page:

http://lewcid.org/tiddlywiki-bookmarklets/

Hope that helps..

W.

jk

unread,
Dec 29, 2007, 9:49:20 PM12/29/07
to TiddlyWiki
> In this case try it with EnableEdit bookmarklet, which you find on the
> this page:
>
> http://lewcid.org/tiddlywiki-bookmarklets/

thanks a lot! it worked.
its rather an obscure way to fix a problem tho..
i wont be able to edit w/o that bookmarklet,
which is a shame when i'm on another computer.

wolfgang

unread,
Dec 29, 2007, 9:55:38 PM12/29/07
to TiddlyWiki
Take a look at the thread 'InstantBookmarklets'. There you find a
small piece of code which gives you a onclick handle to be put in a
tiddler of your TiddlyWiki.

Though I wouldn't be satisfied with such crutches either, and would
want to find out what's causing it ;-)

Regards,

W.

jk

unread,
Dec 29, 2007, 10:04:23 PM12/29/07
to TiddlyWiki
> Though I wouldn't be satisfied with such crutches either, and would
> want to find out what's causing it ;-)

yeah, i don't know what's causing it!
i downloaded a tiddlyspot tw once and modified
it to work with apache on my lan, so i know
there's something that should make it work.

i did what previously mentioned here:

http://jk.vc/tw/index.html#HttpFix

i'll take a look at the onClick thing,
but ultimately i want to make it _just_ work.

Eric Shulman

unread,
Dec 30, 2007, 3:01:10 AM12/30/07
to TiddlyWiki
> i did what previously mentioned here:
> http://jk.vc/tw/index.html#HttpFix

as of TW2.2 you need to set several variables to properly enable
editing over HTTP:

config.options.chkHttpReadOnly=false;
readOnly=false;
showBackstage=true;

HTH,
-e

jk

unread,
Dec 31, 2007, 12:03:30 PM12/31/07
to TiddlyWiki
thanks a lot, eric and wolfgang! i can save now!

now to get this working..

> Still, there may be a way for you to use SendTiddlerPlugin, even
> though you don't know how to program the server-side: it *might* be
> possible to use the "store.php" script from BidiX's UploadPlugin as
> the remote 'catcher' for SendTiddlerPlugin... IF we can figure out the
> proper SendTiddlerConfig definition to feed to BidiX's script...

which would be easier, to learn server-side
or to use UploadPlugin? when you say definition,
are you referring to javascript (i'm just now
learning this..)

does this mean i could get it working if
i knew enough javascript (w/o php)?

and if i did learn some php, would i be able
to use this to get the tiddlers and send them
to a file, not just as postdata?


thanks =)

stephen
Reply all
Reply to author
Forward
0 new messages