Skip to content

For developers

arvindkhadri edited this page Mar 11, 2011 · 4 revisions

The alipi-proto uses Javascript and Python. Python is for the server side computing, which basically parses an HTML and does the re-narration by looking up a mapping. Javascript is the crux of extension. The alipi-proto is two folders "ffext" and "wsgi". The "ffext" contains extension related files. Inside ffext we can see "chrome", "chrome.manifest" and "install.rdf". "chrome.manifest" is a manifestation file which tells Firefox where the overlay '[1] is. More about chrome.manifest, here '[2]. "install.rdf" is an RDF which has various installation related information, like the version, creator, whether the xtension is for firefox or thunderbird and things like that '[3].
The chrome folder consists of three sub-folders, viz content, locale and skin. The names are self explanatory. The content folder contains the XUL bindings and the Javascript functions related to an element. The "ff-overlay.xul" contains the toolbar button, the related function can be seen at "overlay.js". At the time of this writing the authoring tool is in progress, the authoring tool would be a sidebar, so a new "sidebar.xul" would be seen later. The locale folder by default has en-US, this folder contains the "DTD" file. The .dtd contains entity declarations for a menu/button. If a developer wants to support multiple languages he/she must create a folder specific to that language inside "locale" and then put the required files inside that. The skin folder contains all the required CSS a developer wants to have for his/her extension's entity.
A more detailed description of the XUL structure is here '[4].

Python in alipi-proto, as stated above, is used for narration selection for alternative renditions. Python scripts which are used can be seen in "wsgi" folder. There are two files, test.wsgi and menu.wsgi. The menu.wsgi script when contacted returns all the available langauages of re-narration of the page one is visiting. The list is populated on a drop-down menu in the toolbar button. The test.wsgi is used to change the content based upon the user-input. So if a person who is on say "http://a11y.in/a11ypi/idea/firesafety.html" chooses "lang.hi" from the drop down, test.wsgi will substitute the available alternative narratives for that page.

WSGI stands for Web Server Gateway Interface '[5].
For more information check out Janastu '[6].

[1]: https://developer.mozilla.org/en/xul_overlays
[2]: https://developer.mozilla.org/en/Chrome_Registration
[3]: https://developer.mozilla.org/en/install_manifests
[4]: https://developer.mozilla.org/en/XUL_Tutorial/XUL_Structure
[5]: http://wsgi.org/wsgi/
[6]: http://alipi.janastu.org

Clone this wiki locally