Mikkel Kamstrup Erlandsen wrote:
> 2006/11/17, Jamie McCracken <jamiemcc blueyonder co uk
> <mailto:jamiemcc blueyonder co uk >>:
>
> Mikkel Kamstrup Erlandsen wrote:
> > 2006/11/16, Jamie McCracken <jamiemcc blueyonder co uk
> <mailto: jamiemcc blueyonder co uk>
> > <mailto: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
>
its mostly okay - just needs some tidying up of the code (spaces in
between function name and opening bracket, no underscores for private
functions etc)
will need to integrate it in trackerd along with code to pick up new or
changed tomboy notes - will do this for you after the 0.5.2 release
tomorrow (with some new dbus methods to make your life easier!)
Attachment:
tracker-extract-tomboy.c
Description: Text Data