Fasinator 0.3 – Watcher 0.3 – ICE week

ICE, Mac OS, The Fascinator Desktop, Ubuntu/Linux, Window, iPhone, watcher No Comments

Soo what have I been doing lately?

The Fascinator Desktop
The Fascinator 0.3 Desktop was released 3 weeks ago.

Features implemented in The Fascinator 0.3 Desktop can be found in: http://fascinator.usq.edu.au/trac/wiki/tf2/Version0.3.0

P.S: for new features and enhancements request for The Fascinator 0.4 can be found in: http://fascinator.usq.edu.au/trac/wiki/tf2/Planning

So what are the features have been implemented in The Fascinator Desktop so far? I have compiled and created a simple features page for easy browsing: http://fascinator.usq.edu.au/trac/wiki/tf2/DeveloperNotes/Features

Watcher
Together with The Fascinator 0.3 Desktop, we released Watcher Watcher 0.3beta and 0.3pyinotify, http://fascinator.usq.edu.au/trac/wiki/Watcher

In Watcher 0.3beta, we start to support multi platform File system watcher. Ron Ward developed the watcher code in .NET, thus for linux/Mac OS X users, the same code base can be used through mono

For Watcher 0.3pyinotfy, this will be the last release for Linux that use pyinotify. Why we are not using pyinotify anymore? Basically it’s only work in Linux.

Issue found in both version of Watcher-s: file rename/move from a directory to another directory in Linux/Mac OS X is not working properly. This is a known bugs found in mono, https://bugzilla.novell.com/show_bug.cgi?id=418241 as well as pyinotify http://trac.dbzteam.org/pyinotify/ticket/30.

ICE week
Last week is ICE week. Peter Sefton wrote ICE week background on his blog: http://ptsefton.com/2009/11/25/ice-week-background.htm.

My task was generating eBook plugin for ICE package in ePub format based on the manifest items found in the ICE organiser.
Result? The generated eBook can be viewed in Peter’s Android phone as well as my iPhone. During this development, I encounter a usefull tool to check the validity of the epub structure that I created. This tool can be downloaded from http://code.google.com/p/epubcheck/

I also successfully implement epub generation in The Fascinator Desktop. This feature will be included in The Fascinator 0.4 release. Some note about epub feature in The Fascinator Desktop: http://fascinator.usq.edu.au/trac/wiki/tf2/DeveloperNotes/Features/eBook

I realise that I have been using a lot of links in this blog entry ==”. But maybe it’s for the best instead of duplicating the documentation that I have written in the wiki page. :)

Stay tune!!

funbrain

Linux-FS Watcher for The Fascinator Desktop (Updated)

Firefox, The Fascinator Desktop, Ubuntu/Linux, eResearch, xhtml, xml No Comments

Recently I am involved in The Fascinator Desktop project. Peter Sefton is updated the detail workflow of this project: Desktop Repositories: Smashing up Power point. Part of my involvement is to develop filesystem watcher (Linux and Mac OS watcher).

The Linux FS watcher can be checked-out from http://fascinator.usq.edu.au/svn-auth/code/watcher/tags/0.1. This is a standalone program, thus you can use it directly to monitory your filesystem. The whole application is developed in python.

Dependencies before you run the Linux FS watcher:

  • pyinotify: Note for Ubuntu users: Try to download the pyinotify directly from http://trac.dbzteam.org/pyinotify instead of using ubuntu pyinotify package. And if you have any issue with this library, you can ask for help directly from the website, the support teams are very helpful. I had the issue with renaming a directory once, and their responses are quick! Refer to: http://trac.dbzteam.org/pyinotify/ticket/20.
  • sqlite: This library should be pre-shipped with your ubuntu, if not, you can directly get the package from the package manager. sqlite is used to store all the events happened within the watched directory. The table for the event consists of filePath, event (file deletion or modification), and timestamp when the event is invoked.
  • foresite: (Won’t be needed anymore since it return JSON file instead of atom feed) Download from http://code.google.com/p/foresite-toolkit/. This library is used to generate atom feed requested through web service to provide the list of events stored in the sqlite.

To run the program, go to the watcher directory after you checked-out the code:

  • Modify the config.json configuration file, change the watchDirs to the directory you want to watch. Make sure it’s exist, and try not to watch your home directory. (I have not developed any code to ignore the python object file, thus, when you watch your home directory, your watcher program object file will be added to the database).
    [html]
        "watchDirs" : ["/home/octalina/workspace/watcher/someDir", "/home/octalina/workspace/watcher/modeDir"],

    If you want to run the watcher as a daemon, change the daemon value to True.

    [html]
           "daemon" : "True"
  • Change to app directory and run watcher:
    [html]
           python watcher.py
  • To run the webservice, open another terminal tab and run:
    [html]
           python jsonWebservice.py

To try get the the list of file changes can be done using curl/wget:

[html]
curl localhost:9000

or if date range is specified:

[html]
curl localhost:9000 -H "Last-Modified: Wed, 17 Jun 2009 18:38:12 GMT"