Pocket tiddlers: tiddlyweb rocks

66 views
Skip to first unread message

tony

unread,
Jul 16, 2009, 2:12:05 AM7/16/09
to TiddlyWeb
3 yrs ago I started a thread about TiddlyWiki on a mobile device:
http://groups.google.com/group/TiddlyWiki/browse_thread/thread/8c70fecb40897037/995e9b6e7bad40c8?hl=en&q=#995e9b6e7bad40c8

Today, it works on iPhone OS 3.0 thanks to TiddlyWeb.

:-)

A few hours ago, this post was:

subject: mobile tiddlywebwiki: just get Trunk Notes

ugh, I am so close and yet so far... :-(

Seems like an oxymoron, mobile tiddlywebwiki on a single process
device, but I got tiddlyweb 0.9.53 and tiddlywebwiki 0.3 installed on
a redsn0w JB ipod touch

hurrah. :-|

The effort was short lived until I started up CherryPy only to realize
the simple fatal logic ....

iphone OS doesn't multiprocess!!

When I quit Mobile Terminal to open mobile safari, I shut down the
server too!

I get a Traceback (most recent call last): File "build/
bdist.darwin-10.5-arm/egg/cherrypy/wsgiserver/_init_.py", line 624

Next step

pyobjc bridge to roll an app with python, uh oh

update!!

if you want to try, run as su root

prereq: redsn0w an iphone or ipod touch under OS 3.0, cydia, mobile
terminal, backgrounder

Tiddlywebwiki: the regular easy_install worked but you have to update
setuptools to 6c9 as the telesphoreo package is at 6c7.

I used my old sql store as a starter so easy_install sqlalchemy! I was
so used to testing on the desktops that I forgot this dependency.

I used fugu a gui to scp over from my instance on the mac to the ipod

I copied over sql.py, sql store, wikklytextrenderer and
tiddlywebconfig to an empty directory that is my instance on the
ipod.

My path was private/var/mobile/<instance>

After a brief sullen period about the single process stumbling block,
I remembered that the Backgrounder app can run with apps in the
background enabled by holding the home button (toggle on/off)

That was the key as starting CherryPy in MobileTerminal, I then could
enable it in the background, run mobile safari to see the TiddlyWeb.

And the saving grace was seeing that '...saved successfully' dialog at
the upper right hand corner.

Welcome to satori.

Best,
tony

Chris Dent

unread,
Jul 16, 2009, 4:01:57 AM7/16/09
to tidd...@googlegroups.com

On Jul 16, 2009, at 7:12 AM, tony wrote:

> Today, it works on iPhone OS 3.0 thanks to TiddlyWeb.

Woot! This is awesome, well done.

It would be great if you could make a blog posting or something
similar that provides what amounts to a cookbook for the entire
process, from jailbreaking through to working with tiddlers.

9600

unread,
Jul 16, 2009, 5:27:27 AM7/16/09
to TiddlyWeb
On Jul 16, 7:12 am, tony <cca...@gmail.com> wrote:

> iphone OS doesn't multiprocess!!
>
> When I quit Mobile Terminal to open mobile safari, I shut down the
> server too!

Right, but you should be able to have init start TiddlyWeb at boot.
Else use something like screen or nohup to spawn a detached process
that won't quit when terminal does (if Cydia has these). Or you could
also install the package that does allow you to background apps, by
holding the Home button for a little longer than the usual momentary
depress.

Great work, though!

Cheers,

Andrew

Jeremy Ruston

unread,
Jul 16, 2009, 7:08:53 AM7/16/09
to tidd...@googlegroups.com
I was imagining that we could build a wrapper application that
incorporated both the TiddlyWeb server and an embedded instance of
UIWebView (ie WebKit) to view the pages generated by the server. It's
seems possible that such an arrangement would work on non-jailbroken
iPhones, too.

Cheers

Jerm
--
Jeremy Ruston
mailto:jer...@osmosoft.com
http://www.tiddlywiki.com

tony

unread,
Jul 16, 2009, 4:33:52 PM7/16/09
to TiddlyWeb
On Jul 16, 1:01 am, Chris Dent <chris.d...@gmail.com> wrote:
> great if you could make a blog posting or something  
> similar that provides what amounts to a cookbook for the entire  
> process, from jailbreaking through to working with tiddlers.

Thanks for all the suggestions.

This is fun.

Yes, I'll try to get something to together as one long comment ;-)

Issues:
- User experience with pinching and zooming around this 'big'
TiddlyWiki layout.
I'm going to search around tiddlywiki css again for a minimalist
mobile lightweight stylesheet. I like BidiX's iTW TiddlyWiki for the
iPhone but it looks specific to BidiX's upload service and has tweaks
I'm not sure to take out without killing the patient. I like the table
style layout, very iphonisque. I prefer something stock, though, an
empty.html based on the Tiddlywiki.com standard just less heavy would
work, then twanager imwiki should do it. I'm thinking of something old
skool like http://www.c2.com/cgi/wiki
Even with getting a mobile base empty.html, some UI still needs to be
cropped out of Tiddlywebwiki, ie import tiddlers, save tiddlers,
backstage etc. But Imagine learning css and tweaking this web app
without fussing with Interface Builder and nib files!

-Scale: I'm running on a sqlite store with just a handful of tiddlers.
I'm not sure how performance will go with more. Right now it takes
about 2-3 seconds after I hit 'Done' to when i see the save dialog. As
for loading, it takes about 15-16 seconds for the loading from the
tiddlers.wiki view. When it gets bigger, I have to figure out a better
filter or recipe. I'll try to test different instances.

Neato:
-9600: stays on/asleep: when background CherryPy server process is
enabled, user can hit home, power button and sleep the device but the
process is still running. User can then wake the device, open Safari
and continue using Tiddlywebwiki. er, uh i have to learn about nohup &
someday :-)
-At first I bookmarked the recipe URI, but then I remembered web
clipping- dragging the mobile safari URI for my recipe and saving it
to the springboard as a web clipping. The icon even looks like a
Tiddlywiki; I named it TiddlyWeb.
-Mobile Terminal allows user configuration of menu items and gestures,
I made one for the su root command and Twanager server so a few
strokes and Tiddlywebwiki is alive. woohoo!
-workflow: click home button, launch Tiddlyweb app, edit, rinse &
repeat!

