Wednesday 15 August 2007

Epiphany Extension Finsished , Call For Test

I have finished the epiphany extension for beagle. It is written in python now.
You can follow the instruction in wiki to install and test.
What the extension does:
  • auto index (regular expression based filter)
  • on-demand index (current page or linked page/file)
  • prompt for keyword when on-demand index
  • i18n support (using gettext)
There are some problems not solved yet.
  • Currently, there is no UI to edit config , you have to edit config file by hand . But the format is simple , you can have a look at this.
  • It still have some problems in content-type detective. E
    ven for loaded pages , epiphany only tell us the page is "HTML" ,"XML","IMAGE", or "OTHER". It's hard to decide the correct content type.
  • UI is simple . All pure-text menu items . I should use some icons.

Tuesday 7 August 2007

index firefox bookmarks

A few days ago,Debajyoti suggest me to add bookmark index support in firefox extension.
And now the firefox extension can inex the bookmarks.(Just check out the latest code)
FF have many kind of bookmarks. we only index the ordinary ones.
(Livebookmark is not indexed)
What will be indexed (for a bookmark):
  • the name of bookmark (it is the page title by default)
  • the url
  • shortcut url (or keywords) if any
  • description if any
  • the path . The name of parent folder and parent of parent folder,........
  • and we use the hit type "firefoxbookmark"
How?
We just using
deep first traverse on the bookmark tree ( in fact it is RDF data source). check every bookmark and index it if it is modified(or added) since last index. And in the end we update the last-index-date .

When?
  • every time when menu item "bookmarks->index the modified bookmarks" clicked
  • when the browser window is closed. (you can turn it off)
  • It is advised that you do an initial index by hand (click the menu item)after you install the extension .
Known issues
  • Every time FF 's livemark is updated , the modified time is changed.
    But it doesn't change any thing we indexed.
  • It would be better if you index them when firefox exits instead of window close. But the environment we need no longer exists when FF exits.

Epipahny extension for beagle

This extension is in python now.

Install
  1. download the files from http://browser-extension-for-beagle.googlecode.com/svn/trunk/py-epiphany-extension/
  2. put them in ~/.gnome2/epiphany/extensions/
  3. create beagleIndexer.conf in the folder. ( beagleIndexer.conf.sample is a good example)
Usage
  • index current page by menu item Tools->beagle->index this page
  • toggle auto index by menu item Tools->beagle->auto index
Configure File

The config file is a python file itself. It's name must be "beagleIndexer.conf" and located in ~/.gnome2/epiphany/extensions/

table of configure items
name possible value description
auto_index True / False auto index when page is loaded or not
default_index True / False index the page when the url did not match any rule in blacklist or whitelist or not
white_list_first True / False whether to index the page when the url matches both rules in blacklist or whitelist or not
index_https True / False index https page or not
black_list a python list of regular expressions black list
white_list a python list of regular expressions white list

You can find a sample config file here.

Sunday 15 July 2007

The implement of "Index This Link"

The browser element : A frame which is expected to contain a view of a Web document.
(From http://www.xulplanet.com/references/elemref/ref_browser.html)
In firefox extension we usually use this element to load an document in the background.
I implement "Index This Link" using browser element.
How ?
  1. When the menu item is clicked , we
    • get the link URL
    • open a new window chrome://newbeagle/content/indexLink.xul , and pass URL and current window element as arguments
  2. When chrome://newbeagle/content/indexLink.xul is loaded.
    • init beagleInvisibleBrowser with opener. (the window which this window)
    • load the passed URL
  3. once the URL is loaded.
    • call winodw.opener.beagle.indexIt with the load document .
In this way, the linked document is indexed just like I loaded it in a new tab , and then "index this page ".
Another problem , why open a new window ?
  • We can't put a browser element in the status bar / toolbar or any other place using overlay. So We have put open a new window , and put a browser element in it . (not visible,of course).
  • We should let user know that we are downloading something. And also it may take some time , We must allow the user to see the process and cancel it .

Sunday 27 May 2007

Coding time is coming!

Tomorrow is May, 28th. Coding time is coming.
What I have already done:
  • Preference Window design and implement
  • exclude / include rule design (domain,wild card and regular expression)
  • preference save / load implement ( using json format)
What to do next (in next week):
  • Other UI design and implement (context menu,toolbar/status bar icon)
  • index html pages
  • make it runable (pack it as XPI)

Wednesday 18 April 2007

The preferences window

The preferences dialog.



And the add pattern dialog

Some graphs

Not UML , not MindMap. Just some graphs.