Re: [Tracker] Tomboy integration



Thanks, Ivan.

I have found the following pieces of code that need to be changed/added
to add another type. I can see your point concerning the necessary
changes of tracker source code to add additional types to tracker ;-)

* trackerd/tracker-utils.h *
- additional type in FileTypes
- additional status in IndexStatus

* trackerd/trackerd.c *
- process_files_thread()
        - add additional "case" (according to IndexStatus) to switch-statement:
add directory that needs to be indexed
- index_entity()
        - add additional "else"-case that calls new tracker_db-funtion
(tracker_db_index_notes())
        
* trackerd/tracker-db.c *
- new function tracker_db_index_notes()
        - calls tracker_db_infex_file
- tracker_db_infex_file()
        - change service lists at beginning: add file type where necessary

        
With these changes, tracker knows the new service and which directory it
has to scan. After that, I'd like to tell tracker how to index the
Tomboy files in this directory.

I know that tracker differentiates between the meta data and the
contents of a file. It shouldn't be a problem for me to add another file
to tracker-extract that extracts the available meta data from a Tomboy
note (title, tags, ...).

But I am not sure where I have to put the information about how to index
the *contents* of a file. Which files are responsible for this task?

Dustin


Ivan Frade wrote:
Hi Dustin,

 I think it is great idea. Feel free to work on it ;)

I think that this is a solvable task (Beagle already does it) and would
like to help integrating Tomboy. Since both projects are new to me, I
would like to hear your opinion on how complex the integration would be.
Do you think a Tracker newbie can handle this? :)

 It would be great to add such functionality without modifying tracker
source code, but at the moment it is not possible. 

 I think you should:

1) Add a new category in tracker for TomboyNotes
2) Index the contents of .tomboy directory under that category
3) Apply an special filter for Tomboy notes (<- This the difficult point
because the filter is chosen by mimetype)

 For 1) and 2) follow the example of "WebHistory" category. 

 Give it a try, and if you need some help, dont hesitate to ask in the
mail list,

Thanks,
Dustin

Ivan






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]