florianbw writes

Hi, I use recoll mainly as described [here](http://www.lesbonscomptes.com/recoll/recoll_XMP/index.html) in combination with Jabref to search through my library. Some documents are not managed within Jabref, and usually they have no or bad titles and authors specified in the metadata. Also the document titles written by Jabref into the files often need modification (eg to change to Title [Supplementary Information]).

At the moment, to get a proper Title and/or Author field, I modify the metadata of the files by copying the file name from recoll, modifying the XMP metadata using exiftool, and then running recollindex -i.

I think it would be helpful to allow to start the modification from within recoll. A possible solution could be to have mimedit entries similarly to mimeview, which allowed to specify programs to edit the metadata of the files. Or to allow to start custom executables from the result list, which could start an appropriate application. What do you think?

medoc writes

Hi Florian,

The current code on bitbucket has an "Open with" right-click menu entry for the result list and table, this will let you chose any application which lists the mime type among its supported list in its .desktop file in /usr/share/applications.

If exiftool does not have a .desktop (which appears to be the case), you just need to create one, starting from one of the existing examples, this is very easy.

I think that the current trunk code is quite stable, so you can just compile from it. Just be aware that the word splitter was slightly improved. This mostly affects compound words like email addresses, but it does introduce a small incompatibility in the index, so you may want to reset the index after switching to the new code.



florianbw writes

Hi jf, that’s great, that’s probably the best solution. Thank you also for the quick reply! I will try the newest source soon, and probably write a small adapted GUI for exiftool unless I find one. Thanks again and best wishes, Florian

medoc writes

Oops, it just slipped my mind that you need parameters for exiftool to do anything useful. A small shell-script using zenity for input may be enough for simple tasks ? Or even just setting the file name in an environment variable and starting an interactive shell ? Otherwise, searching the web for "Exiftool Linux GUI" does bring back some answers, but I did not test any.

florianbw writes

Yes, I think I will use zenity, it just needs a two fields GUI. Most of the exiftool GUIs which exist, however, are geared towards image files, and not very usable for PDFs.

By any chance, do you have an idea why the compilation fails here? I compile on an ARM notebook, w/ Arch Linux, and the unac library v1.7 installed.


(cd lib; sh mkMake)
make -C lib
make[1]: Entering directory '/home/fbreitwieser/Downloads/src/recoll/src/lib'
g++ -g -O2 -I. -I../aspell -I../bincimapmime -I../common -I../index -I../internfile -I../rcldb -I../unac -I../utils  -Wall -Wno-unused -I/usr/local/lib/../include   -DRECOLL_DATADIR=\"/usr/local/share/recoll\" -DLIBDIR=\"/usr/local/lib\" -fPIC -DPIC -DHAVE_CONFIG_H -D_GNU_SOURCE  -c ../unac/unac.cpp
../unac/unac.cpp:1:1: error: ‘unac’ does not name a type
Makefile:131: recipe for target 'unac.o' failed
make[1]: *** [unac.o] Error 1
make[1]: Leaving directory '/home/fbreitwieser/Downloads/src/recoll/src/lib'
Makefile:18: recipe for target 'all' failed
make: *** [all] Error 2

florianbw writes

Hi jf, Managed to compile it now. Looks good with the new options! I use zenity to change just the title with the following small script:

TITLE=`exiftool -Title -s3 "$PDF"`

RES=`zenity --entry \
  --title="Change PDF Title" \
  --text="Enter the Title:" \
  --entry-text "$TITLE"`

if [ "$RES" != "" ]; then echo -n "Changing title to $RES ... " && exiftool -Title="$RES" "$PDF" && recollindex -i "$PDF" && echo "Done!"
else echo "No title entered"

Works nicely! Furthermore I added scripts to remove a file from the disk and the recoll index, or change its location. Thank you!

medoc writes

Nice ! Keeping this open to remind me to make a small howto for this :)

medoc writes

HOWTO entry added