Re: [Tracker] Tomboy note extractor
- From: "Mikkel Kamstrup Erlandsen" <mikkel kamstrup gmail com>
- To: "Jamie McCracken" <jamiemcc blueyonder co uk>
- Cc: Tracker List <tracker-list gnome org>
- Subject: Re: [Tracker] Tomboy note extractor
- Date: Sat, 18 Nov 2006 01:02:50 +0100
2006/11/17, Jamie McCracken <
jamiemcc blueyonder co uk>:
Mikkel Kamstrup Erlandsen wrote:
> 2006/11/16, Jamie McCracken <jamiemcc blueyonder co uk
> <mailto:jamiemcc blueyonder co uk
>>:
>
> Mikkel Kamstrup Erlandsen wrote:
> > I created a small tomboy note extractor (attached)... It should
> run on
> > any system with a Python installation - I think the XML parser I
> use is
> > bundled with Python.
>
>
> hmm would prefer it internal to tracker in C to be honest. The external
> metadata extractors are driven by mime type so it would be tricky/hacky
> to do them via that mechanism (this is the same as our email stuff -
> its
> all internal)
>
> It should be real easy to do this in C if anyone's willing
>
>
> I could do that - I digged around the extraction code and it seemed
> fairly intuitive. Should I use libxml or just plain hardcoded grep-like
> hacks (or libXYZ)?
use the glib xml parser (see abiword extractor)?
Done. The abiword extractor uses custom "grepping" through the xml without
any real parsing going on. I could probably do that too (and it might be simpler) but I felt the
urge to get into this whole glib business :-)
I haven't tested it with tracker though, I didn't know how to get trackerd to pick up my notes files (they have mime type text/plain and are in ~/.tomboy which isn't indexed by default).
There is a small outcommented test main-function so you can compile the extractor as stand alone.
Please don't publicly humiliate me - I'm really not a C-hacker... :-D
Cheers,
Mikkel
Attachment:
tracker-extract-tomboy.c
Description: Text Data
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]