Automatic PDF (with exif-info) from nnn
2021-12-23 · 162 words · 1 min
TagsĀ :  OpenBSD Setup

I like the concept of nnn an there are a ton of plugins available.

I also like the exiftool and it's easy to create a 'plugin-script' with a simple shortcut from inside nnn.

We have to activate the 'plugins' for nnn and create a shotcut in ~/.profile:

:~$ cat ~/.profile
export NNN_PLUG='w:wallpaper;e:exiftool'

and generating this 'hell of pipes' - script:

:~$ cat ~/.config/nnn/plugins/exiftool  
#!/bin/sh

if [ -n "$1" ] && [ -f "$1" ]; then
    exiftool -a -u -g1 "$1" | enscript -o - | ps2pdf - - | zathura -
fi

Of course these packages mentioned here must be present at the system and the file must be executable by the user.

Just open the 'plugins' inside nnn with the shortcut ';', followed by the previously defined 'e'. We get a .pdf output with zathura and all exif-data from the document.


tech · about · visual · contact · home