Wednesday, September 30, 2009

ForeCiteNote

I've come to know about TiddlyWiki 3 years ago, when I first began my final year project. I was recommended to use TiddlyWiki as a tool to keep track of my working progress. One of the main advantanges of TiddlyWiki is its portability. Since it's a single HTML file, you can email it, put it on a web server or share it via a USB stick. Besides, users can customize the appearance as well as the behaviour of TiddlyWiki to almost any degree you want.

Back then I thought this tool is quite useful, that's all that was. I didn't know that I'd have to actually modify TiddlyWiki some day. That day started when I began to work on ForeCiteNote (FCN). FCN is a personal digital library system built on top of TiddlyWiki by our research group WING. FCN aims to support beginning researchers, such as advanced undergraduates and beginning graduate students, take notes and synthesize their ideas in their literature search for related work to their projects. FCN supports following features:

  • Create a note that links to a paper,automatically retrieve metadata for that paper from server, allowing access to PDF file, with keywords/references extracted from the paper
  • Organize notes by tagging and assigning what actions to take
  • Ingest PDFs, BIBs or ZIPs of papers
  • Synchronize your notes with server
  • Publish your notes as public or keep them private
  • Locally organize a user's local document storage


Following is a short demonstration of FCN:


Hpricot

As part of my work, I have to work with a large number of XML files. Since my project is implemented using Ruby on Rails, I first used Rexml to process the XML files. However, when dealing with large XML files, Rexml takes quite long a time to process. Thus, I switched to Hpricot . Though Hpricot is originally written to do HTML parsing, it turns out to be capable of working with XML also. It suits my need in traversing through the XML document and extracting values using XPath queries. Besides, it does help to improve the speed tremendously as compared to Rexml.


However, while using Hpricot, I encountered this error

TypeError: can't convert nil into String from /usr/local/lib/ruby/gems/1.8/gems/hpricot-0.6/lib/hpricot/parse.rb:51:in `scan'


As what I've found in this post, this is a known error, Hpricot can’t handle files whose size is multiple of 16384 bytes. The fix is to add some extra bytes to your "special-sized" files

echo " " >> special_sized_file

Firefox extension

Basic reading for how to develop Firefox extensions can be found here.

Starting my work log today ...

...to keep track of what I've learnt during my working time as a research assistant at National University of Singapore (NUS).