Peter's Blog

Redefining the Impossible

Items filed under bonsai


bonsai is an outliner application for palm computers.


Filed under: bonsai

Add a comment

I like the concept of outliners, previously I used Bonsai but today I've been giving The Vim Outliner a try. It works as a very simple markup language and then adds syntax highlighting to make headers more visible. For example:

This is a Heading.
   This is a Subheading.
        | This is some text within the subheading.
        | Blah Blah Blah Blah
   This is another subheading
        | More plain text.
        | Blah Blah Blah

gets displayed like this:

This is a Heading.
    This is a Subheading.
        | This is some text within the subheading.
        | Blah Blah Blah Blah
    This is another subheading
        | More plain text.
        | Blah Blah Blah

(notice how I can use Vim's built-in syntax highlighting to html conversion to generate this).

This makes outlining in VIM very easy and the syntax highlighting helps readability a great deal. TVL defines some useful shortcut keys such as - and + to fold and unfold sections easily. The outline text is stored in .otl files and Vim's file type system automatically applies the outlining features to these files when they are opened.

I find it interesting to compare what is effectively a new markup language with other markup languages I have encountered such as reStructuredText and indeed I am writing this using my Wilki Module which is another markup language. These have all used markup on the headers and plain body text but in TVO the body text is both marked with a '|' character and the headers are plain text. This would make TVO files tedious to type except Vim has been set up to automatically insert the indents and the '|' character so it is easy to type away as normal.

Markup languages are most useful when they can be easily converted into other formats. The Vim Outliner comes with an otl to html converter written in Ruby (python ripoff programming language named after a Kenny Rogers song about a prostitute). It is not hard to do simplistic conversion in python:

   1  #
   2  # otl2html.py: convert .otl files to html
   3  #
   4  import re
   5  
   6  oREIndent = re.compile( '^(\s*)(\|\s)?(.*)')
   7  
   8  nHeaderStack = [ 0]
   9  nTextIndent = None
  10  
  11  for strLine in open( r'c:\tmp\try2.otl').readlines():
  12    oMatch = oREIndent.match( strLine)
  13    if oMatch:
  14      strIndent = oMatch.group(1)
  15      strTextLeader = oMatch.group(2)
  16      strText = oMatch.group(3)
  17    else:
  18      strIndent = ''
  19      strTextLeader = ''
  20      strText = strLine
  21    if strTextLeader != None:
  22      #
  23      # This is a text block
  24      #
  25      if nTextIndent == None:
  26        nTextIndent = len( strTextLeader.expandtabs(4))
  27        print "<p>"
  28      else:
  29        strText = (strTextLeader + strText)[nTextIndent:]
  30      print strText
  31    else:
  32      #
  33      # Dealing with header
  34      #
  35  
  36      #
  37      # Terminate text block.
  38      #
  39      if nTextIndent != None:
  40        print "</p>"
  41        nTextIndent = None
  42  
  43      #
  44      # Lets assume it's me and a tab = 4 spaces
  45      #
  46      nIndent = len( strIndent.expandtabs(4))
  47      while nHeaderStack[-1] > nIndent:
  48        nHeaderStack.pop()
  49      if nHeaderStack[0] < nIndent:
  50        nHeaderStack.append( nIndent)
  51      print '<h%d>%s</h%d>' % (len(nHeaderStack), strText, len(nHeaderStack))

Add a comment

Been playing with Radio Userland. It is a mixed bag of things:

  • a local web server, driving the main application through a web browser

  • a blogging tool. Type a post in a box and publish. It gets uploaded to Userland's servers and there it is.

  • a news aggregator, it aggregates RSS feeds for perusal through the browser

  • Content Management System: put files in directorys and they get rendered and uploaded automatically.

  • Scripting tool

  • Outliner

Good points:

  • Easy blogging for newbies

  • Can email it to post blogs

  • Easy to knock up a web site

  • The outliner has neat features like linking to web pages or other outlines which can be opened in place.

  • It is heavily scripte.

Bad points:

  • I had to reinstall it because the upload got broke

  • The scripting language is clean but it's no Python

  • The outliner is not nice to use. It is a fairly crude app by modern windows standards. Bonsai is far nicer to write in.

  • The outliner is used to edit the system scripts: no syntax highlighting and all nodes collapsed by default. I find this hard to read. I miss Vim.

  • Their web servers can be very slow: uploads can time out.

  • Uploading is all done automatically in the background so you have to keep looking at an events page to see if it has worked.

My head says dump it but something in my heart wants me to keep it. If it ran on linux I probably would.


Add a comment

Installed all palm stuff on laptop. Seems like an easier way to do daily syncs and blog updates than firing up the desktop pc. All palm stuff means:

  • Palm Desktop

  • Bluetooth dongle

  • DayNotez

  • DayNotes Desktop beta

  • Bonsai

  • ISoloX

  • Turic ISolo links

I killed the install of documents-to-go and I deleted all the stuff from the install folder that palm was going to install for the umpteenth time. It still took ages to get the HotSync to calm down, to get it so that it only did what was necessary. The first two syncs took a long tme because bluetooth hotsyncs are slow anyway and because it had to backup 12M or so of stuff from the palm.

When it came to downloading Bonsai I found it was a new point release. Haven't looked to see if there are any new goodies yet.

Got an email to say there was a new version of BackupBuddyVFS out but the changes appear to be for palms with big rotating screens.


Add a comment

Must copy BackupBudddyVFS backups to PC. I have a lot of licence keys I don't want to lose:

  • Zlauncher

  • TomeRaider

  • DayNotez

  • Bonsai

  • DateBk5

  • BackupBuddyVFS

  • ISilo


Filed under: bonsai daynotez

Add a comment

Mozilla still won't boot. Installed FireFox (was FireBird) and it seems ok. I miss the Mozilla download manager. I was fiddling with FireFox's equivalent during a download and managed to break it hard. FireFox would not boot, just sat in task manager. I fixed it by creating a new profile.

I did some hacks to do things like highlight the active tab better. There are some nice possibilities in the online tips.

Reinstalled Palm, Bonsai, DayNotez on main PC.


Filed under: bonsai daynotez firefox palm

Add a comment

New point release of Bonsai is out, 3.0.2. Installing now.

My palm charge/sync cable is refusing to work today. It is very poor quality but I need something like it.


Filed under: bonsai palm

Add a comment

Must add, I gave Bonsai 3 a workout, taking meeting notes and I had no problems. I was careful, only editing on PC or HandHeld between syncs, backing up before sync etc but there were no problems.

Also, I registered DateBk5 and BackupBuddyVFS today. I cannot imagine life without DateBk5.


Filed under: bonsai

Add a comment

Tried my method of breaking Bonsai and it passed. I'll trust it again.


Filed under: bonsai

Add a comment

It transpired that a new version of bonsai has been released, not a beta. I've installed it and it's gone well but I haven't tried my test on it yet. The new desktop app looks good.


Filed under: bonsai

Add a comment