Looking forward to:
-tiddlysaver.jar and just TiddlyWiki itself. Saurik's Cydia has some
java tools like classpath
-someone doing this for the Palm Pre Mojo WebOS homebrew style
-html5 mashup
-a browser free TiddlyWeb?! Jeremy's idea of a wrapper around this
whole lot to see it as a standalone app although the app Trunk Notes
is pretty perfect right now.

Although someday I hope tiddlers will be set free as RESTful resources
across many clients further spreading this great wiki metaphor.

mobile to the masses

Best,
tony

Chris Dent

unread,
Jul 16, 2009, 9:28:24 PM7/16/09
to tidd...@googlegroups.com

On Jul 16, 2009, at 9:33 PM, tony wrote:

> I'm going to search around tiddlywiki css again for a minimalist
> mobile lightweight stylesheet. I like BidiX's iTW TiddlyWiki for the
> iPhone but it looks specific to BidiX's upload service and has tweaks
> I'm not sure to take out without killing the patient.

Very early on in TiddlyWeb's development I loaded up iTW into a bag,
minus some of the BidiX plugins (keeping the style but getting rid of
the upload functionality), and it "just worked". So I would think,
with some judicious filtering, you could do it again.

tony

unread,
Jul 17, 2009, 2:19:28 AM7/17/09
to TiddlyWeb
On Jul 16, 6:28 pm, Chris Dent <chris.d...@gmail.com> wrote:
> Very early on in TiddlyWeb's development I loaded up iTW into a bag,  
> minus some of the BidiX plugins (keeping the style but getting rid of  
> the upload functionality), and it "just worked". So I would think,  
> with some judicious filtering, you could do it again.

Thanks for the tip, I guess my concern was that I could not find a way
to update the tiddlywiki core in iTW even though it is the closest
thing to Joe Hewitt's iUI [1]

I tried again with iTW, but this time I couldn't get imwiki to work
[2]: NameError: global name 'Store' is not defined

My store was automagically created when I created a bag so I'm not
sure if imwiki is not finding the 'right' store.

I'll keep playing.

Best,
tony

[1] http://www.k10design.net/articles/iui/
[2] $ twanager imwiki iTW.html tww
Traceback (most recent call last):
File "/usr/local/bin/twanager", line 5, in <module>
pkg_resources.run_script('tiddlyweb==0.9.53', 'twanager')
File "/System/Library/Frameworks/Python.framework/Versions/2.5/
Extras/lib/python/pkg_resources.py", line 448, in run_script

File "/System/Library/Frameworks/Python.framework/Versions/2.5/
Extras/lib/python/pkg_resources.py", line 1173, in run_script

File "/usr/local/bin/twanager", line 14, in <module>

