From 8c122d7de8c75add8c88d5de2a0f729a8a8cb051 Mon Sep 17 00:00:00 2001
From: Jean-Francois Dockes Sorry, no exact match was found within limits. "
@@ -278,12 +263,12 @@ void SnippetsW::onSetDoc(Rcl::Doc doc, std::shared_ptr %p. Page index. Only significant for
a subset of document types, currently only PDF,
- Postscript and DVI files. Can be used to start the
- editor at the right page for a match or
- snippet. %l. Line number. Only significant
+ for document types with relevant line breaks,
+ mostly text/plain and analogs. If it is set, a
+ significant term will be chosen in the query, and
+ %p will be substituted with the first line where
+ the term appears. %s. Search term. The value will only
- be set for documents with indexed page numbers (ie:
- PDF). The value will be one of the matched search
- terms. It would allow pre-setting the value in the
- "Find" entry inside Evince for example, for easy
- highlighting of the term."
- ;
+ oss << "
" << "\n";
if (nomatch) {
oss.str("\n");
oss << qs2utf8s(tr("";
g_hiliter.set_inputhtml(false);
bool nomatch = true;
for (const auto& snippet : vpabs) {
if (snippet.page == -1) {
- oss << "
" << endl;
+ oss << " " << endl;
+ oss << "" <<
- snippet.snippet << " " << "\n";
continue;
}
list" << snippet.snippet << " " << endl;
+ oss << "";
if (snippet.page > 0) {
- oss << ""
- << "P. " << snippet.page << "";
+ oss << "" <<
+ "P. " << snippet.page << "";
}
- oss << " " << lr.front().c_str() << " " << lr.front().c_str() << " " << "\n";
}
- oss << "
%u. Url.
diff --git a/src/doc/user/usermanual.xml b/src/doc/user/usermanual.xml index 168a7a4c..cc2e81f7 100644 --- a/src/doc/user/usermanual.xml +++ b/src/doc/user/usermanual.xml @@ -5,7 +5,7 @@ Recoll"> http://www.recoll.org/pages/features.html"> - + Xapian"> Windows"> Unix-like systems"> @@ -7114,28 +7114,37 @@ other = rclcat:other (possibly a script) to be able to handle it. -All the Python handlers share at least the
rclexecm.py module,
which handles the communication. Have a look at,
- for example, rclzip
- for a handler which uses rclexecm.py directly.
rclzip.py for a handler which
+ uses rclexecm.py
+ directly.
Most Python handlers which process @@ -6633,7 +6634,7 @@ text/html [file:///Users/uncrypted-dockes/projets/bateaux/ilur/factEtCie/r "_top">Git repository (the sample not in the distributed release at the moment).
You can also have a look at the slightly more complex
- rclzip
+ rclzip.py
which uses Zip file paths as identifiers (ipath).
execm handlers sometimes
@@ -6726,7 +6727,7 @@ text/html [file:///Users/uncrypted-dockes/projets/bateaux/ilur/factEtCie/r
text/rtf = exec unrtf --nopict --html; charset=iso-8859-1; mimetype=text/html
- application/x-chm = execm rclchm
+ application/x-chm = execm rclchm.py
The fragment specifies that:
rclaudio in rclaudio.py in Recoll 1.23 and later for an example
of handler which outputs text/plain and uses zipUseSkippedNames
Use skippedNames inside Zip archives. Fetched
- directly by the rclzip handler. Skip the patterns
- defined by skippedNames inside Zip archives. Can
- be redefined for subdirectories. See
+ directly by the rclzip.py handler. Skip the
+ patterns defined by skippedNames inside Zip
+ archives. Can be redefined for subdirectories.
+ See
https://www.lesbonscomptes.com/recoll/faqsandhowtos/FilteringOutZipArchiveMembers.html
+ audio/mpeg) or handler names (e.g.
+ rclaudio.py).
All the Python handlers
share at least the rclexecm.py module, which
handles the communication. Have a look at, for
- example, rclzip for a handler which
+ example, rclzip.py for a handler which
uses rclexecm.py
directly. Most Python handlers
which process single-document files by executing another command
@@ -4994,7 +4994,7 @@ text/html [file:///Users/uncrypted-dockes/projets/bateaux/ilur/factEtCie/r
the moment).
You can also have a look at the slightly more complex
- rclzip which uses Zip
+ rclzip.py which uses Zip
file paths as identifiers (ipath ).
execm handlers sometimes need to make
@@ -5062,7 +5062,7 @@ text/html [file:///Users/uncrypted-dockes/projets/bateaux/ilur/factEtCie/r
text/rtf = exec unrtf --nopict --html; charset=iso-8859-1; mimetype=text/html
- application/x-chm = execm rclchm
+ application/x-chm = execm rclchm.py
The fragment specifies that:
@@ -5205,7 +5205,7 @@ text/html [file:///Users/uncrypted-dockes/projets/bateaux/ilur/factEtCie/r
method to produce metadata, by calling the
setfield() helper method. This avoids the
necessity to produce HTML, and any issue with HTML quoting. See,
- for example, rclaudio in &RCL; 1.23 and
+ for example, rclaudio.py in &RCL; 1.23 and
later for an example of handler which outputs
text/plain and uses
setfield() to produce metadata.
diff --git a/src/filters/rcl7z b/src/filters/rcl7z.py
similarity index 98%
rename from src/filters/rcl7z
rename to src/filters/rcl7z.py
index 7ba035ac..96022a30 100755
--- a/src/filters/rcl7z
+++ b/src/filters/rcl7z.py
@@ -3,7 +3,7 @@
# 7-Zip file filter for Recoll
# Thanks to Recoll user Martin Ziegler
-# This is a modified version of rclzip, with some help from rcltar
+# This is a modified version of rclzip.py, with some help from rcltar.py
#
# Normally using py7zr https://github.com/miurahr/py7zr
#
diff --git a/src/filters/rclaudio b/src/filters/rclaudio.py
similarity index 100%
rename from src/filters/rclaudio
rename to src/filters/rclaudio.py
diff --git a/src/filters/rclchm b/src/filters/rclchm.py
similarity index 100%
rename from src/filters/rclchm
rename to src/filters/rclchm.py
diff --git a/src/filters/rcldia b/src/filters/rcldia.py
similarity index 97%
rename from src/filters/rcldia
rename to src/filters/rcldia.py
index 3869bced..45dbeb16 100755
--- a/src/filters/rcldia
+++ b/src/filters/rcldia.py
@@ -6,7 +6,7 @@ from __future__ import print_function
# stefan.friedel@iwr.uni-heidelberg.de 2012
#
# add the following to ~/.recoll/mimeconf into the [index] section:
-# application/x-dia-diagram = execm rcldia;mimetype=text/plain;charset=utf-8
+# application/x-dia-diagram = execm rcldia.py;mimetype=text/plain;charset=utf-8
# and into the [icons] section:
# application/x-dia-diagram = drawing
# and finally under [categories]:
diff --git a/src/filters/rclepub b/src/filters/rclepub.py
similarity index 100%
rename from src/filters/rclepub
rename to src/filters/rclepub.py
diff --git a/src/filters/rclepub1 b/src/filters/rclepub1.py
similarity index 100%
rename from src/filters/rclepub1
rename to src/filters/rclepub1.py
diff --git a/src/filters/rclexecm.py b/src/filters/rclexecm.py
index 42d2ff76..1a68a4ce 100644
--- a/src/filters/rclexecm.py
+++ b/src/filters/rclexecm.py
@@ -372,7 +372,7 @@ def main(proto, extract):
params = {'filename' : makebytes(path)}
- # Some filters (e.g. rclaudio) need/get a MIME type from the indexer.
+ # Some filters (e.g. rclaudio.py) need/get a MIME type from the indexer.
# We make a half-assed attempt to emulate:
mimetype = _g_config.mimeType(path)
if not mimetype and not _g_mswindows:
diff --git a/src/filters/rclics b/src/filters/rclics.py
similarity index 100%
rename from src/filters/rclics
rename to src/filters/rclics.py
diff --git a/src/filters/rclinfo b/src/filters/rclinfo.py
similarity index 99%
rename from src/filters/rclinfo
rename to src/filters/rclinfo.py
index cdc1d4da..ff5d711d 100755
--- a/src/filters/rclinfo
+++ b/src/filters/rclinfo.py
@@ -141,7 +141,7 @@ class InfoSimpleSplitter:
if name == b'File':
infofile = value
except Exception as err:
- print("rclinfo: bad line in %s: [%s] %s\n" % \
+ print("rclinfo.py: bad line in %s: [%s] %s\n" % \
(infofile, line, err), file = sys.stderr)
nodename = prevnodename
node += line
diff --git a/src/filters/rclkar b/src/filters/rclkar.py
similarity index 100%
rename from src/filters/rclkar
rename to src/filters/rclkar.py
diff --git a/src/filters/rclrar b/src/filters/rclrar.py
similarity index 98%
rename from src/filters/rclrar
rename to src/filters/rclrar.py
index e6b38bb1..4c3fa766 100755
--- a/src/filters/rclrar
+++ b/src/filters/rclrar.py
@@ -60,7 +60,7 @@ except Exception as ex:
# (https://www.rarlab.com/rar_add.htm). The unrar-free version fails
# with the message "Failed the read enough data"
#
-# This is identical to rclzip except I did a search/replace from zip
+# This is identical to rclzip.py except I did a search/replace from zip
# to rar, and changed this comment.
class RarExtractor:
def __init__(self, em):
diff --git a/src/filters/rcltar b/src/filters/rcltar.py
similarity index 99%
rename from src/filters/rcltar
rename to src/filters/rcltar.py
index c6f2bf4f..1389c703 100755
--- a/src/filters/rcltar
+++ b/src/filters/rcltar.py
@@ -2,7 +2,7 @@
# Tar-file filter for Recoll
# Thanks to Recoll user Martin Ziegler
-# This is a modified version of /usr/share/recoll/filters/rclzip
+# This is a modified version of /usr/share/recoll/filters/rclzip.py
# It works not only for tar-files, but automatically for gzipped and
# bzipped tar-files at well.
diff --git a/src/filters/rclwar b/src/filters/rclwar.py
similarity index 100%
rename from src/filters/rclwar
rename to src/filters/rclwar.py
diff --git a/src/filters/rclzip b/src/filters/rclzip.py
similarity index 99%
rename from src/filters/rclzip
rename to src/filters/rclzip.py
index dc046fdf..116609db 100755
--- a/src/filters/rclzip
+++ b/src/filters/rclzip.py
@@ -51,7 +51,7 @@ if not hasrclconfig:
# and stores it in the catalog as an unicode object. Else it uses the
# binary string, which it decodes as CP437 (zip standard).
#
-# When reading the file, the input file name is used by rclzip
+# When reading the file, the input file name is used by rclzip.py
# directly as an index into the catalog.
#
# When we send the file name data to the indexer, we have to serialize
diff --git a/src/internfile/internfile.cpp b/src/internfile/internfile.cpp
index c60e1e21..19c4c44c 100644
--- a/src/internfile/internfile.cpp
+++ b/src/internfile/internfile.cpp
@@ -51,7 +51,7 @@ using namespace std;
// The internal path element separator. This can't be the same as the rcldb
// file to ipath separator : "|"
// We replace it with a control char if it comes out of a filter (ie:
-// rclzip or rclchm can do this). If you want the SOH control char
+// rclzip.py or rclchm.py can do this). If you want the SOH control char
// inside an ipath, you're out of luck (and a bit weird).
static const string cstr_isep(":");
diff --git a/src/internfile/mh_exec.cpp b/src/internfile/mh_exec.cpp
index 47ad9db7..88097aa6 100644
--- a/src/internfile/mh_exec.cpp
+++ b/src/internfile/mh_exec.cpp
@@ -82,8 +82,7 @@ bool MimeHandlerExec::set_document_file_impl(const std::string& mt,
tpsread = true;
if (!nomd5tps.empty()) {
if (params.size() &&
- nomd5tps.find(path_getsimple(params[0])) !=
- nomd5tps.end()) {
+ nomd5tps.find(path_getsimple(params[0])) != nomd5tps.end()) {
m_handlernomd5 = true;
}
// On windows the 1st param is often a script interp
diff --git a/src/internfile/mh_execm.h b/src/internfile/mh_execm.h
index 7956de8e..27fcba20 100644
--- a/src/internfile/mh_execm.h
+++ b/src/internfile/mh_execm.h
@@ -73,7 +73,7 @@ text/plainData: 10
* time). Absent during indexing (ipaths are generated and sent back from
* the script)
* - Mimetype: this is the mime type for the (possibly container) file.
- * Can be useful to filters which handle multiple types, like rclaudio.
+ * Can be useful to filters which handle multiple types, like rclaudio.py.
*
* The script answers with messages having the following fields:
* - Document: translated document data.
diff --git a/src/qtgui/recoll-win.pro b/src/qtgui/recoll-win.pro
index fa478c4a..5e18edf2 100644
--- a/src/qtgui/recoll-win.pro
+++ b/src/qtgui/recoll-win.pro
@@ -209,30 +209,30 @@ mac {
../filters/openxml-word-body.xsl \
../filters/openxml-meta.xsl \
../filters/ppt-dump.py \
- ../filters/rcl7z \
+ ../filters/rcl7z.py \
../filters/rclaptosidman \
- ../filters/rclaudio \
+ ../filters/rclaudio.py \
../filters/rclbasehandler.py \
../filters/rclbibtex.sh \
../filters/rclcheckneedretry.sh \
- ../filters/rclchm \
- ../filters/rcldia \
+ ../filters/rclchm.py \
+ ../filters/rcldia.py \
../filters/rcldjvu.py \
../filters/rcldoc.py \
../filters/rcldvi \
- ../filters/rclepub \
- ../filters/rclepub1 \
+ ../filters/rclepub.py \
+ ../filters/rclepub1.py \
../filters/rclexec1.py \
../filters/rclexecm.py \
../filters/rclfb2.py \
../filters/rclgaim \
../filters/rclgenxslt.py \
../filters/rclhwp.py \
- ../filters/rclics \
+ ../filters/rclics.py \
../filters/rclimg \
../filters/rclimg.py \
- ../filters/rclinfo \
- ../filters/rclkar \
+ ../filters/rclinfo.py \
+ ../filters/rclkar.py \
../filters/rclkwd \
../filters/rcllatinclass.py \
../filters/rcllatinstops.zip \
@@ -250,21 +250,21 @@ mac {
../filters/rclpst.py \
../filters/rclpurple \
../filters/rclpython.py \
- ../filters/rclrar \
+ ../filters/rclrar.py \
../filters/rclrtf.py \
../filters/rclscribus \
../filters/rclshowinfo \
- ../filters/rcltar \
+ ../filters/rcltar.py \
../filters/rcltex \
../filters/rcltext.py \
../filters/rcluncomp \
../filters/rcluncomp.py \
- ../filters/rclwar \
+ ../filters/rclwar.py \
../filters/rclxls.py \
../filters/rclxml.py \
../filters/rclxmp.py \
../filters/rclxslt.py \
- ../filters/rclzip \
+ ../filters/rclzip.py \
../filters/recoll-we-move-files.py \
../filters/recollepub.zip \
../filters/svg.xsl \
diff --git a/src/sampleconf/mimeconf b/src/sampleconf/mimeconf
index f41e5d06..39bb54ca 100644
--- a/src/sampleconf/mimeconf
+++ b/src/sampleconf/mimeconf
@@ -148,25 +148,25 @@ application/vnd.sun.xml.writer.template = \
body content.xml opendoc-body.xsl
#application/x-mobipocket-ebook = execm rclmobi
-#application/x-tar = execm rcltar
+#application/x-tar = execm rcltar.py
-application/epub+zip = execm rclepub
+application/epub+zip = execm rclepub.py
application/x-ipynb+json = exec jupyter nbconvert --to script --stdout ; mimetype = text/plain
application/javascript = internal text/plain
-application/ogg = execm rclaudio
+application/ogg = execm rclaudio.py
application/pdf = execm rclpdf.py
application/postscript = exec rclps
application/sql = internal text/plain
application/vnd.wordperfect = exec wpd2html;mimetype=text/html
-application/x-7z-compressed = execm rcl7z
+application/x-7z-compressed = execm rcl7z.py
application/x-abiword = internal xsltproc abiword.xsl
application/x-awk = internal text/plain
-application/x-chm = execm rclchm
-application/x-dia-diagram = execm rcldia;mimetype=text/plain
+application/x-chm = execm rclchm.py
+application/x-dia-diagram = execm rcldia.py;mimetype=text/plain
application/x-dvi = exec rcldvi
-application/x-flac = execm rclaudio
+application/x-flac = execm rclaudio.py
application/x-gnote = execm rclxml.py
-application/x-gnuinfo = execm rclinfo
+application/x-gnuinfo = execm rclinfo.py
application/x-gnumeric = internal xsltproc gnumeric.xsl
application/x-hwp = execm rclhwp.py
application/x-kword = exec rclkwd
@@ -175,22 +175,22 @@ application/x-mimehtml = internal message/rfc822
application/x-okular-notes = internal xsltproc okular-note.xsl
application/x-perl = internal text/plain
application/x-php = internal text/plain
-application/x-rar = execm rclrar;charset=default
+application/x-rar = execm rclrar.py;charset=default
application/x-ruby = internal text/plain
application/x-scribus = exec rclscribus
application/x-shellscript = internal text/plain
application/x-tex = exec rcltex
-application/x-webarchive = execm rclwar
+application/x-webarchive = execm rclwar.py
application/x-zerosize = internal
-application/zip = execm rclzip;charset=default
-audio/aac = execm rclaudio
-audio/ape = execm rclaudio
-audio/mp4 = execm rclaudio
-audio/mpeg = execm rclaudio
-audio/ogg = execm rclaudio
-audio/x-karaoke = execm rclkar
-audio/x-musepack = execm rclaudio
-audio/x-wavpack = execm rclaudio
+application/zip = execm rclzip.py;charset=default
+audio/aac = execm rclaudio.py
+audio/ape = execm rclaudio.py
+audio/mp4 = execm rclaudio.py
+audio/mpeg = execm rclaudio.py
+audio/ogg = execm rclaudio.py
+audio/x-karaoke = execm rclkar.py
+audio/x-musepack = execm rclaudio.py
+audio/x-wavpack = execm rclaudio.py
image/gif = execm rclimg
image/jp2 = execm rclimg
image/jpeg = execm rclimg
@@ -203,7 +203,7 @@ image/x-xcf = execm rclimg
inode/symlink = internal
inode/x-empty = internal application/x-zerosize
message/rfc822 = internal
-text/calendar = execm rclics;mimetype=text/plain
+text/calendar = execm rclics.py;mimetype=text/plain
text/css = internal text/plain
text/html = internal
text/plain = internal
@@ -234,7 +234,7 @@ text/x-ruby = internal
text/x-shellscript = internal text/plain
text/x-srt = internal text/plain
text/x-tex = exec rcltex
-video/mp4 = execm rclaudio
+video/mp4 = execm rclaudio.py
video/x-msvideo = execm rclimg
diff --git a/src/sampleconf/mimemap b/src/sampleconf/mimemap
index ced4ecde..bc9ecf95 100644
--- a/src/sampleconf/mimemap
+++ b/src/sampleconf/mimemap
@@ -107,7 +107,7 @@
.maff = application/zip
.7z = application/x-7z-compressed
-# The rcltar module can handle compressed tar formats internally so we
+# The rcltar.py module can handle compressed tar formats internally so we
# use application/x-tar for all tar files compressed or not. Note that tar
# file indexing is disabled by default, you'll need to copy and uncomment
# the application/x-tar commented line from mimeconf into your personal config
diff --git a/src/sampleconf/recoll.conf b/src/sampleconf/recoll.conf
index aceba66a..96b4c245 100644
--- a/src/sampleconf/recoll.conf
+++ b/src/sampleconf/recoll.conf
@@ -155,7 +155,7 @@ skippedPaths = /media
#
#
# Use skippedNames inside Zip archives. Fetched
-# directly by the rclzip handler. Skip the patterns defined by skippedNames
+# directly by the rclzip.py handler. Skip the patterns defined by skippedNames
# inside Zip archives. Can be redefined for subdirectories.
# See https://www.lesbonscomptes.com/recoll/faqsandhowtos/FilteringOutZipArchiveMembers.html
#
@@ -206,9 +206,9 @@ skippedPaths = /media
# redefinition for subtrees). At the moment, it only has an effect for
# external handlers (exec and execm). The file types can be specified by
# listing either MIME types (e.g. audio/mpeg) or handler names
-# (e.g. rclaudio).
+# (e.g. rclaudio.py).
#
-nomd5types = rclaudio
+nomd5types = rclaudio.py
# Size limit for compressed
# files. We need to decompress these in a
diff --git a/src/windows/mimeconf b/src/windows/mimeconf
index 6bc6545e..6af57244 100644
--- a/src/windows/mimeconf
+++ b/src/windows/mimeconf
@@ -131,36 +131,36 @@ application/vnd.sun.xml.writer.template = \
body content.xml opendoc-body.xsl
#application/postscript = exec rclps
-#application/x-gnuinfo = execm python rclinfo
-#application/x-tar = execm python rcltar
+#application/x-gnuinfo = execm python rclinfo.py
+#application/x-tar = execm python rcltar.py
-application/epub+zip = execm python rclepub
+application/epub+zip = execm python rclepub.py
application/x-ipynb+json = execm python rclipynb.py
application/javascript = internal text/plain
-application/ogg = execm python rclaudio
+application/ogg = execm python rclaudio.py
application/pdf = execm python rclpdf.py
application/sql = internal text/plain
application/vnd.wordperfect = exec wpd/wpd2html;mimetype=text/html
-application/x-7z-compressed = execm python rcl7z
+application/x-7z-compressed = execm python rcl7z.py
application/x-abiword = internal xsltproc abiword.xsl
application/x-awk = internal text/plain
-application/x-chm = execm python rclchm
-application/x-dia-diagram = execm python rcldia;mimetype=text/plain
-application/x-flac = execm python rclaudio
+application/x-chm = execm python rclchm.py
+application/x-dia-diagram = execm python rcldia.py;mimetype=text/plain
+application/x-flac = execm python rclaudio.py
application/x-gnote = execm python rclxml.py
application/x-hwp = execm python rclhwp.py
application/x-mimehtml = internal message/rfc822
application/x-perl = internal text/plain
application/x-php = internal text/plain
-application/x-rar = execm python rclrar;charset=default
+application/x-rar = execm python rclrar.py;charset=default
application/x-shellscript = internal text/plain
-application/x-webarchive = execm python rclwar
+application/x-webarchive = execm python rclwar.py
application/x-zerosize = internal
-application/zip = execm python rclzip;charset=default
-audio/aac = execm python rclaudio
-audio/mp4 = execm python rclaudio
-audio/mpeg = execm python rclaudio
-audio/x-karaoke = execm python rclkar
+application/zip = execm python rclzip.py;charset=default
+audio/aac = execm python rclaudio.py
+audio/mp4 = execm python rclaudio.py
+audio/mpeg = execm python rclaudio.py
+audio/x-karaoke = execm python rclkar.py
image/gif = execm rclimg.exe
image/jp2 = execm rclimg.exe
image/jpeg = execm rclimg.exe
@@ -171,7 +171,7 @@ image/vnd.djvu = execm python rcldjvu.py
inode/symlink = internal
inode/x-empty = internal application/x-zerosize
message/rfc822 = internal
-text/calendar = execm python rclics;mimetype=text/plain
+text/calendar = execm python rclics.py;mimetype=text/plain
text/css = internal text/plain
text/html = internal
text/plain = internal
diff --git a/tests/config/mimeconf b/tests/config/mimeconf
index 974d09ce..b38b5fff 100644
--- a/tests/config/mimeconf
+++ b/tests/config/mimeconf
@@ -8,4 +8,4 @@
# values is identical.
[index]
-application/x-tar = execm rcltar
+application/x-tar = execm rcltar.py
From 844b4e8b03e9036ba8c721c3fe62e93f98ec747d Mon Sep 17 00:00:00 2001
From: Jean-Francois Dockes
Date: Fri, 14 Jan 2022 13:11:24 +0100
Subject: [PATCH 15/19] windows: rely on .py extension instead of special
keyword to determine use of interpreter
---
src/common/autoconfig-mac.h | 4 +-
src/common/autoconfig-win.h | 4 +-
src/common/rclconfig.cpp | 37 +++++++++---------
src/windows/mimeconf | 76 ++++++++++++++++++-------------------
4 files changed, 59 insertions(+), 62 deletions(-)
diff --git a/src/common/autoconfig-mac.h b/src/common/autoconfig-mac.h
index 4d452f7a..4007bd35 100644
--- a/src/common/autoconfig-mac.h
+++ b/src/common/autoconfig-mac.h
@@ -125,7 +125,7 @@
#define PACKAGE_NAME "Recoll"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "Recoll 1.31.6"
+#define PACKAGE_STRING "Recoll 1.32.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "recoll"
@@ -134,7 +134,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.31.6"
+#define PACKAGE_VERSION "1.32.0"
/* putenv parameter is const */
/* #undef PUTENV_ARG_CONST */
diff --git a/src/common/autoconfig-win.h b/src/common/autoconfig-win.h
index 8c589ecc..2cb98f56 100644
--- a/src/common/autoconfig-win.h
+++ b/src/common/autoconfig-win.h
@@ -118,7 +118,7 @@
#define PACKAGE_NAME "Recoll"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "Recoll 1.31.6"
+#define PACKAGE_STRING "Recoll 1.32.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "recoll"
@@ -127,7 +127,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.31.6"
+#define PACKAGE_VERSION "1.32.0"
/* putenv parameter is const */
/* #undef PUTENV_ARG_CONST */
diff --git a/src/common/rclconfig.cpp b/src/common/rclconfig.cpp
index e1fd78f0..ef8f6351 100644
--- a/src/common/rclconfig.cpp
+++ b/src/common/rclconfig.cpp
@@ -1633,6 +1633,7 @@ vector RclConfig::getDaemSkippedPaths() const
// and filtersdir from the config file to the PATH, then use execmd::which()
string RclConfig::findFilter(const string &icmd) const
{
+ LOGDEB2("findFilter: " << icmd << "\n");
// If the path is absolute, this is it
if (path_isabsolute(icmd))
return icmd;
@@ -1680,13 +1681,19 @@ bool RclConfig::processFilterCmd(std::vector& cmd) const
LOGDEB0("processFilterCmd: in: " << stringsToString(cmd) << "\n");
auto it = cmd.begin();
- // Special-case python and perl on windows: we need to also locate the
- // first argument which is the script name "python somescript.py".
- // On Unix, thanks to #!, we usually just run "somescript.py", but need
- // the same change if we ever want to use the same cmd line as windows
- bool hasinterp = !stringlowercmp("python", *it) ||
- !stringlowercmp("perl", *it);
-
+#ifdef _WIN32
+ // Special-case interpreters on windows: we used to have an additional 1st argument "python" in
+ // mimeconf, but we now rely on the .py extension for better sharing of mimeconf.
+ std::string ext = path_suffix(*it);
+ if ("py" == ext) {
+ it = cmd.insert(it, findFilter("python"));
+ it++;
+ } else if ("pl" == ext) {
+ it = cmd.insert(it, findFilter("perl"));
+ it++;
+ }
+#endif
+
// Note that, if the cmd vector size is 1, post-incrementing the
// iterator in the following statement, which works on x86, leads
// to a crash on ARM with gcc 6 and 8 (at least), which does not
@@ -1694,25 +1701,15 @@ bool RclConfig::processFilterCmd(std::vector& cmd) const
// whatever... We do it later then.
*it = findFilter(*it);
- if (hasinterp) {
- if (cmd.size() < 2) {
- LOGERR("processFilterCmd: python/perl cmd: no script?. [" <<
- stringsToString(cmd) << "]\n");
- return false;
- } else {
- ++it;
- *it = findFilter(*it);
- }
- }
LOGDEB0("processFilterCmd: out: " << stringsToString(cmd) << "\n");
return true;
}
-bool RclConfig::pythonCmd(const std::string& scriptname,
- std::vector& cmd) const
+// This now does nothing more than processFilterCmd (after we changed to relying on the py extension)
+bool RclConfig::pythonCmd(const std::string& scriptname, std::vector& cmd) const
{
#ifdef _WIN32
- cmd = {"python", scriptname};
+ cmd = {scriptname};
#else
cmd = {scriptname};
#endif
diff --git a/src/windows/mimeconf b/src/windows/mimeconf
index 6af57244..832afa45 100644
--- a/src/windows/mimeconf
+++ b/src/windows/mimeconf
@@ -1,4 +1,4 @@
-# (C) 2015 J.F.Dockes
+# (C) 2015-2022 J.F.Dockes
# This file contains most of the data which determines how we
# handle the different mime types (also see the "mimeview" file).
@@ -30,12 +30,12 @@
# The script (ie: rcluncomp) must output the uncompressed file name on
# stdout. Note that the windows version will always use 7z, and ignore
# the decompressor parameter in the following lines
-application/gzip = uncompress python rcluncomp.py 7z %f %t
-application/x-gzip = uncompress python rcluncomp.py 7z %f %t
-application/x-compress = uncompress python rcluncomp.py 7z %f %t
-application/x-bzip2 = uncompress python rcluncomp.py 7z %f %t
-application/x-xz = uncompress python rcluncomp.py 7z %f %t
-application/x-lzma = uncompress python rcluncomp.py 7z %f %t
+application/gzip = uncompress rcluncomp.py 7z %f %t
+application/x-gzip = uncompress rcluncomp.py 7z %f %t
+application/x-compress = uncompress rcluncomp.py 7z %f %t
+application/x-bzip2 = uncompress rcluncomp.py 7z %f %t
+application/x-xz = uncompress rcluncomp.py 7z %f %t
+application/x-lzma = uncompress rcluncomp.py 7z %f %t
## ###################################
@@ -47,14 +47,14 @@ application/x-lzma = uncompress python rcluncomp.py 7z %f %t
# each filter, see the exemples below (ie: msword)
[index]
-application/msword = execm python rcldoc.py
-application/vnd.ms-excel = execm python rclxls.py
-application/vnd.ms-outlook = execm python rclpst.py
-application/vnd.ms-powerpoint = execm python rclppt.py
+application/msword = execm rcldoc.py
+application/vnd.ms-excel = execm rclxls.py
+application/vnd.ms-outlook = execm rclpst.py
+application/vnd.ms-powerpoint = execm rclppt.py
# Also Handle the mime type returned by "file -i" for a suffix-less word
# file. This could probably just as well be an excel file, but we have to
# chose one.
-application/vnd.ms-office = execm python rcldoc.py
+application/vnd.ms-office = execm rcldoc.py
application/vnd.oasis.opendocument.text = \
internal xsltproc meta meta.xml opendoc-meta.xsl \
@@ -89,9 +89,9 @@ application/vnd.openxmlformats-officedocument.wordprocessingml.template = \
body word/footnotes.xml openxml-word-body.xsl \
body word/endnotes.xml openxml-word-body.xsl
application/vnd.openxmlformats-officedocument.presentationml.template = \
- execm python rclopxml.py
+ execm rclopxml.py
application/vnd.openxmlformats-officedocument.presentationml.presentation = \
- execm python rclopxml.py
+ execm rclopxml.py
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet = \
internal xsltproc meta docProps/core.xml openxml-meta.xsl \
body xl/sharedStrings.xml openxml-xls-body.xsl
@@ -131,52 +131,52 @@ application/vnd.sun.xml.writer.template = \
body content.xml opendoc-body.xsl
#application/postscript = exec rclps
-#application/x-gnuinfo = execm python rclinfo.py
-#application/x-tar = execm python rcltar.py
+#application/x-gnuinfo = execm rclinfo.py
+#application/x-tar = execm rcltar.py
-application/epub+zip = execm python rclepub.py
-application/x-ipynb+json = execm python rclipynb.py
+application/epub+zip = execm rclepub.py
+application/x-ipynb+json = execm rclipynb.py
application/javascript = internal text/plain
-application/ogg = execm python rclaudio.py
-application/pdf = execm python rclpdf.py
+application/ogg = execm rclaudio.py
+application/pdf = execm rclpdf.py
application/sql = internal text/plain
application/vnd.wordperfect = exec wpd/wpd2html;mimetype=text/html
-application/x-7z-compressed = execm python rcl7z.py
+application/x-7z-compressed = execm rcl7z.py
application/x-abiword = internal xsltproc abiword.xsl
application/x-awk = internal text/plain
-application/x-chm = execm python rclchm.py
-application/x-dia-diagram = execm python rcldia.py;mimetype=text/plain
-application/x-flac = execm python rclaudio.py
-application/x-gnote = execm python rclxml.py
-application/x-hwp = execm python rclhwp.py
+application/x-chm = execm rclchm.py
+application/x-dia-diagram = execm rcldia.py;mimetype=text/plain
+application/x-flac = execm rclaudio.py
+application/x-gnote = execm rclxml.py
+application/x-hwp = execm rclhwp.py
application/x-mimehtml = internal message/rfc822
application/x-perl = internal text/plain
application/x-php = internal text/plain
-application/x-rar = execm python rclrar.py;charset=default
+application/x-rar = execm rclrar.py;charset=default
application/x-shellscript = internal text/plain
-application/x-webarchive = execm python rclwar.py
+application/x-webarchive = execm rclwar.py
application/x-zerosize = internal
-application/zip = execm python rclzip.py;charset=default
-audio/aac = execm python rclaudio.py
-audio/mp4 = execm python rclaudio.py
-audio/mpeg = execm python rclaudio.py
-audio/x-karaoke = execm python rclkar.py
+application/zip = execm rclzip.py;charset=default
+audio/aac = execm rclaudio.py
+audio/mp4 = execm rclaudio.py
+audio/mpeg = execm rclaudio.py
+audio/x-karaoke = execm rclkar.py
image/gif = execm rclimg.exe
image/jp2 = execm rclimg.exe
image/jpeg = execm rclimg.exe
image/png = execm rclimg.exe
image/svg+xml = internal xsltproc svg.xsl
image/tiff = execm rclimg.exe
-image/vnd.djvu = execm python rcldjvu.py
+image/vnd.djvu = execm rcldjvu.py
inode/symlink = internal
inode/x-empty = internal application/x-zerosize
message/rfc822 = internal
-text/calendar = execm python rclics.py;mimetype=text/plain
+text/calendar = execm rclics.py;mimetype=text/plain
text/css = internal text/plain
text/html = internal
text/plain = internal
text/plain1 = internal
-#text/rtf = execm python rclrtf.py
+#text/rtf = execm rclrtf.py
text/rtf = exec unrtf --nopict --html;mimetype=text/html
text/x-c = internal
text/x-c+ = internal
@@ -187,9 +187,9 @@ text/x-csv = internal text/plain
text/x-fictionbook = internal xsltproc fb2.xsl
text/x-ini = internal text/plain
text/x-mail = internal
-text/x-orgmode = execm python rclorgmode.py
+text/x-orgmode = execm rclorgmode.py
text/x-perl = internal text/plain
-text/x-python = execm python rclpython.py
+text/x-python = execm rclpython.py
text/x-shellscript = internal text/plain
text/x-srt = internal text/plain
image/x-xcf = execm rclimg.exe
From 47ea12353af1a7ea7df47eec6f7925a3dad99631 Mon Sep 17 00:00:00 2001
From: Jean-Francois Dockes
Date: Fri, 14 Jan 2022 17:18:49 +0100
Subject: [PATCH 16/19] Fix internfile bug which prevented the propagation of a
proper title in some cases
---
src/internfile/internfile.cpp | 17 ++++++++---------
tests/Maildir/Maildir.txt | 2 +-
tests/embed/embed.txt | 2 +-
tests/orgmode/orgmode.txt | 2 +-
tests/rfc2231/rfc2231.txt | 2 +-
5 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/src/internfile/internfile.cpp b/src/internfile/internfile.cpp
index 19c4c44c..677a544e 100644
--- a/src/internfile/internfile.cpp
+++ b/src/internfile/internfile.cpp
@@ -562,13 +562,13 @@ bool FileInterner::dijontorcl(Rcl::Doc& doc)
const string *val = 0;
if (!doc.peekmeta(Rcl::Doc::keymd5, &val) || val->empty())
doc.meta[Rcl::Doc::keymd5] = ent.second;
- } else if (ent.first == cstr_dj_keymt ||
- ent.first == cstr_dj_keycharset) {
+ } else if (ent.first == cstr_dj_keymt || ent.first == cstr_dj_keycharset) {
// don't need/want these.
} else {
- LOGDEB2("dijontorcl: " << m_cfg->fieldCanon(ent.first) << " -> " <<
- ent.second << endl);
- doc.addmeta(m_cfg->fieldCanon(ent.first), ent.second);
+ LOGDEB2("dijontorcl: " << m_cfg->fieldCanon(ent.first) << " -> " << ent.second << "\n");
+ if (!ent.second.empty()) {
+ doc.meta[m_cfg->fieldCanon(ent.first)] = ent.second;
+ }
}
}
if (doc.meta[Rcl::Doc::keyabs].empty() &&
@@ -583,7 +583,7 @@ const set nocopyfields{cstr_dj_keycontent, cstr_dj_keymd,
cstr_dj_keyanc, cstr_dj_keyorigcharset, cstr_dj_keyfn,
cstr_dj_keymt, cstr_dj_keycharset, cstr_dj_keyds};
-static void copymeta(const RclConfig *cfg,Rcl::Doc& doc, const RecollFilter* hp)
+static void copymeta(const RclConfig *cfg, Rcl::Doc& doc, const RecollFilter* hp)
{
for (const auto& entry : hp->get_meta_data()) {
if (nocopyfields.find(entry.first) == nocopyfields.end()) {
@@ -650,7 +650,7 @@ void FileInterner::collectIpathAndMT(Rcl::Doc& doc) const
// handlers to use setfield() instead of embedding
// metadata in the HTML meta tags.
if (i == 0 || !pathelprev.empty()) {
- copymeta(m_cfg, doc, m_handlers[i]);
+ copymeta(m_cfg, doc, m_handlers[i == 0 ? 0 : i-1]);
}
if (doc.fbytes.empty()) {
lltodecstr(m_handlers[i]->get_docsize(), doc.fbytes);
@@ -744,8 +744,7 @@ int FileInterner::addHandler()
LOGINFO("FileInterner::addHandler: no filter for [" << mimetype << "]\n");
return ADD_CONTINUE;
}
- newflt->set_property(Dijon::Filter::OPERATING_MODE,
- m_forPreview ? "view" : "index");
+ newflt->set_property(Dijon::Filter::OPERATING_MODE, m_forPreview ? "view" : "index");
if (!charset.empty())
newflt->set_property(Dijon::Filter::DEFAULT_CHARSET, charset);
diff --git a/tests/Maildir/Maildir.txt b/tests/Maildir/Maildir.txt
index 334fd3e7..49a8343d 100644
--- a/tests/Maildir/Maildir.txt
+++ b/tests/Maildir/Maildir.txt
@@ -1 +1 @@
-FreqFor maildir_uniquexxx : 692
+FreqFor maildir_uniquexxx : 734
diff --git a/tests/embed/embed.txt b/tests/embed/embed.txt
index 4c643b6c..6169d50a 100644
--- a/tests/embed/embed.txt
+++ b/tests/embed/embed.txt
@@ -1,2 +1,2 @@
1 results
-application/msword [file:///home/dockes/projets/fulltext/testrecoll/embed/thunderbirdlocalfolders.zip] [xingfx1.doc] 24576 bytes
+application/msword [file:///home/dockes/projets/fulltext/testrecoll/embed/thunderbirdlocalfolders.zip] [xingfx1.doc (Sending a word document)] 24576 bytes
diff --git a/tests/orgmode/orgmode.txt b/tests/orgmode/orgmode.txt
index 805cbc48..3348afb1 100644
--- a/tests/orgmode/orgmode.txt
+++ b/tests/orgmode/orgmode.txt
@@ -1,2 +1,2 @@
1 results
-text/plain [file:///home/dockes/projets/fulltext/testrecoll/orgmode/orgmode-example.org] [law and legal code versioned on github] 370 bytes
+text/x-orgmode-sub [file:///home/dockes/projets/fulltext/testrecoll/orgmode/orgmode-example.org] [law and legal code versioned on github] 487 bytes
diff --git a/tests/rfc2231/rfc2231.txt b/tests/rfc2231/rfc2231.txt
index f1d98a3f..38192a38 100644
--- a/tests/rfc2231/rfc2231.txt
+++ b/tests/rfc2231/rfc2231.txt
@@ -2,5 +2,5 @@
0 results
0 results
2 results
+application/octet-stream [file:///home/dockes/projets/fulltext/testrecoll/rfc2231/thunder] [épatantuniquefilenameterm.bin (vrai attach)] 5785 bytes
message/rfc822 [file:///home/dockes/projets/fulltext/testrecoll/rfc2231/thunder] [vrai attach] 11208 bytes
-application/octet-stream [file:///home/dockes/projets/fulltext/testrecoll/rfc2231/thunder] [épatantuniquefilenameterm.bin] 5785 bytes
From 265bbd0c6e9284e04ec0cdc94311724127608120 Mon Sep 17 00:00:00 2001
From: Jean-Francois Dockes
Date: Sat, 15 Jan 2022 09:12:39 +0000
Subject: [PATCH 17/19] Define system specific default configuration directory
to allow sharing most of the default configuration files contents
---
src/common/rclconfig.cpp | 22 +-
src/utils/conftree.h | 39 ++--
src/windows/mimeconf | 434 ++-------------------------------------
src/windows/mimeview | 175 +---------------
src/windows/mkinstdir.sh | 16 +-
5 files changed, 69 insertions(+), 617 deletions(-)
diff --git a/src/common/rclconfig.cpp b/src/common/rclconfig.cpp
index ef8f6351..490d30ea 100644
--- a/src/common/rclconfig.cpp
+++ b/src/common/rclconfig.cpp
@@ -58,6 +58,16 @@
using namespace std;
+// Naming the directory for platform-specific default config files, overriding the top-level ones
+// E.g. /usr/share/recoll/examples/windows
+#ifdef _WIN32
+static const string confsysdir{"windows"};
+#elif defined(_APPLE__)
+static const string confsysdir{"macos"};
+#else
+static const string confsysdir;
+#endif
+
// Static, logically const, RclConfig members or module static
// variables are initialized once from the first object build during
// process initialization.
@@ -303,8 +313,15 @@ RclConfig::RclConfig(const string *argcnf)
m_cdirs.push_back(cp);
}
- // Base/installation config
- m_cdirs.push_back(path_cat(m_datadir, "examples"));
+ // Base/installation config, and its platform-specific overrides
+ std::string defaultsdir = path_cat(m_datadir, "examples");
+ if (!confsysdir.empty()) {
+ std::string sdir = path_cat(defaultsdir, confsysdir);
+ if (path_isdir(sdir)) {
+ m_cdirs.push_back(sdir);
+ }
+ }
+ m_cdirs.push_back(defaultsdir);
string cnferrloc;
for (const auto& dir : m_cdirs) {
@@ -376,6 +393,7 @@ bool RclConfig::updateMainConfig()
{
ConfStack *newconf = new ConfStack("recoll.conf", m_cdirs, true);
if (newconf == 0 || !newconf->ok()) {
+ std::cerr << "updateMainConfig: new Confstack not ok\n";
if (m_conf)
return false;
m_ok = false;
diff --git a/src/utils/conftree.h b/src/utils/conftree.h
index d868e436..dc6f86ad 100644
--- a/src/utils/conftree.h
+++ b/src/utils/conftree.h
@@ -125,8 +125,7 @@ public:
* @param readonly if true open readonly, else rw
* @param tildexp try tilde (home dir) expansion for subkey values
*/
- ConfSimple(const char *fname, int readonly = 0, bool tildexp = false,
- bool trimvalues = true);
+ ConfSimple(const char *fname, int readonly = 0, bool tildexp = false, bool trimvalues = true);
/**
* Build the object by reading content from a string
@@ -142,8 +141,7 @@ public:
* @param readonly if true open read only, else rw
* @param tildexp try tilde (home dir) expansion for subsection names
*/
- ConfSimple(int readonly = 0, bool tildexp = false,
- bool trimvalues = true);
+ ConfSimple(int readonly = 0, bool tildexp = false, bool trimvalues = true);
virtual ~ConfSimple() {};
@@ -184,8 +182,7 @@ public:
* Set value for named integer parameter in specified subsection (or global)
* @return 0 for error, 1 else
*/
- virtual int set(const std::string& nm, long long val,
- const std::string& sk = std::string());
+ virtual int set(const std::string& nm, long long val, const std::string& sk = std::string());
/**
* Remove name and value from config
@@ -388,8 +385,7 @@ public:
construct(fns, ro);
}
/// Construct out of single file name and multiple directories
- ConfStack(const std::string& nm, const std::vector& dirs,
- bool ro = true) {
+ ConfStack(const std::string& nm, const std::vector& dirs, bool ro = true) {
std::vector fns;
for (const auto& dir : dirs) {
fns.push_back(path_cat(dir, nm));
@@ -501,8 +497,8 @@ public:
const std::string& sk, const char *pattern = 0) const override {
return getNames1(sk, pattern, false);
}
- virtual std::vector getNamesShallow(const std::string& sk,
- const char *patt = 0) const {
+ virtual std::vector getNamesShallow(
+ const std::string& sk, const char *patt = 0) const {
return getNames1(sk, patt, true);
}
@@ -570,27 +566,30 @@ private:
}
}
- /// Common construct from file names code. We used to be ok even
- /// if some files were not readable/parsable. Now fail if any
- /// fails.
+ /// Common construct from file names.
+ /// Fail if any fails, except for missing files in all but the bottom location, or the
+ /// top one in rw mode.
void construct(const std::vector& fns, bool ro) {
bool ok{true};
- bool first{true};
- for (const auto& fn : fns) {
+ for (unsigned int i = 0; i < fns.size(); i++) {
+ const auto& fn{fns[i]};
T* p = new T(fn.c_str(), ro);
if (p && p->ok()) {
m_confs.push_back(p);
} else {
delete p;
- // In ro mode, we accept a non-existing topmost file
- // and treat it as an empty one.
- if (!(ro && first && !path_exists(fn))) {
- ok = false;
+ // We accept missing files in all but the bottom/ directory.
+ // In rw mode, the topmost file must be present.
+ if (!path_exists(fn)) {
+ // !ro can only be true for i==0
+ if (!ro || (i == fns.size() - 1)) {
+ ok = false;
+ break;
+ }
}
}
// Only the first file is opened rw
ro = true;
- first = false;
}
m_ok = ok;
}
diff --git a/src/windows/mimeconf b/src/windows/mimeconf
index 832afa45..19a021d8 100644
--- a/src/windows/mimeconf
+++ b/src/windows/mimeconf
@@ -1,438 +1,38 @@
# (C) 2015-2022 J.F.Dockes
-# This file contains most of the data which determines how we
-# handle the different mime types (also see the "mimeview" file).
#
-# This is the version specific to MS-WINDOWS
+# MS-WINDOWS specific definitions for mimeconf
#
-# Sections:
-# top-level: Decompression parameters. Should not be at top-level, historical.
-# [index] : Associations of mime types to the filters that translate them
-# to plain text or html.
-# [icons] : Associations of mime types to result list icons (GUI)
-# [categories] : groupings of mime types (media, text, message etc.)
-# [guifilters] : defines the filtering checkboxes in the GUI. Uses the
-# above categories by default
-## #######################################
-# Decompression: these types need a first pass to create a temp file to
-# work with. We use a script because uncompress utilities usually work in
-# place, which is not suitable.
-#
-# Obviously this should be in a [decompress] section or such, but it was once
-# forgotten and remained global for compatibility...
-#
-# The %t parameter will be substituted to the name of a temporary directory
-# by recoll. This directory is guaranteed empty when calling the filter
-#
-# The %f parameter will be substituted with the input file.
-#
-# The script (ie: rcluncomp) must output the uncompressed file name on
-# stdout. Note that the windows version will always use 7z, and ignore
-# the decompressor parameter in the following lines
+# Decompression: the windows version always uses 7z, no decompressor parameter is necessary
application/gzip = uncompress rcluncomp.py 7z %f %t
application/x-gzip = uncompress rcluncomp.py 7z %f %t
application/x-compress = uncompress rcluncomp.py 7z %f %t
application/x-bzip2 = uncompress rcluncomp.py 7z %f %t
application/x-xz = uncompress rcluncomp.py 7z %f %t
application/x-lzma = uncompress rcluncomp.py 7z %f %t
+application/x-scribus =
+application/x-tex =
-## ###################################
-# Filters for indexing and internal preview.
-# The "internal" filters are hardwired in the c++ code.
-# The external "exec" filters are typically scripts. By default, they output the
-# document in simple html format, have a look at the scripts.
-# A different format (ie text/plain), and a character set can be defined for
-# each filter, see the exemples below (ie: msword)
[index]
-
-application/msword = execm rcldoc.py
-application/vnd.ms-excel = execm rclxls.py
-application/vnd.ms-outlook = execm rclpst.py
-application/vnd.ms-powerpoint = execm rclppt.py
-# Also Handle the mime type returned by "file -i" for a suffix-less word
-# file. This could probably just as well be an excel file, but we have to
-# chose one.
-application/vnd.ms-office = execm rcldoc.py
-
-application/vnd.oasis.opendocument.text = \
- internal xsltproc meta meta.xml opendoc-meta.xsl \
- body content.xml opendoc-body.xsl
-application/vnd.oasis.opendocument.text-template = \
- internal xsltproc meta meta.xml opendoc-meta.xsl \
- body content.xml opendoc-body.xsl
-application/vnd.oasis.opendocument.presentation = \
- internal xsltproc meta meta.xml opendoc-meta.xsl \
- body content.xml opendoc-body.xsl
-application/vnd.oasis.opendocument.spreadsheet = \
- internal xsltproc meta meta.xml opendoc-meta.xsl \
- body content.xml opendoc-body.xsl
-application/vnd.oasis.opendocument.graphics = \
- internal xsltproc meta meta.xml opendoc-meta.xsl \
- body content.xml opendoc-body.xsl
-application/vnd.oasis.opendocument.presentation-flat-xml = \
- internal xsltproc opendoc-flat.xsl
-application/vnd.oasis.opendocument.text-flat-xml = \
- internal xsltproc opendoc-flat.xsl
-application/vnd.oasis.opendocument.spreadsheet-flat-xml = \
- internal xsltproc opendoc-flat.xsl
-
-application/vnd.openxmlformats-officedocument.wordprocessingml.document = \
- internal xsltproc meta docProps/core.xml openxml-meta.xsl \
- body word/document.xml openxml-word-body.xsl \
- body word/footnotes.xml openxml-word-body.xsl \
- body word/endnotes.xml openxml-word-body.xsl
-application/vnd.openxmlformats-officedocument.wordprocessingml.template = \
- internal xsltproc meta docProps/core.xml openxml-meta.xsl \
- body word/document.xml openxml-word-body.xsl \
- body word/footnotes.xml openxml-word-body.xsl \
- body word/endnotes.xml openxml-word-body.xsl
-application/vnd.openxmlformats-officedocument.presentationml.template = \
- execm rclopxml.py
-application/vnd.openxmlformats-officedocument.presentationml.presentation = \
- execm rclopxml.py
-application/vnd.openxmlformats-officedocument.spreadsheetml.sheet = \
- internal xsltproc meta docProps/core.xml openxml-meta.xsl \
- body xl/sharedStrings.xml openxml-xls-body.xsl
-application/vnd.openxmlformats-officedocument.spreadsheetml.template =\
- internal xsltproc meta docProps/core.xml openxml-meta.xsl \
- body xl/sharedStrings.xml openxml-xls-body.xsl
-
-application/vnd.sun.xml.calc = \
- internal xsltproc meta meta.xml opendoc-meta.xsl \
- body content.xml opendoc-body.xsl
-application/vnd.sun.xml.calc.template = \
- internal xsltproc meta meta.xml opendoc-meta.xsl \
- body content.xml opendoc-body.xsl
-application/vnd.sun.xml.draw = \
- internal xsltproc meta meta.xml opendoc-meta.xsl \
- body content.xml opendoc-body.xsl
-application/vnd.sun.xml.draw.template = \
- internal xsltproc meta meta.xml opendoc-meta.xsl \
- body content.xml opendoc-body.xsl
-application/vnd.sun.xml.impress = \
- internal xsltproc meta meta.xml opendoc-meta.xsl \
- body content.xml opendoc-body.xsl
-application/vnd.sun.xml.impress.template = \
- internal xsltproc meta meta.xml opendoc-meta.xsl \
- body content.xml opendoc-body.xsl
-application/vnd.sun.xml.math = \
- internal xsltproc meta meta.xml opendoc-meta.xsl \
- body content.xml opendoc-body.xsl
-application/vnd.sun.xml.writer = \
- internal xsltproc meta meta.xml opendoc-meta.xsl \
- body content.xml opendoc-body.xsl
-application/vnd.sun.xml.writer.global = \
- internal xsltproc meta meta.xml opendoc-meta.xsl \
- body content.xml opendoc-body.xsl
-application/vnd.sun.xml.writer.template = \
- internal xsltproc meta meta.xml opendoc-meta.xsl \
- body content.xml opendoc-body.xsl
-
-#application/postscript = exec rclps
-#application/x-gnuinfo = execm rclinfo.py
-#application/x-tar = execm rcltar.py
-
-application/epub+zip = execm rclepub.py
-application/x-ipynb+json = execm rclipynb.py
-application/javascript = internal text/plain
-application/ogg = execm rclaudio.py
-application/pdf = execm rclpdf.py
-application/sql = internal text/plain
+application/postscript =
application/vnd.wordperfect = exec wpd/wpd2html;mimetype=text/html
-application/x-7z-compressed = execm rcl7z.py
-application/x-abiword = internal xsltproc abiword.xsl
-application/x-awk = internal text/plain
-application/x-chm = execm rclchm.py
-application/x-dia-diagram = execm rcldia.py;mimetype=text/plain
-application/x-flac = execm rclaudio.py
-application/x-gnote = execm rclxml.py
-application/x-hwp = execm rclhwp.py
-application/x-mimehtml = internal message/rfc822
-application/x-perl = internal text/plain
-application/x-php = internal text/plain
-application/x-rar = execm rclrar.py;charset=default
-application/x-shellscript = internal text/plain
-application/x-webarchive = execm rclwar.py
-application/x-zerosize = internal
-application/zip = execm rclzip.py;charset=default
-audio/aac = execm rclaudio.py
-audio/mp4 = execm rclaudio.py
-audio/mpeg = execm rclaudio.py
-audio/x-karaoke = execm rclkar.py
+application/x-dvi =
+application/x-gnuinfo =
+application/x-ipynb+json = execm rclipynb.py
+application/x-tar =
image/gif = execm rclimg.exe
image/jp2 = execm rclimg.exe
image/jpeg = execm rclimg.exe
image/png = execm rclimg.exe
-image/svg+xml = internal xsltproc svg.xsl
image/tiff = execm rclimg.exe
-image/vnd.djvu = execm rcldjvu.py
-inode/symlink = internal
-inode/x-empty = internal application/x-zerosize
-message/rfc822 = internal
-text/calendar = execm rclics.py;mimetype=text/plain
-text/css = internal text/plain
-text/html = internal
-text/plain = internal
-text/plain1 = internal
-#text/rtf = execm rclrtf.py
-text/rtf = exec unrtf --nopict --html;mimetype=text/html
-text/x-c = internal
-text/x-c+ = internal
-text/x-c++ = internal
-text/x-chm-html = internal text/html
-text/x-csharp = internal text/plain
-text/x-csv = internal text/plain
-text/x-fictionbook = internal xsltproc fb2.xsl
-text/x-ini = internal text/plain
-text/x-mail = internal
-text/x-orgmode = execm rclorgmode.py
-text/x-perl = internal text/plain
-text/x-python = execm rclpython.py
-text/x-shellscript = internal text/plain
-text/x-srt = internal text/plain
+image/x-nikon-nef = execm rclimg.exe
image/x-xcf = execm rclimg.exe
-
-# Generic XML is best indexed as text, else it generates too many errors
-# All parameter and tag names, attribute values etc, are indexed as
-# text. rclxml.py tries to just index the text content.
-#application/xml = execm rclxml.py
-#text/xml = execm rclxml.py
-application/xml = internal text/plain
-text/xml = internal text/plain
-
-## #############################################
-# Icons to be used in the result list if required by gui config
-[icons]
-application/epub+zip = book
-application/javascript = source
-application/msword = wordprocessing
-application/ogg = sownd
-application/pdf = pdf
-application/postscript = postscript
-application/vnd.ms-excel = spreadsheet
-application/vnd.ms-powerpoint = presentation
-application/vnd.oasis.opendocument.presentation = presentation
-application/vnd.oasis.opendocument.spreadsheet = spreadsheet
-application/vnd.oasis.opendocument.text = wordprocessing
-application/vnd.openxmlformats-officedocument.presentationml.presentation = presentation
-application/vnd.openxmlformats-officedocument.presentationml.template = presentation
-application/vnd.openxmlformats-officedocument.spreadsheetml.sheet = spreadsheet
-application/vnd.openxmlformats-officedocument.spreadsheetml.template = spreadsheet
-application/vnd.openxmlformats-officedocument.wordprocessingml.document = wordprocessing
-application/vnd.openxmlformats-officedocument.wordprocessingml.template = wordprocessing
-application/vnd.sun.xml.calc = spreadsheet
-application/vnd.sun.xml.calc.template = spreadsheet
-application/vnd.sun.xml.draw = drawing
-application/vnd.sun.xml.draw.template = drawing
-application/vnd.sun.xml.impress = presentation
-application/vnd.sun.xml.impress.template = presentation
-application/vnd.sun.xml.math = wordprocessing
-application/vnd.sun.xml.writer = wordprocessing
-application/vnd.sun.xml.writer.global = wordprocessing
-application/vnd.sun.xml.writer.template = wordprocessing
-application/vnd.wordperfect = wordprocessing
-application/x-abiword = wordprocessing
-application/x-awk = source
-application/x-chm = book
-application/x-dia-diagram = drawing
-application/x-dvi = document
-application/x-flac = sownd
-application/x-fsdirectory = folder
-application/x-gnote = document
-#application/x-gnuinfo = book
-application/x-gnumeric = spreadsheet
-application/x-ipynb+json = document
-application/x-kword = wordprocessing
-application/x-lyx = wordprocessing
-application/x-mimehtml = message
-application/x-mobipocket-ebook = document
-application/x-okular-notes = document
-application/x-perl = source
-application/x-php = source
-application/x-rar = archive
-application/x-scribus = document
-application/x-scribus = wordprocessing
-application/x-shellscript = source
-application/x-tar = archive
-application/x-tex = wordprocessing
-application/x-webarchive = archive
-application/xml = document
-application/zip = archive
-application/x-7z-compressed = archive
-audio/mpeg = sownd
-audio/x-karaoke = sownd
-image/bmp = image
-image/gif = image
-image/jp2 = image
-image/jpeg = image
-image/png = image
-image/svg+xml = drawing
-image/tiff = image
-image/vnd.djvu = document
-image/x-xcf = image
-image/x-xpmi = image
-inode/directory = folder
-inode/symlink = emblem-symbolic-link
-message/rfc822 = message
-text/html = html
-text/html|chm = bookchap
-text/html|epub = bookchap
-#text/html|gnuinfo = bookchap
-text/plain = txt
-text/rtf = wordprocessing
-text/x-c = source
-text/x-c+ = source
-text/x-c++ = source
-text/x-csv = txt
-text/x-fictionbook = document
-text/x-html-aptosid-man = aptosid-book
-text/x-html-sidux-man = sidux-book
-text/x-ini = txt
-text/x-mail = message
-text/x-man = document
-text/x-orgmode = document
-text/x-perl = source
-text/x-purple-html-log = pidgin
-text/x-purple-log = pidgin
-text/x-python = text-x-python
-text/x-shellscript = source
-text/x-tex = wordprocessing
-text/xml = document
-video/3gpp = video
-video/mp2p = video
-video/mp2t = video
-video/mp4 = video
-video/mpeg = video
-video/quicktime = video
-video/x-matroska = video
-video/x-ms-asf = video
-video/x-msvideo = video
-
-[categories]
-# Categories group mime types by "kind". They can be used from the query
-# language as an "rclcat" clause. This is fully dynamic, you can change the
-# names and groups as you wish, only the mime types are stored in the index.
-#
-# If you add/remove categories, you may also want to change the
-# "guifilters" section below.
-text = \
- application/epub+zip \
- application/msword \
- application/pdf \
- application/postscript \
- application/vnd.oasis.opendocument.text \
- application/vnd.openxmlformats-officedocument.wordprocessingml.document \
- application/vnd.openxmlformats-officedocument.wordprocessingml.template \
- application/vnd.sun.xml.writer \
- application/vnd.sun.xml.writer.global \
- application/vnd.sun.xml.writer.template \
- application/vnd.wordperfect \
- application/x-abiword \
- application/x-awk \
- application/x-chm \
- application/x-dvi \
- application/x-gnote \
- application/x-gnuinfo \
- application/x-ipynb+json \
- application/x-kword \
- application/x-lyx \
- application/x-mobipocket-ebook \
- application/x-okular-notes \
- application/x-perl \
- application/x-scribus \
- application/x-shellscript \
- application/x-tex \
- application/xml \
- text/xml \
- text/x-csv \
- text/x-tex \
- image/vnd.djvu \
- text/calendar \
- text/html \
- text/plain \
- text/rtf \
- text/x-c \
- text/x-c++ \
- text/x-c+ \
- text/x-fictionbook \
- text/x-html-aptosid-man \
- text/x-html-sidux-man \
- text/x-ini \
- text/x-man \
- text/x-orgmode \
- text/x-perl \
- text/x-python \
- text/x-shellscript
-
-spreadsheet = \
- application/vnd.ms-excel \
- application/vnd.oasis.opendocument.spreadsheet \
- application/vnd.openxmlformats-officedocument.spreadsheetml.sheet \
- application/vnd.openxmlformats-officedocument.spreadsheetml.template \
- application/vnd.sun.xml.calc \
- application/vnd.sun.xml.calc.template \
- application/x-gnumeric
-
-presentation = \
- application/vnd.ms-powerpoint \
- application/vnd.oasis.opendocument.presentation \
- application/vnd.openxmlformats-officedocument.presentationml.presentation \
- application/vnd.openxmlformats-officedocument.presentationml.template \
- application/vnd.sun.xml.impress \
- application/vnd.sun.xml.impress.template
-
-media = \
- application/ogg \
- application/x-flac \
- audio/* \
- image/* \
- video/* \
-
-message = message/rfc822 \
- text/x-gaim-log \
- text/x-mail \
- text/x-purple-log \
- text/x-purple-html-log \
-
-other = application/vnd.sun.xml.draw \
- application/vnd.sun.xml.draw.template \
- application/vnd.sun.xml.math \
- application/x-dia-diagram \
- application/x-fsdirectory \
- application/x-mimehtml \
- application/x-rar \
- application/x-tar \
- application/x-webarchive \
- application/zip \
- application/x-7z-compressed \
- inode/directory \
- inode/symlink \
-
-[guifilters]
-# This defines the top level filters in the GUI (accessed by the the
-# radiobuttons above the results area, or a toolbar combobox).
-# Each entry defines a label and a query language fragment that will be
-# applied to filter the current query if the option is activated.
-#
-# This does not really belong in mimeconf, but it does belong in the index
-# config (not the GUI one), because it's not necessarily the same in all
-# configs, it has to go somewhere, and it's not worth a separate config
-# file...
-#
-# By default this filters by document category (see above), but any
-# language fragment should be ok. Be aware though that the "document
-# history" queries only know about simple "rclcat" filtering.
-#
-# If you don't want the filter names to be displayed in alphabetic order,
-# you can define them with a colon. The part before the colon is not
-# displayed but used for ordering, ie: a:zzbutshouldbefirst b:aacomeslast
-#
-text = rclcat:text
-spreadsheet = rclcat:spreadsheet
-presentation = rclcat:presentation
-media = rclcat:media
-message = rclcat:message
-other = rclcat:other
-
+text/x-bibtex =
+text/x-gaim-log =
+text/x-html-aptosid-man =
+text/x-man =
+text/x-purple-log =
+text/x-tex =
+video/x-msvideo = execm rclimg.exe
diff --git a/src/windows/mimeview b/src/windows/mimeview
index dcf97fe3..72dc53f8 100644
--- a/src/windows/mimeview
+++ b/src/windows/mimeview
@@ -1,21 +1,5 @@
-## ##########################################
-# External viewers, launched by the recoll GUI when you click on a result
-# 'edit' link
-#
-# MS WINDOWS VERSION
-#
-# Mime types which we should not uncompress if they are found gzipped or
-# bzipped because the native viewer knows how to handle. These would be
-# exceptions and the list is normally empty
-#nouncompforviewmts =
+# MS WINDOWS system changes for mimeview
-# For releases 1.18 and later: exceptions when using the x-all entry: these
-# types will use their local definition. This is useful, e.g.:
-#
-# - for pdf, where we can pass additional parameters like page to open and
-# search string
-# - For pages of CHM and EPUB documents where we can choose to open the
-# parent document instead of a temporary html file.
xallexcepts = \
text/html|epub \
application/x-fsdirectory|parentopen inode/directory|parentopen
@@ -44,157 +28,6 @@ application/pdf = C:/users/bill/appdata/local/apps/evince-2.32.0.145/bin/evince
#application/pdf = "C:/Program Files/SumatraPDF/SumatraPDF.exe" -page %p %f
#application/pdf = "C:/Program Files (x86)/Foxit Software/Foxit Reader/FoxitReader.exe" %f /A page=%p
-###### THE FOLLOWING ARE NOT USED AT ALL ON WINDOWS, but the types need to
-###### be listed for an "Open" link to appear in the result list
-application/epub+zip = ebook-viewer %f
-
-application/x-gnote = gnote %f
-
-application/x-mobipocket-ebook = ebook-viewer %f
-
-application/x-kword = kword %f
-application/x-abiword = abiword %f
-
-
-application/postscript = evince --page-index=%p --find=%s %f
-application/x-dvi = evince --page-index=%p --find=%s %f
-
-application/x-lyx = lyx %f
-application/x-scribus = scribus %f
-
-#application/msword = libreoffice %f
-application/msword = \
- "C:/Program Files (x86)/LibreOffice 5/program/soffice.exe" %f
-
-application/x-hwp = hanword %f
-
-application/vnd.ms-excel = libreoffice %f
-application/vnd.ms-powerpoint = libreoffice %f
-
-application/vnd.oasis.opendocument.text = libreoffice %f
-application/vnd.oasis.opendocument.presentation = libreoffice %f
-application/vnd.oasis.opendocument.spreadsheet = libreoffice %f
-
-application/vnd.openxmlformats-officedocument.wordprocessingml.document = \
- libreoffice %f
-application/vnd.openxmlformats-officedocument.wordprocessingml.template = \
- libreoffice %f
-application/vnd.openxmlformats-officedocument.presentationml.template = \
- libreoffice %f
-application/vnd.openxmlformats-officedocument.presentationml.presentation = \
- libreoffice %f
-application/vnd.openxmlformats-officedocument.spreadsheetml.sheet = \
- libreoffice %f
-application/vnd.openxmlformats-officedocument.spreadsheetml.template =\
- libreoffice %f
-application/vnd.sun.xml.calc = libreoffice %f
-application/vnd.sun.xml.calc.template = libreoffice %f
-application/vnd.sun.xml.draw = libreoffice %f
-application/vnd.sun.xml.draw.template = libreoffice %f
-application/vnd.sun.xml.impress = libreoffice %f
-application/vnd.sun.xml.impress.template = libreoffice %f
-application/vnd.sun.xml.math = libreoffice %f
-application/vnd.sun.xml.writer = libreoffice %f
-application/vnd.sun.xml.writer.global = libreoffice %f
-application/vnd.sun.xml.writer.template = libreoffice %f
-application/vnd.wordperfect = libreoffice %f
-text/rtf = libreoffice %f
-
-application/x-dia-diagram = dia %f
-
-application/x-fsdirectory = dolphin %f
-inode/directory = dolphin %f
-
-application/x-gnuinfo = xterm -e "info -f %f"
-application/x-gnumeric = gnumeric %f
-
-application/x-flac = rhythmbox %f
-audio/mpeg = rhythmbox %f
-application/ogg = rhythmbox %f
-audio/x-karaoke = kmid %f
-
-image/jpeg = gwenview %f
-image/png = gwenview %f
-image/tiff = gwenview %f
-image/gif = gwenview %f
-image/svg+xml = inkview %f
-image/vnd.djvu = djview %f
-image/x-xcf = gimp %f
-image/bmp = gwenview %f
-image/x-ms-bmp = gwenview %f
-image/x-xpmi = gwenview %f
-
-# Opening mail messages not always works.
-# - Thunderbird will only open a single-message file if it has an .emf
-# extension
-# - "sylpheed %f" seems to work ok as of version 3.3
-# - "kmail --view %u" works
-message/rfc822 = thunderbird -file %f
-text/x-mail = thunderbird -file %f
-application/x-mimehtml = thunderbird -file %f
-
-text/calendar = evolution %f
-
-application/x-okular-notes = okular %f
-
-application/x-rar = ark %f
-application/x-tar = ark %f
-application/zip = ark %f
-application/x-7z-compressed = ark %f
-
-application/x-awk = emacsclient --no-wait %f
-application/x-perl = emacsclient --no-wait %f
-text/x-perl = emacsclient --no-wait %f
-application/x-shellscript = emacsclient --no-wait %f
-text/x-shellscript = emacsclient --no-wait %f
-text/x-srt = emacsclient --no-wait %f
-
-# Or firefox -remote "openFile(%u)"
-text/html = firefox %u
-
-# gnu info nodes are translated to html with a "gnuinfo"
-# rclaptg. rclshowinfo knows how to start the info command on the right
-# node
-text/html|gnuinfo = rclshowinfo %F %(title);ignoreipath=1
-
-application/x-webarchive = konqueror %f
-text/x-fictionbook = ebook-viewer %f
-application/x-tex = emacsclient --no-wait %f
-application/xml = emacsclient --no-wait %f
-text/xml = emacsclient --no-wait %f
-text/x-tex = emacsclient --no-wait %f
-text/plain = emacsclient --no-wait %f
-text/x-awk = emacsclient --no-wait %f
-text/x-c = emacsclient --no-wait %f
-text/x-c+ = emacsclient --no-wait %f
-text/x-c++ = emacsclient --no-wait %f
-text/x-csv = libreoffice %f
-text/x-html-sidux-man = konqueror %f
-text/x-html-aptosid-man = iceweasel %f
-
-application/x-chm = kchmviewer %f
-# Html pages inside a chm have a chm rclaptg set by the filter. Kchmviewer
-# knows how to use the ipath (which is the internal chm path) to open the
-# file at the right place
-text/html|chm = kchmviewer --url %i %F
-
-text/x-ini = emacsclient --no-wait %f
-text/x-man = xterm -u8 -e "groff -T ascii -man %f | more"
-text/x-python = idle %f
-text/x-gaim-log = emacsclient --no-wait %f
-text/x-purple-html-log = emacsclient --no-wait %f
-text/x-purple-log = emacsclient --no-wait %f
-
-# The video types will usually be handled by the desktop default, but they
-# need entries here to get an "Open" link
-video/3gpp = vlc %f
-video/mp2p = vlc %f
-video/mp2t = vlc %f
-video/mp4 = vlc %f
-video/mpeg = vlc %f
-video/quicktime = vlc %f
-video/x-matroska = vlc %f
-video/x-ms-asf = vlc %f
-video/x-msvideo = vlc %f
-
-
+##########
+# Other MIME types have no specializations on Windows, but the types need to be listed for an "Open"
+# link to appear in the result list, the listing is in the generic file
diff --git a/src/windows/mkinstdir.sh b/src/windows/mkinstdir.sh
index f37654c7..f01001ad 100644
--- a/src/windows/mkinstdir.sh
+++ b/src/windows/mkinstdir.sh
@@ -171,13 +171,15 @@ copyrecoll()
chkcp $RCL/doc/user/docbook-xsl.css $DESTDIR/Share/doc
mkdir -p $DESTDIR/Share/doc/webhelp
rsync -av $RCL/doc/user/webhelp/docs/* $DESTDIR/Share/doc/webhelp || exit 1
- chkcp $RCL/sampleconf/fields $DESTDIR/Share/examples
+ chkcp $RCL/sampleconf/fields $DESTDIR/Share/examples
chkcp $RCL/sampleconf/fragment-buttons.xml $DESTDIR/Share/examples
- chkcp $RCL/windows/mimeconf $DESTDIR/Share/examples
- chkcp $RCL/sampleconf/mimemap $DESTDIR/Share/examples
- chkcp $RCL/windows/mimeview $DESTDIR/Share/examples
- chkcp $RCL/sampleconf/recoll.conf $DESTDIR/Share/examples
- chkcp $RCL/sampleconf/recoll.qss $DESTDIR/Share/examples
+ chkcp $RCL/sampleconf/mimeconf $DESTDIR/Share/examples
+ chkcp $RCL/sampleconf/mimeview $DESTDIR/Share/examples
+ chkcp $RCL/sampleconf/mimemap $DESTDIR/Share/examples
+ chkcp $RCL/windows/mimeconf $DESTDIR/Share/examples/windows
+ chkcp $RCL/windows/mimeview $DESTDIR/Share/examples/windows
+ chkcp $RCL/sampleconf/recoll.conf $DESTDIR/Share/examples
+ chkcp $RCL/sampleconf/recoll.qss $DESTDIR/Share/examples
chkcp $RCL/sampleconf/recoll-dark.qss $DESTDIR/Share/examples
chkcp $RCL/sampleconf/recoll-dark.css $DESTDIR/Share/examples
@@ -349,7 +351,7 @@ test "$VERSION" = "$CFVERS" ||
echo Packaging version $CFVERS
-for d in doc examples filters images translations; do
+for d in doc examples examples/windows filters images translations; do
test -d $DESTDIR/Share/$d || mkdir -p $DESTDIR/Share/$d || \
fatal mkdir $d failed
done
From 87f86ac26857c431e6e90ea32298cd14c07ee41c Mon Sep 17 00:00:00 2001
From: Jean-Francois Dockes
Date: Sat, 15 Jan 2022 10:41:41 +0100
Subject: [PATCH 18/19] Adjust config setup for macos
---
src/qtgui/recoll-win.pro | 34 +++---
src/sampleconf/macos/mimeview | 9 ++
src/sampleconf/mimeview.mac | 197 ----------------------------------
3 files changed, 27 insertions(+), 213 deletions(-)
create mode 100644 src/sampleconf/macos/mimeview
delete mode 100644 src/sampleconf/mimeview.mac
diff --git a/src/qtgui/recoll-win.pro b/src/qtgui/recoll-win.pro
index 5e18edf2..7a959d35 100644
--- a/src/qtgui/recoll-win.pro
+++ b/src/qtgui/recoll-win.pro
@@ -170,30 +170,32 @@ mac {
rtitool.cpp
FORMS += \
- crontool.ui \
- rtitool.ui
+ crontool.ui \
+ rtitool.ui
LIBS += \
-../windows/build-librecoll-Desktop_Qt_5_14_2_clang_64bit-Release/liblibrecoll.a \
- ../../../xapian-core-1.4.18/.libs/libxapian.a \
- -lxslt -lxml2 -liconv -lz
+ ../windows/build-librecoll-Desktop_Qt_5_14_2_clang_64bit-Release/liblibrecoll.a \
+ ../../../xapian-core-1.4.18/.libs/libxapian.a \
+ -lxslt -lxml2 -liconv -lz
ICON = images/recoll.icns
- system(cp ../sampleconf/mimeview.mac ../mimeview)
-
APP_EXAMPLES.files = \
- ../sampleconf/fragment-buttons.xml \
- ../sampleconf/fields \
- ../sampleconf/recoll.conf \
- ../sampleconf/mimeconf \
- ../sampleconf/recoll.qss \
- ../sampleconf/recoll-dark.qss \
- ../sampleconf/recoll-dark.css \
- ../sampleconf/mimemap \
- ../mimeview
+ ../sampleconf/fragment-buttons.xml \
+ ../sampleconf/fields \
+ ../sampleconf/recoll.conf \
+ ../sampleconf/mimeconf \
+ ../sampleconf/mimeview \
+ ../sampleconf/mimemap \
+ ../sampleconf/recoll.qss \
+ ../sampleconf/recoll-dark.qss \
+ ../sampleconf/recoll-dark.css
APP_EXAMPLES.path = Contents/Resources/examples
+ APP_EXAMPLES_MAC.files = \
+ ../sampleconf/macos/mimeview
+ APP_EXAMPLES_MAC.path = Contents/Resources/examples/macos
+
APP_FILTERS.files = \
../filters/abiword.xsl \
../filters/cmdtalk.py \
diff --git a/src/sampleconf/macos/mimeview b/src/sampleconf/macos/mimeview
new file mode 100644
index 00000000..6cbe6878
--- /dev/null
+++ b/src/sampleconf/macos/mimeview
@@ -0,0 +1,9 @@
+# External viewers, launched by the recoll GUI when you click on a result
+# 'Open' link - MAC version
+# On the MAC, we use "open" for everything, no exceptions at the moment.
+
+xallexcepts =
+
+[view]
+# Pseudo entry used if the 'use desktop' preference is set in the GUI
+application/x-all = open %f
diff --git a/src/sampleconf/mimeview.mac b/src/sampleconf/mimeview.mac
deleted file mode 100644
index 9677e472..00000000
--- a/src/sampleconf/mimeview.mac
+++ /dev/null
@@ -1,197 +0,0 @@
-# @(#$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
-# 'Open' link - MAC version
-# On the MAC, we use "open" for everything...
-
-# Mime types which we should not uncompress if they are found gzipped or
-# bzipped because the native viewer knows how to handle. These would be
-# exceptions and the list is normally empty
-#nouncompforviewmts =
-
-# For releases 1.18 and later: exceptions when using the x-all entry: these
-# types will use their local definition. This is useful, e.g.:
-#
-# - for pdf, where we can pass additional parameters like page to open and
-# search string
-# - For pages of CHM and EPUB documents where we can choose to open the
-# parent document instead of a temporary html file.
-#xallexcepts = application/pdf application/postscript application/x-dvi \
-# text/html|gnuinfo text/html|chm text/html|epub
-
-[view]
-# Pseudo entry used if the 'use desktop' preference is set in the GUI
-application/x-all = open %f
-
-application/epub+zip = ebook-viewer %f
-# If you want to open the parent epub document for epub parts instead of
-# opening them as html documents:
-#text/html|epub = ebook-viewer %F;ignoreipath=1
-
-application/x-gnote = gnote %f
-
-application/x-mobipocket-ebook = ebook-viewer %f
-
-application/x-kword = kword %f
-application/x-abiword = abiword %f
-
-# Note: the Linux Mint evince clones, atril and xread, have the same options
-application/pdf = evince --page-index=%p --find=%s %f
-# Or:
-#application/pdf = qpdfview --search %s %f#%p
-
-application/postscript = evince --page-index=%p --find=%s %f
-application/x-dvi = evince --page-index=%p --find=%s %f
-
-application/x-lyx = lyx %f
-application/x-scribus = scribus %f
-
-application/msword = libreoffice %f
-application/vnd.ms-excel = libreoffice %f
-application/vnd.ms-powerpoint = libreoffice %f
-
-application/vnd.oasis.opendocument.text = libreoffice %f
-application/vnd.oasis.opendocument.presentation = libreoffice %f
-application/vnd.oasis.opendocument.spreadsheet = libreoffice %f
-
-application/vnd.openxmlformats-officedocument.wordprocessingml.document = \
- libreoffice %f
-application/vnd.openxmlformats-officedocument.wordprocessingml.template = \
- libreoffice %f
-application/vnd.openxmlformats-officedocument.presentationml.template = \
- libreoffice %f
-application/vnd.openxmlformats-officedocument.presentationml.presentation = \
- libreoffice %f
-application/vnd.openxmlformats-officedocument.spreadsheetml.sheet = \
- libreoffice %f
-application/vnd.openxmlformats-officedocument.spreadsheetml.template =\
- libreoffice %f
-application/vnd.sun.xml.calc = libreoffice %f
-application/vnd.sun.xml.calc.template = libreoffice %f
-application/vnd.sun.xml.draw = libreoffice %f
-application/vnd.sun.xml.draw.template = libreoffice %f
-application/vnd.sun.xml.impress = libreoffice %f
-application/vnd.sun.xml.impress.template = libreoffice %f
-application/vnd.sun.xml.math = libreoffice %f
-application/vnd.sun.xml.writer = libreoffice %f
-application/vnd.sun.xml.writer.global = libreoffice %f
-application/vnd.sun.xml.writer.template = libreoffice %f
-application/vnd.wordperfect = libreoffice %f
-text/rtf = libreoffice %f
-
-application/x-dia-diagram = dia %f
-
-application/x-fsdirectory = dolphin %f
-inode/directory = dolphin %f
-
-# Both dolphin and nautilus can pre-select a file inside a
-# directory. Thunar can't afaik. xdg-open cant pass an additional
-# parameters so these are to be xallexcepts.
-application/x-fsdirectory|parentopen = dolphin --select %(childurl) %f
-inode/directory|parentopen = dolphin --select %(childurl) %f
-#application/x-fsdirectory|parentopen = nautilus %(childurl)
-#inode/directory|parentopen = nautilus %(childurl)
-
-application/x-gnuinfo = xterm -e "info -f %f"
-application/x-gnumeric = gnumeric %f
-
-application/x-flac = rhythmbox %f
-audio/mpeg = rhythmbox %f
-application/ogg = rhythmbox %f
-audio/x-karaoke = kmid %f
-
-image/jpeg = gwenview %f
-image/png = gwenview %f
-image/tiff = gwenview %f
-image/gif = gwenview %f
-image/svg+xml = inkview %f
-image/vnd.djvu = djview %f
-image/x-xcf = gimp %f
-image/bmp = gwenview %f
-image/x-ms-bmp = gwenview %f
-image/x-xpmi = gwenview %f
-image/x-nikon-nef = ufraw %f
-
-# Opening mail messages:
-# - Thunderbird will only open a single-message file if it has an .eml
-# extension
-# - "sylpheed %f" seems to work ok as of version 3.3
-# - "kmail --view %u" works
-# - claws-mail: works using a small intermediary shell-script, which you
-# set as the viewer here. You need to have at least one account inside
-# claws-mail, so that it creates ~/Mail/inbox. Script contents example
-# follows. Using 1 is probably not a good idea if this is a real account
-# (here I am using a bogus one, so that I can overwrite anything inside
-# inbox at will):
-# #!/bin/bash
-# cp $1 ~/Mail/inbox/1
-# claws-mail --select ~/Mail/inbox/1
-# rm ~/Mail/inbox/1
-message/rfc822 = thunderbird -file %f
-
-text/x-mail = thunderbird -file %f
-application/x-mimehtml = thunderbird -file %f
-
-text/calendar = evolution %f
-
-application/x-okular-notes = okular %f
-
-application/x-rar = ark %f
-application/x-tar = ark %f
-application/zip = ark %f
-application/x-7z-compressed = ark %f
-
-application/x-awk = emacsclient %f
-application/x-perl = emacsclient %f
-text/x-perl = emacsclient %f
-application/x-shellscript = emacsclient %f
-text/x-shellscript = emacsclient %f
-
-# Or firefox -remote "openFile(%u)"
-text/html = firefox %u
-
-# gnu info nodes are translated to html with a "gnuinfo"
-# rclaptg. rclshowinfo knows how to start the info command on the right
-# node
-text/html|gnuinfo = rclshowinfo %F %(title);ignoreipath=1
-
-application/x-webarchive = konqueror %f
-text/x-fictionbook = ebook-viewer %f
-application/x-tex = emacsclient %f
-application/xml = emacsclient %f
-text/xml = emacsclient %f
-text/x-tex = emacsclient %f
-text/plain = emacsclient %f
-text/x-awk = emacsclient %f
-text/x-c = emacsclient %f
-text/x-c+ = emacsclient %f
-text/x-c++ = emacsclient %f
-text/x-csv = libreoffice %f
-text/x-html-sidux-man = konqueror %f
-text/x-html-aptosid-man = iceweasel %f
-
-application/x-chm = kchmviewer %f
-# Html pages inside a chm have a chm rclaptg set by the filter. Kchmviewer
-# knows how to use the ipath (which is the internal chm path) to open the
-# file at the right place
-text/html|chm = kchmviewer --url %i %F
-
-text/x-ini = emacsclient %f
-text/x-man = xterm -u8 -e "groff -T ascii -man %f | more"
-text/x-python = idle %f
-text/x-gaim-log = emacsclient %f
-text/x-purple-html-log = emacsclient %f
-text/x-purple-log = emacsclient %f
-
-# The video types will usually be handled by the desktop default, but they
-# need entries here to get an "Open" link
-video/3gpp = open %f
-video/mp2p = open %f
-video/mp2t = open %f
-video/mp4 = open %f
-video/mpeg = open %f
-video/quicktime = open %f
-video/x-matroska = open %f
-video/x-ms-asf = open %f
-video/x-msvideo = open %f
From b51f9efcf74e683215c2433ad691dbbaad5179d9 Mon Sep 17 00:00:00 2001
From: Jean-Francois Dockes
Date: Sat, 15 Jan 2022 09:44:09 +0000
Subject: [PATCH 19/19] Windows qmake files: add deps on librecoll for the exes
---
src/qtgui/recoll-win.pro | 41 +++++++++++++--------------
src/windows/qmkrecoll/recollindex.pro | 34 +++++++++++-----------
src/windows/qmkrecoll/recollq.pro | 14 ++++-----
3 files changed, 42 insertions(+), 47 deletions(-)
diff --git a/src/qtgui/recoll-win.pro b/src/qtgui/recoll-win.pro
index 7a959d35..39eae455 100644
--- a/src/qtgui/recoll-win.pro
+++ b/src/qtgui/recoll-win.pro
@@ -117,40 +117,39 @@ INCLUDEPATH += ../common ../index ../internfile ../query ../unac \
../utils ../aspell ../rcldb ../qtgui ../xaposix \
confgui widgets
windows {
- DEFINES += PSAPI_VERSION=1
- DEFINES += __WIN32__
- DEFINES += UNICODE
- RC_FILE = recoll.rc
+ DEFINES += PSAPI_VERSION=1
+ DEFINES += __WIN32__
+ DEFINES += UNICODE
+ RC_FILE = recoll.rc
- HEADERS += \
- winschedtool.h
- SOURCES += \
+ HEADERS += \
+ winschedtool.h
+ SOURCES += \
winschedtool.cpp
- FORMS += \
+ FORMS += \
winschedtool.ui
- contains(QMAKE_CC, gcc){
- # MingW
- QMAKE_CXXFLAGS += -std=c++11 -Wno-unused-parameter
- LIBS += C:/recoll/src/windows/build-librecoll-Desktop_Qt_5_8_0_MinGW_32bit-Release/release/librecoll.dll
- }
+ contains(QMAKE_CC, gcc){
+ # MingW
+ QMAKE_CXXFLAGS += -std=c++11 -Wno-unused-parameter
+ LIBS += \
+ C:/recoll/src/windows/build-librecoll-Desktop_Qt_5_8_0_MinGW_32bit-Release/release/librecoll.dll
+ }
contains(QMAKE_CC, cl){
# MSVC
RECOLLDEPS = ../../../recolldeps/msvc
DEFINES += USING_STATIC_LIBICONV
+ PRE_TARGETDEPS = \
+ ../windows/build-librecoll-Desktop_Qt_5_14_2_MSVC2017_32bit-Release/release/librecoll.lib
LIBS += \
- -L../windows/build-librecoll-Desktop_Qt_5_14_2_MSVC2017_32bit-Release/release \
- -llibrecoll \
+ -L../windows/build-librecoll-Desktop_Qt_5_14_2_MSVC2017_32bit-Release/release -llibrecoll \
$$RECOLLDEPS/libxml2/libxml2-2.9.4+dfsg1/win32/bin.msvc/libxml2.lib \
$$RECOLLDEPS/libxslt/libxslt-1.1.29/win32/bin.msvc/libxslt.lib \
- -L../windows/build-libxapian-Desktop_Qt_5_14_2_MSVC2017_32bit-Release/release \
- -llibxapian \
- -L$$RECOLLDEPS/build-libiconv-Desktop_Qt_5_14_2_MSVC2017_32bit-Release/release \
- -llibiconv \
+ -L../windows/build-libxapian-Desktop_Qt_5_14_2_MSVC2017_32bit-Release/release -llibxapian \
+ -L$$RECOLLDEPS/build-libiconv-Desktop_Qt_5_14_2_MSVC2017_32bit-Release/release -llibiconv \
$$RECOLLDEPS/zlib-1.2.11/zdll.lib \
- -lrpcrt4 -lws2_32 -luser32 \
- -lshell32 -lshlwapi -lpsapi -lkernel32
+ -lrpcrt4 -lws2_32 -luser32 -lshell32 -lshlwapi -lpsapi -lkernel32
}
}
diff --git a/src/windows/qmkrecoll/recollindex.pro b/src/windows/qmkrecoll/recollindex.pro
index 9fa47f03..c0b18fdb 100644
--- a/src/windows/qmkrecoll/recollindex.pro
+++ b/src/windows/qmkrecoll/recollindex.pro
@@ -35,25 +35,23 @@ windows {
LIBS += \
../build-librecoll-Desktop_Qt_5_8_0_MinGW_32bit-Release/release/librecoll.dll \
-lshlwapi -lpsapi -lkernel32
- }
+ }
- contains(QMAKE_CC, cl){
- # MSVC
- RECOLLDEPS = ../../../../recolldeps/msvc
- DEFINES += USING_STATIC_LIBICONV
- LIBS += \
- -L../build-librecoll-Desktop_Qt_5_14_2_MSVC2017_32bit-Release/release \
- -llibrecoll \
- $$RECOLLDEPS/libxml2/libxml2-2.9.4+dfsg1/win32/bin.msvc/libxml2.lib \
- $$RECOLLDEPS/libxslt/libxslt-1.1.29/win32/bin.msvc/libxslt.lib \
- -L../build-libxapian-Desktop_Qt_5_14_2_MSVC2017_32bit-Release/release \
- -llibxapian \
- $$RECOLLDEPS/zlib-1.2.11/zdll.lib \
- -L$$RECOLLDEPS/build-libiconv-Desktop_Qt_5_14_2_MSVC2017_32bit-Release/release \
- -llibiconv -lShell32 \
- -lrpcrt4 -lws2_32 -luser32 \
- -lshlwapi -lpsapi -lkernel32
- }
+ contains(QMAKE_CC, cl){
+ # MSVC
+ RECOLLDEPS = ../../../../recolldeps/msvc
+ DEFINES += USING_STATIC_LIBICONV
+ PRE_TARGETDEPS = \
+ ../build-librecoll-Desktop_Qt_5_14_2_MSVC2017_32bit-Release/release/librecoll.lib
+ LIBS += \
+ -L../build-librecoll-Desktop_Qt_5_14_2_MSVC2017_32bit-Release/release -llibrecoll \
+ $$RECOLLDEPS/libxml2/libxml2-2.9.4+dfsg1/win32/bin.msvc/libxml2.lib \
+ $$RECOLLDEPS/libxslt/libxslt-1.1.29/win32/bin.msvc/libxslt.lib \
+ -L../build-libxapian-Desktop_Qt_5_14_2_MSVC2017_32bit-Release/release -llibxapian \
+ $$RECOLLDEPS/zlib-1.2.11/zdll.lib \
+ -L$$RECOLLDEPS/build-libiconv-Desktop_Qt_5_14_2_MSVC2017_32bit-Release/release -llibiconv \
+ -lShell32 -lrpcrt4 -lws2_32 -luser32 -lshlwapi -lpsapi -lkernel32
+ }
INCLUDEPATH += ../../windows
SOURCES += ../../windows/getopt.cc
diff --git a/src/windows/qmkrecoll/recollq.pro b/src/windows/qmkrecoll/recollq.pro
index cc91d078..527d5a1a 100644
--- a/src/windows/qmkrecoll/recollq.pro
+++ b/src/windows/qmkrecoll/recollq.pro
@@ -29,18 +29,16 @@ windows {
contains(QMAKE_CC, cl){
# Visual Studio
RECOLLDEPS = ../../../../recolldeps/msvc
+ PRE_TARGETDEPS = \
+ ../build-librecoll-Desktop_Qt_5_14_2_MSVC2017_32bit-Release/release/librecoll.lib
LIBS += \
- -L../build-librecoll-Desktop_Qt_5_14_2_MSVC2017_32bit-Release/release \
- -llibrecoll \
+ -L../build-librecoll-Desktop_Qt_5_14_2_MSVC2017_32bit-Release/release -llibrecoll \
$$RECOLLDEPS/libxml2/libxml2-2.9.4+dfsg1/win32/bin.msvc/libxml2.lib \
$$RECOLLDEPS/libxslt/libxslt-1.1.29/win32/bin.msvc/libxslt.lib \
- -L../build-libxapian-Desktop_Qt_5_14_2_MSVC2017_32bit-Release/release \
- -llibxapian \
- -L$$RECOLLDEPS/build-libiconv-Desktop_Qt_5_14_2_MSVC2017_32bit-Release/release/ \
- -llibiconv \
+ -L../build-libxapian-Desktop_Qt_5_14_2_MSVC2017_32bit-Release/release -llibxapian \
+ -L$$RECOLLDEPS/build-libiconv-Desktop_Qt_5_14_2_MSVC2017_32bit-Release/release/ -llibiconv \
$$RECOLLDEPS/zlib-1.2.11/zdll.lib \
- -lrpcrt4 -lws2_32 -luser32 -lshell32 \
- -lshlwapi -lpsapi -lkernel32
+ -lrpcrt4 -lws2_32 -luser32 -lshell32 -lshlwapi -lpsapi -lkernel32
}
INCLUDEPATH += ../../windows