[Tracker] [PATCH] freemind filter



Hi,

Just wanted to add a full-text filter for freemind mindmaps, in the
attached patch.

2 subsequent questions:

1) Is there already some extractors for metadata on the way? I tried to
find some in current cvs and did'nt found anything... if there is I
should make some for freemind files too.

2) Is there already some extensible means of storing tags defined by
Tracker (back) in the source file? that would obviously be redundant
with database, but interesting when moving files... or upgrading
Tracker. anyway I think I saw some related discussion earlier (?with a
separate metadata file to be stored with source file?) but could'nt find
it quickly, if you have any pointer it's welcome!

see you,
Bertrand.



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Index: filters/application/Makefile.am
===================================================================
RCS file: /cvs/gnome/tracker/filters/application/Makefile.am,v
retrieving revision 1.6
diff -u -8 -p -r1.6 Makefile.am
- --- filters/application/Makefile.am    30 Nov 2006 01:06:57 -0000    1.6
   filters/application/Makefile.am    10 Jan 2007 11:23:44 -0000
@@ -1,11  1,12 @@
thumbappbindir = $(libdir)/tracker/filters/application

- -thumbappbin_SCRIPTS =     pdf_filter \
thumbappbin_SCRIPTS =     freemind_filter \
                        pdf_filter \
            msword_filter \
            vnd.oasis.opendocument.presentation_filter \
            vnd.oasis.opendocument.presentation-template_filter \
            vnd.oasis.opendocument.spreadsheet_filter \
            vnd.oasis.opendocument.spreadsheet-template_filter \
            vnd.oasis.opendocument.text_filter \
            vnd.oasis.opendocument.text-template_filter \
            vnd.stardivision.writer_filter \
Index: filters/application/freemind_filter
===================================================================
RCS file: filters/application/freemind_filter
diff -N filters/application/freemind_filter
- --- /dev/null    1 Jan 1970 00:00:00 -0000
   filters/application/freemind_filter    10 Jan 2007 11:23:44 -0000
@@ -0,0  1,29 @@
#!/bin/sh

nice -n19 xsltproc - "$1" > "$2" <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">
    <xsl:output method="text"/>
    <xsl:output omit-xml-declaration="yes"/>

    <xsl:template match="node">
       <xsl:value-of select="@TEXT"/>
        <xsl:apply-templates/>
    </xsl:template>

    <!-- freemind 0.8 notes -->
    <xsl:template match="hook/text">
        <xsl:apply-templates mode="html"/>
    </xsl:template>

    <!-- freemind 0.9b3 notes -->
    <xsl:template match="richcontent/html/body">
        <xsl:apply-templates mode="html"/>
    </xsl:template>

    <!-- display note content -->
    <xsl:template match="*" mode="html">
        <xsl:value-of select="."/>
    </xsl:template>
</xsl:stylesheet>
EOF
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFFK3bYlb FmdHqksMRAvHtAJwJ0iSQTr6DyoY0sY9TdhmYRlC2JQCfW nV
W77KiYQiqEOZRNGzw6Rq6VQ=
=4/Z5
-----END PGP SIGNATURE-----

_________________________________________________________________
Qui est-ce qui est très apprécié des Japonais et a toujours quelque chose entre les mains? Live Search le sait et vous ? http://search.live.com/images/results.aspx?q=Manneken%20pis&FORM=BIRE




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