| WebSeitz/wikilog |
| Wiki On Zaurus |
|
| last edited by BillSeitz on Jul 20, 2008 7:53 am |
Goal: run the same PyThon-based Wiki Engine on my IBook and my Sharp Zaurus, then set up some Data Synch routintes...
July'2005
Decided to go with this PyThon distribution, and grab the core, net-client, and net-server chunks.
here's some discussion of alternatives...
installed core with no problem, and ran it. Excellent.
installed net-client - it gave me a warning about now having io and mime, which also leads me to math, etc.
Tried to run [Simple Http Server], but got error which makes it clear I'm missing linecache.py. Blech that's not in this distribution for [Sharp Rom] Zaurus, it's in another distribution from the same guy... How easy is it going to be to just sneak that module over?
copied linecache.py over. Now no string.py! After that, no shutil.py.
Now when run get "serving on 0.0.0.0 port 8000"
bring up Opera, go to that URI
I get a directory listing! I pick a python file, and I get to see it.
I make 2 HTML pages that link to each other (using full-qualified URI-s so I know it's not just using the file: protocol), copy them over. Can load one, then follow link to the other, follow link back again! See title, bold, color links, etc.!
Next:
make real subclass of [Simple Http Server] to handle a real directory?
or jump right to some existing Wiki Engine?
some notes on [Simple Http Server]
better way to launch?
Bruce Eckel mentions it but says it only support HttpGet which doesn't seem correct given some other mentions I've seen...
Moin Moin seems to be able to run just on PyThon, but documentation may not be current/consistent. Also concerned it may be too much for this little machine....
Karigell apparently is build on [Simple Http Server] and includes a Wiki Engine. (Though, given that it's a Python Web Framework, there may be more junk in there than I want...)
or maybe use [Cgi Http Server] with one of the Wikiengine-s that use CGI.
there's a super-lite approach using [WyPy] and [Cgi Http Server] and [Basic Http Server] - that might be most promising
had to copy some more stuff over, plus hack a little code to get the sre Regular Expression module working
now getting empty page but no error message, ugh how fun to debug that
switched to slightly longer version mentioned in the original reference.
Then needed to change the permissions on the file, tweak the uri in the same way, etc.
starting to work!
doesn't seem to be rendering links for Wiki Name-s!
doesn't seem to actually remember the page contents - if you reload you still see the contents, but if you hit Edit you get an empty textarea.
Opera died from lack of memory.
restarted Opera, tried again, had a tiny bit more success but still pretty bad...
I hacked a few pages via a text editor; backlinks even give me a list, except I'm just seeing the raw markup version rather than the pretty html. Not getting any good HTML at all - even simple paragraphs aren't getting separated. (Lack of [View Source] in this Opera is really annoying.) 
got the same code running on MacOsX. Works just right, rendering links, etc. At some point realized I had put some linebreaks in place where there were semi-colons, then realized that some of those weren't end-lines, but were hard constants within other stuff, so undid all that. But when I looked more closely at the version on the Zaurus, that one looked fine. Actually I went back and tweaked the linebreaks again anyway for a little bit of readability - have both platforms the same, and the Mac is running fine. Still half-working on Zaurus.
now thinking there's no point in hacking on this approach, given that the Smart Ascii is so non-smart. Will start to play with some different Wiki Engine-s. I'd just jump to Moin Moin, but (a) I'm pretty sure I hate its Smart Ascii, and (b) it smells loverly big-complicated.....
Got Piki Piki Wiki Engine running easily, but hate the Smart Ascii it shares with Moin Moin. But maybe I should live with it for the sake of Wiki Standards...
get it running on MacOsX first. A few oddities with page loads, esp when using '/ instead of ?' as delimiter.
Install Piki Piki on Sharp Zaurus.
get "can't work out query" page back - huh that means the Regular Expression check against the page-name isn't working.
so I hack out that code and just pass the page contents without checking whether it's a valid Wiki Name. I get the page contents, but without any of the HTML rendering! Just like in [WyPy]!
So now I'm thinking that the Regular Expression library on the Sharp Zaurus is seriously not working or something (though it's not throwing off an exception, just never matching anything). I wonder if there's a Unit Test in there or something?
Aug'2005 - try to fix things
remove re* and sre* from Zaurus
go back to source of feeds, grab the re library. Suspect I did something weird last time, maybe took from the non-[Sharp Rom] distribution, because now get demand for strold library, so I add that.
put back in the original Piki Piki. Find I have to rename the script from plain piki to piki.py.
It's working!
But getting some strange results after editing. Sometimes clicking on an existing-page link, I'll get an edit form. I suspect it's some weird caching-effect... actually tweaking the code to pass the page-name as an argument (via '? instead of just /') seemed to help a lot
But I am having cache problems which cause pages not to show their changes unless I Reload (even an edit form!), which is very frustrating.
Despite the cache issue, have moved all my To Do List-s over into WiKi. Success! 
Aug11'2005
tweak Regular Expression-s to handle my variants on Wiki Word rules (can have consecutive caps and acronyms, include numbers anywhere in name except 1st char), plus decide to use double-brackets for a different patterns matching the [BlogBit] naming convention I use here.
all working, except the Recent Changes shows blank. Need to look at edit log
ah, I think the issue is that double-brackets was already used for macros calls - so need a different [Free Links] delimiter (I'm not doing full [Free Links], I mainly want a variant that's like a date-stamp like I do on ZWiki for [Blog Bits]).
single-brackets - no, I like to use that in body text sometimes.
bracket plus quotes? MoinMoin:HelpOnPageCreation (just used to allow spaces in names, not necessarily special chars)
double-parens? bracket-plus-paren?
actually, the double-parens might not be bad, as on the Sharp Zaurus Key Board it doesn't smell easy to make those brackets anyway....
settled on bracket-plus-quote - thought it was breaking the WordIndex macro, but the real problem was I was mixing tabs and spaces (haven't gotten that worked out yet in JEdit), so that's cool
also inclined to move [BlogBit] pattern to starting straight with year-number, rather than with leading z like I do in ZWiki. Though not quite comfortable with that decision, just because of potential for cross-compatibility...
Aug29'2005
everything looking pretty good (on code running on MacOsX - will need to roll out to Sharp Zaurus next)
though realized that Recent Changes in this code is case-insensitive and not careful about checking just for whole-words, so get some false-positive matches. Example: I was playing with ATT as acronym page, and [Back Link] led me to one page containing "attached" and another containing "formatted". Argh.
But probably not a priority for now (for more typical Wiki Word-s it's probably more of a feature than a bug).
but this would be a problem if it was the basis for a Touch Graph view.
Aug30
trying to fix OperA caching problem - success!
found config file in /home/root/.opera/
edited per this doc - setting Docs Modification=1 was key
Aug31
try playing around with various MacOsX ways to GUI mount an FTP. I figured that would be interactive enough that I wouldn't end up needing to write any synch code...
unfortunately none of them seem to work - they take forever to prompt me for an id/password, then they fail, etc.
back to Command Line
open Terminal window
cd to IBook directory where I want to work
FTP, open connection to Sharp Zaurus
cd to Zaurus directory where I want to work
then do FTP commands - put, get, etc.
Sept'2005 - Converting [Palm Pilot] notes to Wiki pages
I have old notes going back to 1998 or so. Various conversion processes led me to have a text file for each old folder/category, with all the notes for the category dumped together (with a clear separator, etc.).
Heh, actually wrote my first PyThon class from scratch.
Some issues that came up
did some clean-up of text in JEdit before conversion (dashes into *, correct line breaks and spacing for bullet lists, etc.)
a single-word Subject/firstLine for a note doesn't make a nice Wiki Word, so have to review list of pages generated, find those cases, and go tweak the source document
I didn't even have unique names for notes within a category sometimes, so have to review and tweak, etc.
if I already named a note with a Wiki Word, then using PyThon's title function wipes out the mid-caps. So I have to write my own function to change cases in the ways I want to...
I tend to often name notes with a topic followed by a 6-dig yymmdd - I should probably convert these to use my "zyyyy-mm-dd-title" format...
I definitely have an issue with names duplicated across different contexts (Name Space) - e.g. if I'm thinking about multiple possible StartUp-s then each one might have its own Elevator Pitch page. What am I going to do about that?
prefix each with context name: [Business One Elevator Pitch], [Business Two Elevator Pitch] - blech long names; but maybe easiest solution if not many names will get used in multiple contexts. Short-term hack taken.
use Sub Pages features that some Wiki Engines have (does Piki Piki do that? Nope.). You can more easily link back-up to pages in the main namespace, and you get a single integrated Recent Changes view.
make multiple spaces:
probably best idea, given potential for writing lots of spec pages, etc. - though will probably have some transition process where new ideas will start in the root/core, then become their own spaces.
how accomplish this?
multiple copies of scripts
some change to the Web Server stub
some change to Piki Piki
ugh I'm too lazy for these steps I think.
Feel like I need to think in the bigger picture - what happens in a WikiWeb with everyone having lots of wikis of varying types...
Oct20'2005 update
realized I need to wrap blog-bit listing pages in bracket-dblquote to make them link - just did it by hand for now
argh Sharp Zaurus FTP doesn't support mget so it's going to be a huge pain to get files back from the zaurus to the IBook! (At least mput works, since it's driven from the MacOsX side) so I could dump a few hundred notes onto the Z.)
Apr'2007
just realized I can use the Wiki On Zaurus from my IBook (screen/keyboard). http://192.168.129.201:8000/piki.py?FrontPage
this might be the basis of some Data Synch opportunity...
| See Back Links: Wiki As Pim | Wiki On Zaurus | Mind Map As To Do List | Personal Network Architecture | Sharp Zaurus | z2005-08-09- Wiki On Zaurus Success | |
| User Options Recent Changes Help Page |