[tracker/extractor-rules-list: 4/11] tracker-extract: Add rule files for the extractors



commit acc0efc613a321803a0136046fabe23a9c1e52f3
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Mar 10 13:18:19 2011 +0100

    tracker-extract: Add rule files for the extractors
    
    The final effect of these rules should resemble the specific vs
    generic approach previously used in the extractor.

 src/tracker-extract/10-abw.rule.in               |    4 ++
 src/tracker-extract/10-flac.rule.in              |    4 ++
 src/tracker-extract/10-gif.rule.in               |    4 ++
 src/tracker-extract/10-html.rule.in              |    4 ++
 src/tracker-extract/10-ico.rule.in               |    4 ++
 src/tracker-extract/10-jpeg.rule.in              |    4 ++
 src/tracker-extract/10-mp3.rule.in               |    4 ++
 src/tracker-extract/10-msoffice.rule.in          |    4 ++
 src/tracker-extract/10-oasis.rule.in             |    4 ++
 src/tracker-extract/10-pdf.rule.in               |    3 +
 src/tracker-extract/10-png.rule.in               |    4 ++
 src/tracker-extract/10-ps.rule.in                |    4 ++
 src/tracker-extract/10-svg.rule.in               |    4 ++
 src/tracker-extract/10-tiff.rule.in              |    4 ++
 src/tracker-extract/10-vorbis.rule.in            |    4 ++
 src/tracker-extract/10-xmp.rule.in               |    4 ++
 src/tracker-extract/11-msoffice-xml.rule.in      |    4 ++
 src/tracker-extract/15-gstreamer-guess.rule.in   |    4 ++
 src/tracker-extract/15-playlist.rule.in          |    4 ++
 src/tracker-extract/15-real-media.rule.in        |    4 ++
 src/tracker-extract/16-upnp-guess.rule.in        |    4 ++
 src/tracker-extract/90-gstreamer-generic.rule.in |    4 ++
 src/tracker-extract/90-text-generic.rule.in      |    3 +
 src/tracker-extract/91-upnp-generic.rule.in      |    4 ++
 src/tracker-extract/92-xine-generic.rule.in      |    4 ++
 src/tracker-extract/93-mplayer-generic.rule.in   |    4 ++
 src/tracker-extract/93-totem-generic.rule.in     |    4 ++
 src/tracker-extract/Makefile.am                  |   63 +++++++++++++++++++++-
 28 files changed, 167 insertions(+), 2 deletions(-)
