Introducing Tome


I have finally decided upon a name for the aforementioned documentation viewer for Linux that I previewed yesterday:


The rationale being that an existing Linux distro is  Tome of knowledge concerning system documentation, programming documentation etc I have yet to commit the code as I have a very busy schedule, a friend of mine is playing in a bar tonight, in less than an hour in fact, with a 20 minute bike ride and food still to do… However, I am still needing to do a lot but I will upload the code tomorrow night, hopefully i can get my head around  launchpad and “proper development procedures” by then. Of note it would be nice  to get some second opinions/help —first proper app you see— for:

  • Artwork — i can barely draw a circle in Inkscape 😉
  • Internationalisation
  • Code tidying
  • Parsing the “theList.txt”
  • Removing redundant entries

If you want to help drop us a line. I have created a launchpad project and my details should be there and will update it tomorrow night after work!

Also thanks to those behind: Quickly and Acire, I wouldn’t have been able to do something so fast so quickly.

Oh and yeah, here is the obligatory screen shot:


DocView Preview


In recent weeks Ubuntu (or rather Jono Bacon) has been championing the cause of the Opportunistic Developer. As part of that drive, and for a while before, the community has developed several tools to aide the Opportunistic Developer in their goals and aims.  For example:

However one thing that is missing is within this landscape of developer aides is easy to access Developer documentation. That is a single app that presents the opportunistic developer with locally sourced docs that can hopefully help them with their project. To this end I decided to hack together such an application. It is presently called DocView (this is a tentative name) but an offical and proper name will be decided upon once I push the code to launchpad. Currently DocView is a simple python app that uses webkit to view a preselected choice of documentation that exists within the /usr/share/ directories.

Some of you might say:

What about DevHelp!?

DevHelp has pretty much exactly the same goals as my project that is providing developers with access to documentation, however, DevHelp is primarily aimed for GTK and Gnome and works with gtk-doc.  As such it does not include everything that exists within /usr/share , for instance: Doxygen and Java manuals are not included, while Python is. Moreover DevHelp integrates with a few apps such as Anjuta… so there is a bit of overlap. However I wish to keep this project quite simple at the moment.

Currently DocView is less than 2 hours old and is currently looking like this:

There is still a lot of work that still needs to be done on DocView. I still need to iron out several bits and pieces like:

  • How I am going to locate this documentation, currently, it is hardcoded as a list. Something which I want to avoid
  • How to group the items within the tree menu i.e.\ language, doc type
  • How to store the list of docs, CouchDB looks like the way to go.
  • And any other features that may be plausible for such a project.