File "build/bdist.macosx-10.5-i386/egg/tiddlyweb/manage.py", line
238, in handle
File "build/bdist.macosx-10.5-i386/egg/tiddlywebwiki/twanager.py",
line 9, in imwiki
File "build/bdist.macosx-10.5-i386/egg/tiddlywebwiki/twanager.py",
line 32, in _store
NameError: global name 'Store' is not defined

FND

unread,
Jul 17, 2009, 4:51:24 AM7/17/09
to tidd...@googlegroups.com
> I tried again with iTW, but this time I couldn't get imwiki to work
> [2]: NameError: global name 'Store' is not defined

There was a missing import - should be fixed now:
http://github.com/tiddlyweb/tiddlywebwiki/commit/9d8bd144a4a776e337e2b5557d803d78b5a98835

I guess we should release TWW 0.4 ASAP - hopefully we can do that early
next week.


-- F.

tony

unread,
Jul 22, 2009, 4:08:12 AM7/22/09
to TiddlyWeb
On Jul 16, 1:33 pm, tony <cca...@gmail.com> wrote:
> Looking forward to:
> -tiddlysaver.jar and just TiddlyWiki itself. Saurik's Cydia has some
> java tools like classpath

[OT] I'm done searching through old posts, I leave notes for the next
user to follow:

goal: run tiddlywiki.html with TiddlySaver.jar in /private/var/mobile
(the default home in Cydia unix userland)

prereq:
jailbroken iPod from redsn0w
iPhone/Java 1.0.2474-2 gives user java 1.5.0 and JamVM 1.5.1
file:// Schema in Safari v2.0.2587-1 allows access to file:// from
MobileSafari
unzip - to unzip stuff

test1:
get Tiddlywiki for Safari curl -0 empty.zip http://www.tiddlywiki.com/empty.zip
&& unzip && mv empty.html wiki.thml

