From d531c8c36181d688da02adec53e866a6aceb413c Mon Sep 17 00:00:00 2001 From: dockes Date: Mon, 15 Sep 2008 08:03:37 +0000 Subject: [PATCH] added rcltext/python/purple --- src/sampleconf/fields | 31 ++++++++++++++++++++++--------- src/sampleconf/mimeconf | 10 ++++++++-- src/sampleconf/mimemap | 14 ++++++++++---- src/sampleconf/mimeview | 3 ++- 4 files changed, 42 insertions(+), 16 deletions(-) diff --git a/src/sampleconf/fields b/src/sampleconf/fields index fa67be5b..831cb48d 100644 --- a/src/sampleconf/fields +++ b/src/sampleconf/fields @@ -1,4 +1,4 @@ -# @(#$Id: fields,v 1.1 2008-09-08 16:49:10 dockes Exp $ (C) 2007 J.F.Dockes +# @(#$Id: fields,v 1.2 2008-09-15 08:03:37 dockes Exp $ (C) 2007 J.F.Dockes # Field names configuration. This defines how one may search ie for # author:Hemingway # Important: @@ -16,14 +16,16 @@ [prefixes] # Native fields matching omega uses, which we index without an X first -# letter. Don't change these -title = S +# letter. Don't change these. Caption is used for 'title' to keep a last +# remnant of omega compatibility inside the data record +caption = S author = A keyword = K # extension examples. This are actually used by default by Recoll: ext = XE filename = XSFN +recipient = XTO ############################ # Some fields are stored in the document data record inside the index and @@ -34,19 +36,30 @@ filename = XSFN # Some fields are stored by default, don't add them here, else they will be # stored twice: title, keywords, abstract, filename, mimetype, url # "author" used to be stored by default, now set here as optional +# Only canonical names should be used here, not aliases. [stored] stored = author ########################## # This section defines field names aliases or synonyms. Any right hand side # value will be turned into the lhs canonic name before further treatment +# Left-hand values must match names in the prefixes section or +# data-record fields. +# Note to filter writers: only canonic names should be used when indexing. [aliases] -title = caption subject -author = creator -keyword = keywords tag tags -dmtime = date contentmodified datemodified -mtype = type mimetype contenttype -ext = fileextension +abstract = summary dc:summary description xesam:description +author = creator dc:creator xesam:author xesam:creator +caption = title dc:title subject +# catg = dc:type contentCategory +dbytes = size xesam:size +dmtime = date dc:date dc:datemodified datemodified contentmodified \ + xesam:contentmodified +ext = fileextension xesam:fileextension +# Don't add subject to keywords aliases, it's better to keep it for email +keywords = keyword xesam:keyword tag tags dc:subject xesam:subject +mtype = mime mimetype xesam:mimetype contenttype xesam:contenttype dc:format +recipient = to xesam:recipient +url = dc:identifier xesam:url ######################### # This section defines a hierarchy for field names. Searching for a lhs diff --git a/src/sampleconf/mimeconf b/src/sampleconf/mimeconf index 0576b8da..7d7fa791 100644 --- a/src/sampleconf/mimeconf +++ b/src/sampleconf/mimeconf @@ -1,4 +1,4 @@ -# @(#$Id: mimeconf,v 1.42 2008-09-12 11:35:48 dockes Exp $ (C) 2004 J.F.Dockes +# @(#$Id: mimeconf,v 1.43 2008-09-15 08:03:37 dockes Exp $ (C) 2004 J.F.Dockes # Recoll : associations of mime types to processing filters. # There are different sections for decompression, 'interning' for indexing @@ -78,6 +78,8 @@ text/x-gaim-log = exec rclgaim text/x-html-sidux-man = exec rclsiduxman text/x-mail = internal text/x-man = exec rclman +text/x-purple-log = exec rclpurple +text/x-python = exec rclpython ## ############################################# # Icons to be used in the result list if required by gui config @@ -132,6 +134,8 @@ text/x-c = source text/x-html-sidux-man = sidux-book text/x-mail = message text/x-man = document +text/x-purple-log = pidgin +text/x-python = text-x-python [categories] @@ -156,7 +160,8 @@ text = \ text/plain \ text/rtf \ text/x-html-sidux-man \ - text/x-man + text/x-man \ + text/x-python spreadsheet = \ application/vnd.ms-excel \ @@ -183,6 +188,7 @@ media = \ message = message/rfc822 \ text/x-gaim-log \ text/x-mail \ + text/x-purple-log \ other = application/vnd.sun.xml.draw \ application/vnd.sun.xml.draw.template \ diff --git a/src/sampleconf/mimemap b/src/sampleconf/mimemap index e3f96c44..9deef353 100644 --- a/src/sampleconf/mimemap +++ b/src/sampleconf/mimemap @@ -1,16 +1,20 @@ -# @(#$Id: mimemap,v 1.31 2008-08-25 16:12:16 dockes Exp $ (C) 2004 J.F.Dockes +# @(#$Id: mimemap,v 1.32 2008-09-15 08:03:37 dockes Exp $ (C) 2004 J.F.Dockes # Recoll: associations of file name extensions to mime types .txt = text/plain .text = text/plain .d = text/plain -# Source files. Defining them as text/x-c will enable ext viewer. If -# text/plain they will be somewhat indexed +# Source files. +# Defining them with specific types allows using a specific ext viewer (in +# mimeview). You can in general use rcltext to wrap them in html for +# indexing the contents (and rough preview). You could also just set them +# as text/plain (index as text, use text viewer) .cpp = text/x-c .h = text/x-c .c = text/x-c .cc = text/x-c +.py = text/x-python .rtf = text/rtf @@ -109,9 +113,11 @@ recoll_noindex = .tar.gz .tgz .tar.bz2 .tbz .log.gz .md5 .map \ .gif .bmp .xpm \ ,v ~ # -# Special handling of .txt files inside ~/.gaim directory +# Special handling of .txt files inside ~/.gaim and ~/.purple directories [~/.gaim] .txt = text/x-gaim-log +[~/.purple] +.txt = text/x-purple-log # Special handling of sidux manual menu system [/usr/share/sidux-manual] diff --git a/src/sampleconf/mimeview b/src/sampleconf/mimeview index a3ff3835..e86168b1 100644 --- a/src/sampleconf/mimeview +++ b/src/sampleconf/mimeview @@ -1,4 +1,4 @@ -# @(#$Id: mimeview,v 1.15 2008-09-01 20:39:40 dockes Exp $ (C) 2004 J.F.Dockes +# @(#$Id: mimeview,v 1.16 2008-09-15 08:03:37 dockes Exp $ (C) 2004 J.F.Dockes ## ########################################## # External viewers, launched by the recoll GUI when you click on a result @@ -59,3 +59,4 @@ text/plain = gnuclient -q %f text/x-c = gnuclient -q %f text/x-html-sidux-man = konqueror %f #text/x-html-sidux-man = iceweasel %f +text/x-python = idle %f