---
diff --git a/src/tracker-extract/10-abw.rule.in b/src/tracker-extract/10-abw.rule.in
new file mode 100644
index 0000000..a2fe7d1
--- /dev/null
+++ b/src/tracker-extract/10-abw.rule.in
@@ -0,0 +1,4 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-abw.so
+MimeTypes=application/x-abiword
+
diff --git a/src/tracker-extract/10-flac.rule.in b/src/tracker-extract/10-flac.rule.in
new file mode 100644
index 0000000..39ee3ad
--- /dev/null
+++ b/src/tracker-extract/10-flac.rule.in
@@ -0,0 +1,4 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-flac.so
+MimeTypes=audio/x-flac
+
diff --git a/src/tracker-extract/10-gif.rule.in b/src/tracker-extract/10-gif.rule.in
new file mode 100644
index 0000000..83a7b13
--- /dev/null
+++ b/src/tracker-extract/10-gif.rule.in
@@ -0,0 +1,4 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-gif.so
+MimeTypes=image/gif
+
diff --git a/src/tracker-extract/10-html.rule.in b/src/tracker-extract/10-html.rule.in
new file mode 100644
index 0000000..cf9cd7a
--- /dev/null
+++ b/src/tracker-extract/10-html.rule.in
@@ -0,0 +1,4 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-html.so
+MimeTypes=text/html;application/xhtml+xml;
+
diff --git a/src/tracker-extract/10-ico.rule.in b/src/tracker-extract/10-ico.rule.in
new file mode 100644
index 0000000..4e86122
--- /dev/null
+++ b/src/tracker-extract/10-ico.rule.in
@@ -0,0 +1,4 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-icon.so
+MimeTypes=image/vnd.microsoft.icon
+
diff --git a/src/tracker-extract/10-jpeg.rule.in b/src/tracker-extract/10-jpeg.rule.in
new file mode 100644
index 0000000..4ea67e5
--- /dev/null
+++ b/src/tracker-extract/10-jpeg.rule.in
@@ -0,0 +1,4 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-jpeg.so
+MimeTypes=image/jpeg
+
diff --git a/src/tracker-extract/10-mp3.rule.in b/src/tracker-extract/10-mp3.rule.in
new file mode 100644
index 0000000..31d56b5
--- /dev/null
+++ b/src/tracker-extract/10-mp3.rule.in
@@ -0,0 +1,4 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-mp3.so
+MimeTypes=audio/mpeg;audio/x-mp3;
+
diff --git a/src/tracker-extract/10-msoffice.rule.in b/src/tracker-extract/10-msoffice.rule.in
new file mode 100644
index 0000000..0b72b62
--- /dev/null
+++ b/src/tracker-extract/10-msoffice.rule.in
@@ -0,0 +1,4 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-msoffice.so
+MimeTypes=application/msword;application/vnd.ms-powerpoint;application/vnd.ms-excel;application/vnd.ms-*;
+
diff --git a/src/tracker-extract/10-oasis.rule.in b/src/tracker-extract/10-oasis.rule.in
new file mode 100644
index 0000000..84a3b48
--- /dev/null
+++ b/src/tracker-extract/10-oasis.rule.in
@@ -0,0 +1,4 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-oasis.so
+MimeTypes=application/vnd.oasis.opendocument.*
+
diff --git a/src/tracker-extract/10-pdf.rule.in b/src/tracker-extract/10-pdf.rule.in
new file mode 100644
index 0000000..c9d212a
--- /dev/null
+++ b/src/tracker-extract/10-pdf.rule.in
@@ -0,0 +1,3 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-pdf.so
+MimeTypes=application/pdf
diff --git a/src/tracker-extract/10-png.rule.in b/src/tracker-extract/10-png.rule.in
new file mode 100644
index 0000000..080d880
--- /dev/null
+++ b/src/tracker-extract/10-png.rule.in
@@ -0,0 +1,4 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-png.so
+MimeTypes=image/png;sketch/png;
+
diff --git a/src/tracker-extract/10-ps.rule.in b/src/tracker-extract/10-ps.rule.in
new file mode 100644
index 0000000..bdb6ebe
--- /dev/null
+++ b/src/tracker-extract/10-ps.rule.in
@@ -0,0 +1,4 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-ps.so
+MimeTypes=application/x-gzpostscript;application/postscript;
+
diff --git a/src/tracker-extract/10-svg.rule.in b/src/tracker-extract/10-svg.rule.in
new file mode 100644
index 0000000..1526d6d
--- /dev/null
+++ b/src/tracker-extract/10-svg.rule.in
@@ -0,0 +1,4 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-gstreamer.so
+MimeTypes=image/svg+xml
+
diff --git a/src/tracker-extract/10-tiff.rule.in b/src/tracker-extract/10-tiff.rule.in
new file mode 100644
index 0000000..c62ee4f
--- /dev/null
+++ b/src/tracker-extract/10-tiff.rule.in
@@ -0,0 +1,4 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-tiff.so
+MimeTypes=image/tiff
+
diff --git a/src/tracker-extract/10-vorbis.rule.in b/src/tracker-extract/10-vorbis.rule.in
new file mode 100644
index 0000000..a983765
--- /dev/null
+++ b/src/tracker-extract/10-vorbis.rule.in
@@ -0,0 +1,4 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-vorbis.so
+MimeTypes=audio/x-vorbis+ogg;application/ogg;
+
diff --git a/src/tracker-extract/10-xmp.rule.in b/src/tracker-extract/10-xmp.rule.in
new file mode 100644
index 0000000..82979e6
--- /dev/null
+++ b/src/tracker-extract/10-xmp.rule.in
@@ -0,0 +1,4 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-xmp.so
+MimeTypes=application/rdf+xml
+
diff --git a/src/tracker-extract/11-msoffice-xml.rule.in b/src/tracker-extract/11-msoffice-xml.rule.in
new file mode 100644
index 0000000..e6654db
--- /dev/null
+++ b/src/tracker-extract/11-msoffice-xml.rule.in
@@ -0,0 +1,4 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-msoffice-xml.so
+MimeTypes=application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.openxmlformats-officedocument.presentationml.slideshow;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.openxmlformats-officedocument.wordprocessingml.document;
+
diff --git a/src/tracker-extract/15-gstreamer-guess.rule.in b/src/tracker-extract/15-gstreamer-guess.rule.in
new file mode 100644
index 0000000..8999fd0
--- /dev/null
+++ b/src/tracker-extract/15-gstreamer-guess.rule.in
@@ -0,0 +1,4 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-gstreamer.so
+MimeTypes=video/3gpp;video/mp4;video/x-ms-asf;
+
diff --git a/src/tracker-extract/15-playlist.rule.in b/src/tracker-extract/15-playlist.rule.in
new file mode 100644
index 0000000..c9d8b93
--- /dev/null
+++ b/src/tracker-extract/15-playlist.rule.in
@@ -0,0 +1,4 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-playlist.so
+MimeTypes=audio/x-mpegurl;audio/mpegurl;audio/x-scpls;audio/x-pn-realaudio;application/ram;application/vnd.ms-wpl;application/smil;audio/x-ms-asx;
+
diff --git a/src/tracker-extract/15-real-media.rule.in b/src/tracker-extract/15-real-media.rule.in
new file mode 100644
index 0000000..7885193
--- /dev/null
+++ b/src/tracker-extract/15-real-media.rule.in
@@ -0,0 +1,4 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-gstreamer-helix.so
+MimeTypes=audio/vnd.rn-realaudio;audio/x-pn-realaudio;audio/x-pn-realaudio-plugin;video/vnd.rn-realvideo;video/x-pn-realvideo;application/vnd.rn-realmedia;
+
diff --git a/src/tracker-extract/16-upnp-guess.rule.in b/src/tracker-extract/16-upnp-guess.rule.in
new file mode 100644
index 0000000..edc3c99
--- /dev/null
+++ b/src/tracker-extract/16-upnp-guess.rule.in
@@ -0,0 +1,4 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-gupnp-dlna.so
+MimeTypes=video/3gpp;video/mp4;video/x-ms-asf;
+
diff --git a/src/tracker-extract/90-gstreamer-generic.rule.in b/src/tracker-extract/90-gstreamer-generic.rule.in
new file mode 100644
index 0000000..ae9c694
--- /dev/null
+++ b/src/tracker-extract/90-gstreamer-generic.rule.in
@@ -0,0 +1,4 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-gstreamer.so
+MimeTypes=audio/*;video/*;image/*;
+
diff --git a/src/tracker-extract/90-text-generic.rule.in b/src/tracker-extract/90-text-generic.rule.in
new file mode 100644
index 0000000..8889e60
--- /dev/null
+++ b/src/tracker-extract/90-text-generic.rule.in
@@ -0,0 +1,3 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-text.so
+MimeTypes=text/*
diff --git a/src/tracker-extract/91-upnp-generic.rule.in b/src/tracker-extract/91-upnp-generic.rule.in
new file mode 100644
index 0000000..44d2307
--- /dev/null
+++ b/src/tracker-extract/91-upnp-generic.rule.in
@@ -0,0 +1,4 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-gupnp-dlna.so
+MimeTypes=audio/*;video/*;image/*;dlna/*;
+
diff --git a/src/tracker-extract/92-xine-generic.rule.in b/src/tracker-extract/92-xine-generic.rule.in
new file mode 100644
index 0000000..47b28bc
--- /dev/null
+++ b/src/tracker-extract/92-xine-generic.rule.in
@@ -0,0 +1,4 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-xine.so
+MimeTypes=audio/*;video/*;
+
diff --git a/src/tracker-extract/93-mplayer-generic.rule.in b/src/tracker-extract/93-mplayer-generic.rule.in
new file mode 100644
index 0000000..fdd4dcb
--- /dev/null
+++ b/src/tracker-extract/93-mplayer-generic.rule.in
@@ -0,0 +1,4 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-mplayer.so
+MimeTypes=audio/*;video/*;
+
diff --git a/src/tracker-extract/93-totem-generic.rule.in b/src/tracker-extract/93-totem-generic.rule.in
new file mode 100644
index 0000000..dd3deff
--- /dev/null
+++ b/src/tracker-extract/93-totem-generic.rule.in
@@ -0,0 +1,4 @@
+[ExtractorRule]
+ModulePath= modulesdir@/libextract-totem.so
+MimeTypes=audio/*;video/*;
+
diff --git a/src/tracker-extract/Makefile.am b/src/tracker-extract/Makefile.am
index ce71311..93970db 100644
--- a/src/tracker-extract/Makefile.am
+++ b/src/tracker-extract/Makefile.am
@@ -2,6 +2,7 @@ include $(top_srcdir)/Makefile.decl
 
 module_flags = -module -avoid-version -no-undefined
 modulesdir = $(libdir)/tracker-$(TRACKER_API_VERSION)/extract-modules
+rulesdir = $(datadir)/tracker/extract-rules
 
 AM_CPPFLAGS = \
 	$(BUILD_CFLAGS) \
@@ -11,6 +12,38 @@ AM_CPPFLAGS = \
 	-DTRACKER_EXTRACTORS_DIR=\"$(modulesdir)\" \
 	$(TRACKER_EXTRACT_CFLAGS)
 
+rules_in_files = \
+	10-abw.rule.in \
+	10-flac.rule.in \
+	10-gif.rule.in \
+	10-html.rule.in \
+	10-ico.rule.in \
+	10-jpeg.rule.in \
+	10-mp3.rule.in \
+	10-msoffice.rule.in \
+	10-oasis.rule.in \
+	10-pdf.rule.in \
+	10-png.rule.in \
+	10-ps.rule.in \
+	10-svg.rule.in \
+	10-tiff.rule.in \
+	10-vorbis.rule.in \
+	10-xmp.rule.in \
+	11-msoffice-xml.rule.in \
+	15-gstreamer-guess.rule.in \
+	15-playlists.rule.in \
+	15-real-media.rule.in \
+	16-upnp-guess.rule.in \
+	90-gstreamer-generic.rule.in \
+	90-text-generic.rule.in \
+	91-upnp-generic.rule.in \
+	92-xine-generic.rule.in \
+	93-mplayer-generic.rule.in \
+	93-totem-generic.rule.in
+
+%.rule: %.rule.in
+	@sed -e "s|@modulesdir[ ]|${modulesdir}|" $< > $@
+
 # NOTE:
 # We don't always link with libtracker-common, we only link
 # against it if we directly use functions in the .so
@@ -22,32 +55,47 @@ modules_LTLIBRARIES = \
 	libextract-text.la \
 	libextract-icon.la
 
+rules_DATA = \
+	10-abw.rule \
+	10-ico.rule \
+	10-mp3.rule \
+	10-png.rule \
+	10-ps.rule \
+	90-text-generic.rule
+
 if HAVE_LIBVORBIS
 modules_LTLIBRARIES += libextract-vorbis.la
+rules_DATA += 10-vorbis.rule
 endif
 
 if HAVE_LIBFLAC
 modules_LTLIBRARIES += libextract-flac.la
+rules_DATA += 10-flac.rule
 endif
 
 if HAVE_EXEMPI
 modules_LTLIBRARIES += libextract-xmp.la
+rules_DATA += 10-xmp.rule
 endif
 
 if HAVE_LIBGIF
 modules_LTLIBRARIES += libextract-gif.la
+rules_DATA += 10-gif.rule
 endif
 
 if HAVE_LIBJPEG
 modules_LTLIBRARIES += libextract-jpeg.la
+rules_DATA += 10-jpeg.rule
 endif
 
 if HAVE_LIBTIFF
 modules_LTLIBRARIES += libextract-tiff.la
+rules_DATA += 10-tiff.rule
 endif
 
 if HAVE_LIBXML2
 modules_LTLIBRARIES += libextract-html.la
+rules_DATA += 10-html.rule
 endif
 
 if HAVE_LIBGSF
@@ -55,35 +103,43 @@ modules_LTLIBRARIES += \
 	libextract-msoffice.la \
 	libextract-msoffice-xml.la \
 	libextract-oasis.la
+rules_DATA += 10-oasis.rule 10-msoffice.rule 11-msoffice-xml.rule
 endif
 
 if HAVE_POPPLER
 modules_LTLIBRARIES += libextract-pdf.la
+rules_DATA += 10-pdf.rule
 endif
 
 if HAVE_GSTREAMER
 modules_LTLIBRARIES += libextract-gstreamer.la
+rules_DATA += 10-svg.rule 15-gstreamer-guess.rule 90-gstreamer-generic.rule
 endif
 
 if HAVE_GUPNP_DLNA
 modules_LTLIBRARIES += libextract-gupnp-dlna.la
+rules_DATA += 16-upnp-guess.rule 91-upnp-generic.rule
 endif
 
 if HAVE_GSTREAMER_HELIX
 modules_LTLIBRARIES += libextract-gstreamer-helix.la
+rules_DATA += 15-real-media.rule
 endif
 
 if HAVE_LIBXINE
 modules_LTLIBRARIES += libextract-xine.la
+rules_DATA += 92-xine-generic.rule
 endif
 
 if USING_EXTERNAL_VIDEO_PLAYER
 modules_LTLIBRARIES +=	libextract-mplayer.la \
 			libextract-totem.la
+rules_DATA += 93-mplayer-generic.rule 93-totem-generic.rule
 endif
 
 if HAVE_TOTEM_PL_PARSER
 modules_LTLIBRARIES += libextract-playlist.la
+rules_DATA += 15-playlist.rule
 endif
 
 # ABW
@@ -164,6 +220,7 @@ libextract_png_la_LIBADD = \
 	$(TRACKER_EXTRACT_MODULES_LIBS) \
 	$(LIBPNG_LIBS)
 
+
 # PS
 libextract_ps_la_SOURCES = tracker-extract-ps.c
 libextract_ps_la_CFLAGS = $(TRACKER_EXTRACT_MODULES_CFLAGS)
@@ -421,6 +478,8 @@ tracker-marshal.c: tracker-marshal.list
 
 BUILT_SOURCES = $(marshal_sources)
 
-CLEANFILES = $(BUILT_SOURCES)
+CLEANFILES = $(BUILT_SOURCES) $(rules_DATA)
 
-EXTRA_DIST = tracker-marshal.list
+EXTRA_DIST = \
+	tracker-marshal.list \
+	$(rules_in_files)



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