A collection of Cinnamon Nemo custom actions and related scripts for displaying Exif metadata of media files in Nemo and for plotting GPS position thereof using various online mapping services
Exif is a standard, specified / issued by JEIDA / JEITA / CIPA, that defines formats for media files, as well as ancillary metadata tags, to be used by digital cameras / scanners and sound recorders. MPEG video formats also allow containing metadata in media files. This metadata, besides various technical image information, such as camera make and model, aperture, shutter speed, focal length, ISO speed, etc., may also contain geolocation information.
Nemo is the file manager for the Cinnamon desktop environment, the primary one for Linux Mint.
Nemo out-of-the box facilities for displaying media file metadata are limited and allow no access to geolocation info.
Nemo has a provision for being extended with custom actions and is distributed with a custom action example as
sample.nemo_action
.
With mentioned sample.nemo_action
as a prototype, custom Nemo actions and related scripts were developed that allow
performing various actions for files with image/jpeg
and video/mp4
media types:
-
display Nemo / Zenity dialog box with Exif metadata being displayed in its native tabular format available from
exif
orexiftool
utility; -
display shooting point location using various online mapping services like OpenStreetMap, Google Maps, Bing Maps, etc. in a browser of choice.
A release archive contains the following files:
├─ nemo/
│ └─ actions/
│ ├─ action_scripts/
│ │ ├─ exif_metadata__functions.bash : local reusable scripting functions
│ │ │ : library
│ │ ├─ exif_metadata__mapping.bash : generic script to implement
│ │ │ : interactions with online mapping
│ │ │ : services
│ │ ├─ exif_metadata__settings.bash : the settings file
│ │ ├─ exif_metadata_list_exif.bash : script to display Exif metadata
│ │ │ : using 'exif' utility
│ │ ├─ exif_metadata_list_exiftool.bash : script to display Exif metadata
│ │ │ : using 'exiftool' utility
│ │ └─ exif_metadata_mapping_*.bash : scripts for displaying GPS position in
│ │ : various online mapping services
│ │
│ │ : Nemo action descriptors ...
│ ├─ exif_metadata_list_exif.nemo_action : ... for displaying Exif metadata
│ │ : using 'exif' utility
│ ├─ exif_metadata_list_exiftool.nemo_action : ... for displaying Exif metadata
│ │ : using 'exiftool' utility
│ └─ exif_metadata_mapping_*.nemo_action : ... for displaying GPS position using
│ : various online mapping services
│
├─ readme/
│ └─ *.png : figures for the user manual
│
├─ install-for-current-user.bash : script to install action descriptors
│ : and scripts to current user profile
├─ diff-with-current-user.bash : script to compare contents of the
│ : 'nemo/actions' folder with those in
│ : current user profile
├─ COPYING : GPL license text
├─ NOTICE : GPL notice text
└─ README.adoc : user manual (this document)
The approach with scripts separation from related actions into a nested folder was borrowed from GitHub : smurphos : Nemo Actions & Cinnamon Scripts.
-
download a release archive and unpack to an arbitrary temporary folder;
-
open the folder that was created upon unpacking the release archive;
-
run the installation script as
./install-for-current-user.bash
.
With all that successfully in place, new context menu items should become available in Nemo for files that have
image/jpeg
or video/mp4
media types. These menu items include the following ones:
-
Display Exif metadata using 'exif' utility;
-
Display Exif metadata using 'exiftool' utility;
-
Display GPS position in various online mapping services.
The solution requires at least one of the following utilities to be available:
'exif' |
a simple Exif data handling utility, limited to |
'exiftool' |
a well-recognized Exif data handling utility, that supports an extended metadata tag set and a variety of media file formats |
The solution currently has the following provisions for internationalization:
-
LANGUAGE
variable defined inexif_metadata__settings.bash
:-
overrides / shadows similar user profile variable;
-
defaults to shortened language-code-only user profile setting as
"${LANGUAGE/_*/}"
; -
has effect on language settings of the utilities and of online mapping services;
-
-
context menu item names and comment lines for metadata display actions, specified in related action descriptors.
Browser can be selected using the BROWSER
variable defined in exif_metadata__settings.bash
that defaults to default
system browser wrapper as xdg-open
.
Types of media files handled by the solution are specified using their media types, and their list is currently
restricted to image/jpeg
and video/mp4
by the Mimetypes
setting in related action descriptors.
Nothing prevents this list from being extended, provided that related media types are supported by metadata handling utilities.
Collection of online mapping services for displaying GPS position may be customized by deleting or adding to the
collection of exif_metadata_mapping_*.nemo_action
descriptors and related scripts.
Please feel free to add more using existing ones as samples and contribute :)