There was an error in the mimemap format in the config exemple
This commit is contained in:
parent
10580efaf4
commit
4f7fed589f
@ -3410,45 +3410,45 @@ skippedPaths = ~/somedir/∗.txt
|
|||||||
<sect3 id="rclinstall.config.examples.addview">
|
<sect3 id="rclinstall.config.examples.addview">
|
||||||
<title>Adding an external viewer for an non-indexed type</title>
|
<title>Adding an external viewer for an non-indexed type</title>
|
||||||
|
|
||||||
<para>Imagine that you have some kind of file which does not
|
<para>Imagine that you have some kind of file which does not
|
||||||
have indexable content, but for which you would like to have a
|
have indexable content, but for which you would like to have a
|
||||||
functional <guilabel>Edit</guilabel> link in the result list
|
functional <guilabel>Edit</guilabel> link in the result list
|
||||||
(when found by file name). The file names end in
|
(when found by file name). The file names end in
|
||||||
<replaceable>.blob</replaceable> and can be displayed by
|
<replaceable>.blob</replaceable> and can be displayed by
|
||||||
application <replaceable>blobviewer</replaceable>.</para>
|
application <replaceable>blobviewer</replaceable>.</para>
|
||||||
|
|
||||||
<para>You need two entries in the configuration files for this
|
<para>You need two entries in the configuration files for this
|
||||||
to work:</para>
|
to work:</para>
|
||||||
<itemizedlist>
|
|
||||||
<listitem><para>In <filename>$RECOLL_CONFDIR/mimemap</filename>
|
|
||||||
(typically <filename>~/.recoll/mimemap</filename>), add the
|
|
||||||
following line:</para>
|
|
||||||
<programlisting>
|
|
||||||
application/x-blobapp = .blob
|
|
||||||
</programlisting>
|
|
||||||
<para>Note that the mime type is made up here, and you could
|
|
||||||
call it <replaceable>diesel/oil</replaceable> just the
|
|
||||||
same.</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem><para>In
|
|
||||||
<filename>$RECOLL_CONFDIR/mimeview</filename> under the
|
|
||||||
<literal>[view]</literal> section:</para>
|
|
||||||
<programlisting>
|
|
||||||
application/x-blobapp = blobviewer %f
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>We are supposing that
|
<itemizedlist>
|
||||||
<replaceable>blobviewer</replaceable> wants a file name
|
<listitem><para>In <filename>$RECOLL_CONFDIR/mimemap</filename>
|
||||||
parameter here, you would use <literal>%u</literal> if
|
(typically <filename>~/.recoll/mimemap</filename>), add the
|
||||||
|
following line:<programlisting>
|
||||||
|
.blob = application/x-blobapp
|
||||||
|
</programlisting>
|
||||||
|
Note that the mime type is made up here, and you could
|
||||||
|
call it <replaceable>diesel/oil</replaceable> just the
|
||||||
|
same.</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem><para>In <filename>$RECOLL_CONFDIR/mimeview</filename>
|
||||||
|
under the <literal>[view]</literal> section, add:</para>
|
||||||
|
<programlisting>
|
||||||
|
application/x-blobapp = blobviewer %f
|
||||||
|
</programlisting>
|
||||||
|
<para>We are supposing
|
||||||
|
that <replaceable>blobviewer</replaceable> wants a file
|
||||||
|
name parameter here, you would use <literal>%u</literal> if
|
||||||
it liked URLs better.</para>
|
it liked URLs better.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
<para>If you just wanted to change the application used by
|
<para>If you just wanted to change the application used by
|
||||||
&RCL; to display a mime type which it already knows, you
|
&RCL; to display a mime type which it already knows, you
|
||||||
would just need to edit <filename>mimeview</filename>. The
|
would just need to edit <filename>mimeview</filename>. The
|
||||||
entries you add in your personal file override those in the
|
entries you add in your personal file override those in the
|
||||||
central configuration, which you do not need to alter</para>
|
central configuration, which you do not need to
|
||||||
|
alter. <filename>mimeview</filename> can also be modified
|
||||||
|
from the Gui.</para>
|
||||||
|
|
||||||
</sect3>
|
</sect3>
|
||||||
|
|
||||||
@ -3456,48 +3456,43 @@ skippedPaths = ~/somedir/∗.txt
|
|||||||
<title>Adding indexing support for a new file type</title>
|
<title>Adding indexing support for a new file type</title>
|
||||||
|
|
||||||
<para>Let us now imagine that the above
|
<para>Let us now imagine that the above
|
||||||
<replaceable>.blob</replaceable> files actually contain
|
<replaceable>.blob</replaceable> files actually contain
|
||||||
indexable text and that you know how to extract it with a
|
indexable text and that you know how to extract it with a
|
||||||
command line program. Getting &RCL; to index the files is
|
command line program. Getting &RCL; to index the files is
|
||||||
easy. You need to perform the above alteration, and also to
|
easy. You need to perform the above alteration, and also to
|
||||||
add data to the <filename>mimeconf</filename> file
|
add data to the <filename>mimeconf</filename> file
|
||||||
(typically in <filename>~/.recoll/mimeconf</filename>):</para>
|
(typically in <filename>~/.recoll/mimeconf</filename>):</para>
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>Under the <literal>[index]</literal>
|
<listitem><para>Under the <literal>[index]</literal>
|
||||||
section, add the following line (more about the
|
section, add the following line (more about the
|
||||||
<replaceable>rclblob</replaceable> indexing script later):</para>
|
<replaceable>rclblob</replaceable> indexing script
|
||||||
<programlisting>
|
later):<programlisting>
|
||||||
application/x-blobapp = exec rclblob
|
application/x-blobapp = exec rclblob
|
||||||
</programlisting>
|
</programlisting></para>
|
||||||
<para></para>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem><para>Under the <literal>[icons]</literal>
|
<listitem><para>Under the <literal>[icons]</literal>
|
||||||
section, you should choose an icon to be displayed for the
|
section, you should choose an icon to be displayed for the
|
||||||
files inside the result lists. Icons are normally 64x64
|
files inside the result lists. Icons are normally 64x64
|
||||||
pixels PNG files which live in
|
pixels PNG files which live in
|
||||||
<filename>/usr/[local/]share/recoll/images</filename>.
|
<filename>/usr/[local/]share/recoll/images</filename>.</para>
|
||||||
</para>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem><para>Under the <literal>[categories]</literal>
|
<listitem><para>Under the <literal>[categories]</literal>
|
||||||
section, you should add the mime type where it makes sense
|
section, you should add the mime type where it makes sense
|
||||||
(you can also create a category). Categories may be used
|
(you can also create a category). Categories may be used
|
||||||
for filtering in advanced search.</para>
|
for filtering in advanced search.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
<para>The <replaceable>rclblob</replaceable> filter should
|
<para>The <replaceable>rclblob</replaceable> filter should
|
||||||
be an executable program or script which exists inside
|
be an executable program or script which exists inside
|
||||||
<filename>/usr/[local/]share/recoll/filters</filename>. It
|
<filename>/usr/[local/]share/recoll/filters</filename>. It
|
||||||
will be given a file name as argument and should output the
|
will be given a file name as argument and should output the
|
||||||
text contents on the standard output.</para>
|
text or html contents on the standard output.</para>
|
||||||
|
|
||||||
<para>The <link linkend="rcl.program.filters">filter
|
<para>The <link linkend="rcl.program.filters">filter
|
||||||
programming</link> section describes in more detail how to
|
programming</link> section describes in more detail how
|
||||||
write a filter.</para>
|
to write a filter.</para>
|
||||||
|
|
||||||
</sect3>
|
</sect3>
|
||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user