Recoll version 1.37
Recoll acquired a capability to index a Joplin notes database around version 1.36. The indexing
script installed by default as of 1.37.0 (with configuration tweaks needed). As of Recoll 1.37.1 the
function just needs to be activated by creating a backends
file (see below). The rcljoplin.py
is
installed in the filters
directory in the installation.
You will need to install the Recoll Python3 extension (on Debian: python3-recoll
).
This document is almost a duplicate of the comments in the rcljoplin.py
script.
The Joplin indexer script is an external indexer, not a Recoll document handler. It manages the
documents inside the index all by itself. The documents are marked with a backend identifier
(JOPLIN
) so that the main indexer will leave them alone. At query time, they can also be
specifically selected with an rclbes:joplin
clause.
The section about the indexing API in the Recoll manual has more information about external indexers.
The Joplin notes are processed as standalone documents, not embedded ones (subdocuments of a main file). This is possible because the notes have update timestamps so that we can decide individually if they need a reindex.
By default the script looks for the Joplin db in ~/.config/joplin-desktop/database.sqlite
This can be changed by setting joplindbpath
in recoll.conf
Configuration files
As of version 1.37.1, the mimeconf
and mimeview
additions are present in the default
files. These, and the backends
file need to exist for any index which would add the Joplin one as
an external index.
rcljoplin.py [-c pathtoconfdir] config
can take care to update the chosen configuration for
you. Here follows a description anyway.
backends
This is the link between recoll and this script. The rcljoplin.py script is now installed with the standard Recoll document handlers, so that there is no need for a path to the script. One could be used if the script was modified and stored elsewhere. Recoll will add parameters to the base commands.
[JOPLIN] fetch = rcljoplin.py fetch makesig = rcljoplin.py makesig index = rcljoplin.py index
mimeconf
This tells recoll that the data from this indexer, to which we give a specific MIME type, should be turned into text by a null operation.
[index] application/x-joplin-note = internal text/plain
mimeview
This tells recoll to open notes by using the URL (which was created by this indexer as a browser-appropriate link to a joplin note). Can’t use the default entry because it badly encodes the URL (%U) for some reason.
xallexcepts+ = application/x-joplin-note [view] application/x-joplin-note = xdg-open %u