Notices


Reply
Thread Tools
Posts: 30 | Thanked: 2 times | Joined on Jul 2007
#1
i'm a big fan of david allen's GTD and want to use tiddlywiki as a base for notetaking/daily planning, so with some modification, I ported tiddlywiki for the maemo opera browser using a locally run http/php server - here are my results (works! yay =]), installation instructions and development notes





###INSTALLATION###
1. There are some prereq's for my version of GTD, because it uses php for saving files - go and install these two packages in this order:
http://maemo-hackers.org/php5-fastcgi.install (PHP5)
http://maemo-hackers.org/nginx.install (HTTP Server)
(source: http://www.mail-archive.com/maemo-de.../msg08379.html )
2. Unzip the tiddlywiki of your choice (tiddlywiki_phpsave_v8.zip or gtd_tiddlywiki_phpsave_v2.zip) to /var/www/tw/
3. [EDIT] using the n800 terminal (or ssh) login as root (ssh root@localhost from your n800 or ssh root@your.ip.here from a remote computer) and run "chmod -R 777 /var/www/tw"
4. Use the Mameo-Browser and navigate to http://localhost/tw
5. Enjoy =]

Let me know if you have any installation problems

Quick Notes:
  • yes, i know it take a long time to save
  • if you want to rename your tiddlywiki, you have to change some settings in the html and php files
  • --in index.html search for: "var PHPLoadFile_fileUrl = "empty.html"; //location of your tiddlywiki" and change to your liking
  • --in tw_upload.php search for: "$tiddlywiki_filename = "index.html";" and change to your liking
  • recommended tweaks (goto the backstage)
  • --disable animations
  • --disable keep backup (the php doesn't save the backup as of now)
  • --if you save the file back to your computer (ex: email it to yourself) and save it as a regular file, it should save normally and the backup will work if you enable it





###DEV NOTES###
the vanilla GTD v2.2 is read-only for the maemo-browser because the mameo browser runs through 3 browser independent save methods, one for mozilla, ie, and java - unfortuently, the maemo opera browser supports none of these, therefore i created a plugin that allows you to save one any php-enabled server

first, i tried making a .html that would open a new window that you could save using document.documentElement.innerHTML to get the contents of the document and then apply the same changes as a normal save, but i couldn't get rid of the dirty flag that tiddlywiki implements

second, i tried using the http://tiddlywiki.bidix.info/ plugin for php upload - however, for some reason it doesn't work (i'm guessing mameo's opera is particularly picky about the xmlhttp request)

finally, i decided to take my own shot at a php-saving plugin and voila - here it is - as a disclaimer, i suck at javascript as i just dabble in programming (i'm going to a liberal arts college, geez =P ) so this might not be the most effective way to do it - i'm open to comments, suggestions and your own mods and would really like to see them! =]

random: xmlhttp has an interesting bug where the file sending a GET request can't request its own file, so the redirect.php file is there to well... redirect your GET request basically

oh yea - the linux top results while saving show that the browser takes >90% of cpu while saving and hogs a lot of ram - perhaps one of the better coders could help me cut ram usage and take care of the cpu issue? maybe using and older version of tiddlywiki would help as i don't think i need all the features of 2.2

and if someone wants to try my plugin with another version of tiddlywiki, lemme know how it goes - here're some tips for using my plugin with other tiddlywiki's





###PLUGIN ADAPTATION FOR OTHER TIDDLYWIKI VERSIONS###
-install the plugin as usual (you'll probably want to do this from file:// on your main comp)
-find the
Code:
// Options that can be set in the options panel and/or cookies
config.options = {
and change chkHttpReadOnly to false - this allows us to edit our tiddlywiki from http://localhost/
-find the line that requires the file:// url to save and comment it out
---on the vanilla tiddlywiki v2.2, this is what it looks like after it has been commented with /* and */
Code:
	/*if(originalPath.substr(0,5) != "file:") {
		alert(config.messages.notFileUrlError);
		if(store.tiddlerExists(config.messages.saveInstructions))
			story.displayTiddler(null,config.messages.saveInstructions);
		return;
	}*/
-find the function saveFile and function loadFile and add a call to the PHP plugin
------on the vanilla tiddlywiki v2.2, this is what it looks like after it has been changed (the original only has the mozilla, ie, and java):
Code:
function saveFile(fileUrl,content)
{
	var r = null;
	if(!r)
		r = mozillaSaveFile(fileUrl,content);
	if(!r)
		r = ieSaveFile(fileUrl,content);
	if(!r)
		r = javaSaveFile(fileUrl,content);
	if(!r)
		r = config.macros.PHPSaveFile(fileUrl,content);
	return r;
}

function loadFile(fileUrl)
{
	var r = null;
	if((r == null) || (r == false))
		r = mozillaLoadFile(fileUrl);
	if((r == null) || (r == false))
		r = ieLoadFile(fileUrl);
	if((r == null) || (r == false))
		r = javaLoadFile(fileUrl);
	if((r == null) || (r == false))
		r = config.macros.PHPLoadFile(fileUrl);
	return r;
}

###WHICH TIDDLYWIKI?###
Well, here are some very unscientific benchmarks for the save time of various browsers:

Maemo-Browser
Tiddlywiki v2.2 - >1 minute - renders pages well
GTD Tiddlywiki v1.2.32 - approx 3 sec - renders well

Minimo
Tiddlywiki v2.2 - approx 3-5 sec - some minor page artifacts, works well
GTD Tiddlywiki v1.2.32 - approx 3-5 sec


###ACCESSING LOCALHOST WHEN NOT ONLINE###
the mameo-browser is picky in that i won't let you access browsing features if you're not connected to a network. here's the solution:
http://www.internettablettalk.com/fo...p?t=842&page=2
Attached Files
File Type: zip gtd_tiddlywiki_phpsave_v2.zip (31.6 KB, 229 views)
File Type: zip tiddlywiki_phpsave_v8.zip (67.6 KB, 228 views)

Last edited by ifallacy; 2007-07-09 at 06:27. Reason: minor updates
 

The Following User Says Thank You to ifallacy For This Useful Post:
Posts: 4 | Thanked: 0 times | Joined on Jul 2007
#2
I would love to use this for TiddlyWiki ... which I must say is an excellent product and one I would dearly love to run on my N800.

You mention an Attachment (one assumes to your original post) ... however I cannot find an attachment.

could you attach it in another post, or perhaps email it to me at d.w.johnston [at] gmail [dot] com
 
Posts: 30 | Thanked: 2 times | Joined on Jul 2007
#3
sorry for that - it's attached in the original post now at the very bottom - my bad =]

on another note - has anyone gotten Ruby on Rails and Tracks to work?
http://www.rousette.org.uk/projects/
 
djasmith's Avatar
Posts: 36 | Thanked: 2 times | Joined on May 2007 @ Gillingham, UK
#4
Hey there ifallacy

I managed to get Ruby on Rails setup on my N800, took some doing though

I got RoR installed just to see if Tracks works and it does, I have entered a few actions and a few projects on my N800 installation and best of all I can either use the built in browser to do so or just web into my N800 on port 3000 to login to tracks from my Mac or XP machine

See hear with regards . . .

http://www.digitalknk.com/2007/05/27...ur-nokia-n800/

One word of advice increase your virtual memory to 128 meg if you haven't already. The Ruby install and the Gem update for Rails is all consuming.

I've noticed that when the Rails server is running my tracks install it occupies about 20 meg o ram as well.

Good luck; if you proceed

Ta

Dave
 

The Following User Says Thank You to djasmith For This Useful Post:
Posts: 30 | Thanked: 2 times | Joined on Jul 2007
#5
yea, the ruby on rails install goes a lot smoother for me by just downloading the individual gems and running:
Code:
gem install activesupport-1.4.1.gem --no-rdoc --no-ri && gem install activerecord-1.15.2.gem --no-rdoc --no-ri && gem install actionpack-1.13.2.gem --no-rdoc --no-ri && gem install actionmailer-1.3.2.gem --no-rdoc --no-ri && gem install actionwebservice-1.2.2.gem --no-rdoc --no-ri && gem install rake-0.7.1.gem --no-rdoc --no-ri && gem install rails-1.2.2.gem --no-rdoc --no-ri
so that it doesn't install the documentation (which seems to take forever)

still working on the tracks part though - for some reason the page renders, but it's not letting me in localhost:3000/ with user:admin pass:abracadabra - am i missing something?

EDIT: nevermind, figured it out - should've navigated to localhost:3000/signup

Last edited by ifallacy; 2007-07-04 at 20:43.
 
djasmith's Avatar
Posts: 36 | Thanked: 2 times | Joined on May 2007 @ Gillingham, UK
#6
Excellent

You'll have to let me know how you get on with Tracks on the N800.

I have a love/hate relationship with GTD at the moment.

I am looking to learn some ruby n rails at some point; I gotta find me some time somewhere

time and a bluetooth keyboard for the N800 is a good start methinks. . .

Ta

Dave
 
Posts: 4 | Thanked: 0 times | Joined on Jul 2007
#7
Sadly I am not getting the Tiddlywiki file to save ..

I have Ngix and PHP installed and tested (I can get a phpinfo() report back from a test.php file, which works in the Opera browser and Minimo. so I know the web server is loaded and php is working.

I placed the files into /var/www and incase it was needed I chmod them to 777 basically Read Write and Execute for anyone.

When I try and save the file the Tiddlywiki freezes for a while (which I think is normal given the description about saving time delays above), however when it does come back nothing works (cannot make new entries etc), and when reloaded nothing has been saved.

I wondered if you had any advice or clues as to what might be wrong.
 
Posts: 30 | Thanked: 2 times | Joined on Jul 2007
#8
yea, i forgot to mention to do a "chmod -R 755 /var/www/tw" - good for you for catching it

the freeze is for a long time and i think it's unacceptably long for long term use but you should see the same effect as saving it on a desktop (like you get a little box in the upper right hand corner that says that the file has been saved) because you said that nothing works when it "comes back" i'm guessing it's still saving (because i can still add new tiddlers, edit them, etc) - i don't think that the behavior would vary by n800's (i reflashed mine and it still works after reinstalling php5 and nginx) but you can try editing the source and inserting javascript alert()s along the way (like nubby coders like me do x.x)

i can also upload one of the earlier versions of the script with all my debug alerts (probably won't help you because i'm a very messy coder and there's probablly even commented out alerts in the final version) but if you want it let me know

right now, i'm trying to port GTDTiddlyWiki (http://shared.snapgrid.com/index.html) and i'll let you all know when i get that up

but thanks for reminding me to put the chmod -R 777 /var/www/tw - i'll add
that in the instructions

[EDIT] - sorry, it should be "chmod -R 777 /var/www/tw" (NOT 755) changed in post

Last edited by ifallacy; 2007-07-07 at 03:59.
 
Posts: 474 | Thanked: 30 times | Joined on Jan 2006
#9
Hey ifallacy, you might want to try out MochiKit --- specifically, its Log package. It lets you create a logger pane at the bottom of the screen and write to it quite painlessly --- MUCH better than the alerts for debugging
 
Posts: 30 | Thanked: 2 times | Joined on Jul 2007
#10
###NEW RELEASE###
*Added gtd_tw to original post
**Ported from http://shared.snapgrid.com/index.html
**Features: Much improved save time - whereas the previous save time for tiddlywiki in the maemo-browser was >1 min, the save time on this GTD-oriented tiddlywiki is based on an older version of tiddlywiki and saves MUCH MUCH FASTER (around 3 sec - roughly timed by me counting in my head)
**Install: pretty much the same, make sure to chmod 777 =]

as usual, feedback is appreciated =]

there is one annoying thing that i hope there's an easy fix for (maybe some of you javascript coders could help me out) - for some reason, the text box when you edit a tiddler doesn't allow you to highlight text in this version of tiddlywiki, but the v2.2 tiddlywiki (my first release) allows this

@aleksandyr - i glanced around the site for MochiKit and it looks pretty good with plenty of functionality - i'll be sure to look at it when i have time =]

I was wondering if anyone knew a good way to time javascript execution time - i want to benchmark the two versions in both the minimo browser and maemo-browser and post the results, because although tiddlywiki v2.2 saves quickly in minimo, it takes forever in maemo-browser - i could then also time individual parts of tiddlywiki v2.2 execution and figure out what's slowing it down in maemo-browser

enjoy the new GTD_tw release all =]
 
Reply


 
Forum Jump


All times are GMT. The time now is 00:08.