How to index FODT and FODP files with recoll

by Martin Monperrus

It is possible to index the new file formats FODT and FODP of LibreOffice with recoll. Those files are plain XML files, usable in Git.

You have to add to $HOME/.recoll/mimeconf:

  [index]
  application/vnd.oasis.opendocument.text-flat-xml = execm rclxml.py
  application/vnd.oasis.opendocument.presentation-flat-xml = execm rclxml.py

And in $HOME/.recoll/mimeview:

  [view]
  application/vnd.oasis.opendocument.presentation-flat-xml = libreoffice %f
  application/vnd.oasis.opendocument.text-flat-xml = libreoffice %f

Option

You may have to change to $HOME/.recoll/mimemap (if you have disabled the use of mime type guessing xdg-mime with usesystemfilecommand = 0):

  .fodt = application/vnd.oasis.opendocument.text-flat-xml
  .fodp = application/vnd.oasis.opendocument.presentation-flat-xml

And also, if you use indexedmimetypes in recoll.conf to only index certain files, you have to add the FOD* files:

  indexedmimetypes = application/x-tex application/pdf application/vnd.sun.xml.calc \
  application/vnd.sun.xml.impress application/vnd.sun.xml.writer \
  application/vnd.oasis.opendocument.text-flat-xml application/vnd.oasis.opendocument.presentation-flat-xml

Troubleshooting

  $ xdg-mime query filetype  foo.fodp
  application/vnd.oasis.opendocument.presentation-flat-xml
Tagged as: