Installing a handler for a new document type
It will sometimes happen that a newer Recoll release has support for a document type which would be useful to you, but which your older release does not support.
In the "old Recoll times" new handlers appeared frequently and this page would often be useful. This no longer really the case, new handlers are few and far between.
It is in general easy to import support from the newer to the older release: the Recoll input handler interface is very stable, so things should just work.
We will take an example to make things more concrete: Tomboy and Gnote files are directly supported by Recoll 1.19, but not in older Recoll releases. The rclxml.py handler is needed to process them.
The following procedure will allow you to retrofit support:
-
Retrieve the rclxml.py input handler from: link:https://framagit.org/medoc92/recoll/-/tree/master/src/filters?ref_type=heads
-
Copy it to '/usr/share/recoll/filters' and make it executable:
chmod +x rclxml.py -
Edit '~/.recoll/mimemap', add the following line:
.note = application/x-gnote -
Edit '~/.recoll/mimeconf', add the following lines:
[index] application/x-gnote = execm rclxml.py
-
Edit '~/.recoll/mimeview', add the following lines:
[view] application/x-gnote = tomboy %f
-
The easiest way to make sure the files are indexed with the new input handlers may then be to just run a full indexing pass (
recollindex -z).
Notes:
-
The MIME type which is used is not crucial, you could prefer to use, e.g., application/x-tomboy instead, it just has to be consistent. To avoid future trouble, it’s better to use the type used by newer Recoll releases though.
-
The 'mimeview' entry is necessary even if you are using the desktop preferences to open files. The value will not be used, but it has to be there.