really tenacious guy

Tomblog Note Publishing

Update (2011-09-16): At the moment the example web site is down. A number of users of Ubuntu One are unable to access CouchDB service due to poor CouchDB performance. The team is working on bringing additional hardware. If you are among the first 475000 users of Ubuntu One then this script will not work.

You may be interested in this if you:

  1. are using Tomboy or Gnote* to store your notes;
  2. want to publish your note easily

Well, it is not that far away from now. I’ve spent this weekend building a simple yet useful django application called tomblog.

First of all the idea to publish the notes from Ubuntu One is not new but at the moment this is not possible via the official web interface. Since CouchDB HTTP access is open for everyone with correct credentials, this is pretty easy to do as a 3rd party service.

Screenshot

Installation notes

The project is quite new and it is currently a single-user installation. You can grab the code from lp:tomblog. It is easy to add Disqus-powered comments too, there is a JS code snippet in the template for that.

Please note that the code will allow displaying any note you have stored in your Ubuntu One database if the note UUID is known. The code will create links to the notes only if the target note is published, though.

In order to run tomblog on your server you will need to fill in your OAUTH_* credentials in settings-example.py and rename it to settings.py (I just took ones from my keyring), configure the templates dir, create the corresponding CouchDB views from data/views.js, install the following:

  • python-oauth
  • python-django
  • python-lxml
create the django wsgi application and configure apache server. As you see there is a lot of manual work currently but I plan to enable the service to be available for every Ubuntu One subscriber as a third party application utilizing Ubuntu One/CouchDB API.

Under the hood

When you sync your Tomboy notes with Ubuntu One server, the notes are stored in CouchDB on the server side.

This web application is basically a http client which fetches your notes tagged with some specific tag (in my case - Tomboy notebook called "Publish"), performs XML to HTML conversion and displays the published note.

It uses my OAuth token to retrieve the documents and my token can only be used with my CouchDB databases.

Live Example

The current trunk is running on notes.rtg.in.ua and looks to be pretty working. Drop me a comment if you find this idea useful too.

* GNote is not currently syncing using Snowy protocol. There is a script to sync GNote notes to local CouchDB called gussie, you can grab it from lp:~rye/+junk/gussie.

Comments