I am also undecided given the substantial overlap with DevHelp if I should continue with this project. But who knows…

    Customising Komodo Edit’s Colour Scheme


    Komodo Edit is a nice little cross platform text editor for dynamic languages from Active state based upon the XUL framework from Mozilla. I like as it is, among other things, an awesome Python editor. It provides some basic project management features, and some auto-completion and call-tips. The latter of which does become handy ever so often.

    However its default colouring scheme could do with some improvements. Currently it looks like so:

    When I use emacs, I use Gnome 2 as the ‘theme’, for example:

    Emacs Theme Gnome2

    So the other day I took the plunge and created a Gnome2 ‘inspired’ theme for Komodo Edit. As always it is in perpetual development but at the moment it looks just fine. As you can see in image, below:

    I have tweaked some of the colours to improve visibility but on par it makes Komodo Edit look more purdy. One thing to note is that the list of Keywords for Python in Komodo Edit is not as extensive, as that with Emacs 😦 . However after a quick search, I found a post that explained how to add keywords. For Python, just locate the file and add the following code in the constructor of the koPythonLexerLanguageService class:


    And fill in the keywords you want. You can find the colour scheme file and keyword code here.

    My dot Emacs file


    Recently I upgraded to Emacs 23.1, customised some options, saved them and went about my work. However, whenever I used emacs on the command line I was greeted to a greyish background that just did not look like it belonged. And the plain white background was getting a bit old fashioned. So I decided it was high time that I setup my .emacs file amongst others.

    Note: There are a lot of code samples in this post, Facebook removes the style, WordPress does not, Hyves I dunno. So if you want syntax highlighting then goto the wordpress version.

    Remove Gray Backgroun Colour in TTY

    First thing to do is use the Options menu to set most of your options like: font (mijn is DejaVu Sans Mono at 9) use standard copy and paste commands etc. However this will also set a default background and foreground colour scheme, to fix this open ~/.emacs and remove from (custom-set-faces...: , “:background white :foreground black"

    You should have something similar to:

    Generated using GeSHi

    ;; Custom Variables
    (column-number-mode t)
    (cua-mode t nil (cua-base))
    (scroll-bar-mode (quote right))

    (show-paren-mode t)
    (size-indication-mode t)
    (uniquify-buffer-name-style (quote forward) nil (uniquify)))

    (default ((t (:inherit nil :stipple nil :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 88 :width normal :foundry “unknown” :family “DejaVu Sans Mono”)))))

    Misc Stuff

    This is some misc stuff. The following entry shall set the default tab width, stop the splash screen from occurring, write filename into the titlebar and enable markdown mode if you have installed emacs extras i.e. i.e. emacs-goodies-el in ubuntu.

    Generated using GeSHi

    (defvar HOME (expand-file-name “~”))
    (setq EMACS “emacs”)
    (setq HOSTNAME (substring (system-name) 0 (string-match \\.” (system-name))))

    (setq FULLHOSTNAME (system-name))
    (setq USERNAME (getenv “USER”))

    ;; Stop Splash screen

    (setq inhibit-splash-screen t)

    ;; Tab width
    (setq default-tab-width 4)
    (setq-default tab-width 4)

    ;; Write filename into titlebar.
    (setq frame-title-format `(,EMACS “[“USERNAME “@” HOSTNAME “]: “

    (buffer-file-name “%f” (dired-directory dired-directory  “%b”))))

    ;; Add Markdown mode

    (autoload ‘markdown-mode “markdown-mode.el” “Major mode for editing Markdown files” t)
    (setq auto-mode-alist (cons(\\.mdt” . markdown-mode) auto-mode-alist))

    A coloured Emacs

    If you have installed the color-theme package for emacs (i.e. emacs-goodies-el in ubuntu) then you can get some nice themes going. I currently use color-theme-gnome2 for graphical emacs and color-theme-tty-dark when in TTY mode i.e. in a terminal. However gnome2 doesn’t look well when run in the terminal as does tty-dark and vice-versa. The code below ensures that each theme is used when required. A full list of themes can be found be the following command:

    M-x color-theme-select

    The lisp code is:

    Generated using GeSHi

    ;; Add colour theme stuff
    (require ‘color-theme)
    ;; hook: test win sys and rerun color-theme
    (defun test-win-sys(frame)
    (let ((color-theme-is-global nil))

    (select-frame frame)
    (if (window-system frame)(color-theme-gnome2)(color-theme-tty-dark))))

    ;; hook on after-make-frame-functions
    (add-hook ‘after-make-frame-functions ‘test-win-sys)

    ;; default coloue schemes start
    (let ((color-theme-is-global nil))

    (if (window-system)(color-theme-gnome2)(color-theme-tty-dark)))


    [4] The Internet

    My Web Services Installation


    As part of a research project I have gotten to finally play with web services again. For which I have to use the following:

    The instructions bellow are to install on Ubuntu 9.04, yes I still need to upgrade to Karmic but that is for another day.

    Step 1: Install Java (Optional)

    Cannot really remember how I installed OpenJDK, but if I remember its just:

    $ sudo apt-get install openjdk-6-jre openjdk-6-jdk

    Step 2: Tomcat 6

    To install Tomcat 6:

    $ sudo apt-get install tomcat6-admin tomcat6-common tomcat6-user tomcat6-examples tomcat6-docs


    Generated using GeSHi

    <role rolename=“manager”/>
    <role rolename=“admin”/>
    <user username=“admin” password=“helloworld” roles=“manager,admin”/>

    To you your /etc/tomcat/tomcat-users.xml file and voila that is tomcat up and running and accessible from http://localhost:8080 . If not you may need to do:

    $ sudo /etc/init.d/tomcat start

    Step 3: Metro 2.0

    Obtain Metro 2.0 from here and move the webservices-*.jar files into /usr/share/tomcat6/lib/ . You may also want to add both webservices-api.jar and jsr173_api.jar to /usr/lib/jvm/default-java/jre/lib/endorsed . This will ensure that the default jvm, utilises the latest api and thus is in the default classpath. If not ensure that you classpath at least includes the jars placed in /usr/share/tomcat6/lib/ earlier.

    Note: Metro 2.0 does contain a Tomcat6 installer but, I haven’t used it as my steps were developed before it came out.

    References Used