result1:
:-) read-only at file://private/var/mobile/wiki.html
:-( no save dialog on hitting done or save changes

test2: edit the .java.policy file
touch .java.policy makes one

add grant codeBase "file://private/var/mobile/
TiddlySaver.jar" {permission.java.security.AllPermission; };
or
grant codeBase "file://private/var/mobile/TiddlySaver.jar" {permission
java.io.FilePermission "${user.home}${/}-", "read,write"; };
from http://trac.tiddlywiki.org/ticket/172

result2: :-( again, nada, just the file://private dialog It's not
possible to save changes. ...

I just can't get that applet going. Another guess is checking
drivers.tiddlySaver in the source.

Oh well, it doesn't help that I don't know what the heck I'm doing :-)
but at least there are more data points for someone's future
reference.

Best,
tony



FND

unread,
Aug 9, 2009, 1:53:02 AM8/9/09
to tidd...@googlegroups.com
> it works on iPhone OS 3.0 thanks to TiddlyWeb

Since I got access to an iPhone[1] now, I gave this a try.

initial setup:
* installed Python (via Cydia)
* installed Setup Tools (via Cydia)
* upgraded Setup Tools (via easy_install)
* installed Subversion (via Cydia)[2]
* installed adv-cmds (via Cydia)[3]
* installed pip (via easy_install) -- this is optional
* installed virtualenv (via pip) -- this is optional[4]
* installed tiddlyweb and tiddlywebwiki (via pip)[5]

instance setup:
$ cd /tmp
$ twanager --load tiddlywebwiki.config instance tweb
$ cd tweb
$ nohup twanager server localhost 8080 &> tweb.log &

accessing instance:
in Safari, open http://localhost:8080 - or directly go to
http://localhost:8080/recipes/default/tiddlers.wiki
(something like cachinghoster might be handy here to save typing)

terminating instance:
$ ps aux | grep twanager | cut -d " " -f 2-8 # returns PID[6]
$ kill <PID>

All shell commands were run via SSH (as root), not using MobileTerminal.
The use of nohup means Backgrounder should not be required.

This works great - apart from the expected UI issues; I might look into
making BidiX's iTW work for this.


-- F.


[1] rant suppressed
[2] apparently the simplejson package is distributed via SVN
[3] this is required for ps, which I use when terminating the instance
[4] virtualenv doesn't actually seem to work ("___VENV_RESTART___ failed
with error code 1") - I had similar issues on Ubuntu, which I fixed by
installing the python-virtualenv package from the repositories instead
of using pip/easy_install - there's no equivalent in Cydia AFAICT
[5] the simplejson C extension could not be compiled - but it works fine
without those speedups
[6] on my Ubuntu system this also returns the PID of the grep command,
though not on the iPhone - also, there's probably a safer way to grab
the PID, but that's secondary since we don't automate the kill

FND

unread,
Aug 9, 2009, 3:49:46 AM8/9/09
to tidd...@googlegroups.com
> I gave this a try

I've added these instructions to TPC:
http://tiddlyweb.peermore.com/wiki/recipes/docs/tiddlers/Installing%20on%20iPhone

Also, there's this tweet*:
"""
after upgrade to TiddlyWeb 0.9.56 and Tiddlywebwiki 0.6 su root no
longer needed! can save TiddlyWiki as user mobile
"""
Tony, can you elaborate on that? I'm not quite sure how the latest
release changes anything in this regard.


-- F.


* http://twitter.com/ccahua/statuses/3193550531

tony

unread,
Aug 9, 2009, 4:42:32 PM8/9/09
to TiddlyWeb
On Aug 9, 12:49 am, FND <F...@gmx.net> wrote:
> > I gave this a try
>

Woot! Awesome, finally someone who knows that they are doing!

Yes, 9600 was right about nohup, but I didn't know how and your clear
explanation worked for me, thank you FND!

I don't have/didn't load ps from Cydia, but luckily the pid was listed
so

to start twanager, i do $nohup twanager server localhost 8080 &
(appending output to nohup.out)
do all the fun tiddlyweb stuff
then a $kill -3 <pid> which showed up as $[1] <pid>

The odd thing was the first couple of times I tried it, MobileTerminal
hung and I had to do the power-home button reset, but passed that so
far so good.

> I've added these instructions to TPC:http://tiddlyweb.peermore.com/wiki/recipes/docs/tiddlers/Installing%2...
>

thank you, thank you! Future reference retained.

> su root no
> longer needed! can save TiddlyWiki as user mobile
> """
> Tony, can you elaborate on that? I'm not quite sure how the latest
> release changes anything in this regard.
>

For some reason around the times of 0.9.50ish and Tiddlywebwiki 0.2,
I'd get a long error when I started twanager server as user mobile. I
had already changed the alpine and dotty(?) passwords for users root
and mobile.

I figured it was because I didn't run as user root so I didn't post it
to the group, so in my procedure to get tiddlyweb going, I added the
command 'su root' to mobile terminal's menu item in misc > config
along with another menu item for twanager server ...

Now that i think about it, probably a bash script for the whole lot
would be more efficient.

Anyway with the start of 0.9.56/0.6, for kicks I tried to see if I
could get that error again running server as mobile and tada! I no
longer have an issue, the CherryPy is served hot and delicious!

I haven't imwiki'd BidiX's iTW, but i look forward to your discoveries
on the UI front along with your well experienced take on the
TiddlyWiki/web/webwiki dev married to all these wonderful Cydia/
Telephoreo tools: git, JamVM, PyObjC, etc..

Once the basic pattern is laid down, Android, mojo webOS, Maemo, and
others will hopefully benefit along with the re-buzz of TiddlyWiki/web/
wiki.

I'm just so happy to see more folks who know something, help us
learning to know something, ya know!

Best regards,
tony

FND

unread,
Aug 10, 2009, 12:27:36 PM8/10/09
to tidd...@googlegroups.com, BidiX
Glad this helps.

> I don't have/didn't load ps from Cydia, but luckily the pid was listed

Well, the job is only being displayed right after starting the process
though, right? What if you want to terminate the process after having
closed the respective terminal session?

> I haven't imwiki'd BidiX's iTW, but i look forward to your discoveries

It looks like getting iTW running on TiddlyWeb is simple - all I had to
do was disable UploadPlugin and UploadTiddlerPlugin (for convenience, I
directly edited the file, adding the "systemConfigDisable" tag).
Then I imported the document into TiddlyWeb, and it just worked.

There was, however, a "backstage.init is not a function" JavaScript
error, originating from the iTWTweaks plugin. Fixing that was as simple
as adding a new single-line plugin (called "iTWTweax" for load order):
backstage.init = function() {};
(CC'd Bidix, as this might be a compatibility issue with newer
TiddlyWiki versions.)

> along with your well experienced take on the
> TiddlyWiki/web/webwiki dev married to all these wonderful Cydia/
> Telephoreo tools: git, JamVM, PyObjC, etc..

Uhm, what? :)

> Once the basic pattern is laid down, Android, mojo webOS, Maemo, and
> others will hopefully benefit along with the re-buzz of TiddlyWiki/web/
> wiki.

Unfortunately, I don't have access to an Android or WebOS device...


-- F.

Reply all
Reply to author
Forward
0 new messages