Name:

I am too lazy to type abou myse

Monday, August 29, 2005

K Label Browser Report for Google SOC

REPORT

1. Name: Ramakrishna R
2. Project: K Label Browser
3. Mentoring Organization: KDE
(http://developer.kde.org/summerofcode/)
4. Project proposal:
http://developer.kde.org/summerofcode/labelbrowser.html
5. Project Source:
http://websvn.kde.org/trunk/playground/base/klabelbrowser/
6.API documentation: apidocs
http://www.englishbreakfastnetwork.org/apidocs/playground-base-apidocs/klabelbrowser/html/index.html
7. Mentors:
* Cornelius Schumacher
* Aaron Seigo
* Michael Brade
8. Library License: LGPL
9. Applications License : GPL

Brief Introduction:

K Label Browser is a new concept for files and links management(similar to gmail labels for mails). Any file or link can be labelled with one or more labels. Examples for labels could be "important", "ebooks", "personal", "reports". It is much better experience than hierarchical browsing where a particular file can be placed just under one directory path. Here you get the flexibility of classifying files and links to more than one category. For example a file may be classified as personal as well as important. Will you place it in folder "important" or folder "personal". Now you can just label the file with both labels and forget where the file actually is present.
I have also implemented api supporting automatic labelling files based on content and keywords associated with a label. Autolabel is a proof of concept implementation for automatically labelling text files based on content. For example a file with your name in its content is automatically labeled as 'your name' by the autolabel utility. A lot of other features have been implemented for easy management of labels.
Also the api provided here can be used creatively by other applications for a novel experience. For example a cd indexing utility can label the files with cd ID and this label can be made hidden from user. The comment facility is also provided by the api, wherein Label colour, label icon, etc can be stored for better view bu other applications.

1.API: Implemented methods
source:
http://websvn.kde.org/trunk/playground/base/klabelbrowser/
Namespace: KLB
(http://www.englishbreakfastnetwork.org/apidocs/playground-base-apidocs/klabelbrowser/html/namespaces.html)
1. createLabel() : KLB::LabelManager
This function is used to create a new Label name.
2. applyLabel() : KLB::LabelManager
Associate given label to given path.
3. deleteLabel() : KLB::LabelManager
This function is used to delete a label.
4. removeLabel() : KLB::LabelManager
Deassociate given label to given path.
5. renameLabel() : KLB::LabelManager
rename label
6. getLabels() : KLB::LabelManager
This function is used to retrieve the absolute paths for a given label name.
7. getAllLabels() : KLB::LabelManager
This function is used to retrieve all the Labels applied for a particular file or link.
8. getPaths() : KLB::LabelManager
This function is used to retrieve the absolute paths for a given label name.
9. addKeywords() : KLB::LabelManager
This function is used to associate keywords with a particular label.
10. scanKeywordsAndAutomaticApply() :
This function is used to automatatically apply label to a file based on the content.
11. getAllXML() :
This function is used to get the entire information in bulk in XML format.
Can be used by other applications to get all information in a single shot.
12. searchLabels() :
This function is used to search for links for which a combination of labels apply.
Currently "and" and "or" operators are supported

2. Sample Applications using the above API
1. CommandLine Utilities:
a. Apply Label
source:
http://websvn.kde.org/trunk/playground/base/klabelbrowser/sampleApplications/ApplyLabelCommandLineUtility/
b. Get All Labels
source:
http://websvn.kde.org/trunk/playground/base/klabelbrowser/sampleApplications/getAllLabelsCommandLineUtility/
c. Proof of concept application
Autolabel:
source:
http://websvn.kde.org/trunk/playground/base/klabelbrowser/AutoLabel/

2. Konqueror Popup menu Plugin in C++
Dynamically loads the current labels present on right click in Konqueror window and can be applied to any file or link displayed in Konqueror.

3. KIOSLAVE:
protocol name: klb
home page: klb:/
supports:
a. creation of new labels.
b. application of labels to paths.
c. Search operation using and and or operators.
d. Pages have clickable links to other labels and paths.
e. Html forms available for easy usage rather than typing the url.
f. Links to all labels and files associated with each Label in view mode.

5. AutoLabel Konqueror Service Menu
Uses Autolabel utility to automatically label text files based keywords present in the file and associations with labels

6. Konqueror ToolBar Plugin for search bar where queries for searching of labels can be directly fed.

7. Konqueror Menu plugin for some shortcuts for label browsing.

8. The backend is implemented in mysql using c++ libraries for better storage and faster retrieval. A small shel script for creating user in mysql and database setup is handled by the api when used for the first time.

9. The api is documented according to format accepted by doxygen.

10. The api also has other support like hiding of labels and comments for labels.

Other details:
The usage of these api has been shown in test.cpp as well as in the sample applications. The small command line utilities implemented demonstrates how easy it is to use these API. The database has been designed to allow minimal redundancy of storage. The use of MySql allows us to have a better storage and faster query processing. This also allows us to implement complex queries in future. This API could also be used by indexing applications like Tenor with minimal addons.

Thanks to Google Soc, KDE and very important my
mentors at KDE. It was a great experience this summer.

Ramakrishna R
coolrama@gmail.com