darkbridge.main_cli

Converts Nikon sidecar files into Darktable sidecars.

Synopsis

usage: darkbridge.py [-h] [-r] [-f] [-n] [-a] [--list-filters] [--list-metadata] [--log-level LOG_LEVEL] [-v] [filename ...]

Description

darkbridge is a utility that converts Nikon NX Studio .nksc sidecar files into sidecar files compatible with Darktable. It helps photographers migrate adjustment data from Nikon’s workflow to Darktable without manually recreating edits.

Darkbridge ignores files that not matching following criteria:

  • a Nikon sidecar file is in a NKSC_PARAM folder

  • a Nikon sidecar is named basename.extension.nksc where basename.extension is the image file name

  • a darktable sidecar exists with the same name that the Nikon sidecar in the parent folder (this criterion is only checked when options --list-filters or --list-metadata are not enabled)

The script only supports image files supported by NX Studio [1] : .nef, .nrw, .jpg, .jpeg, .tif, .tiff, .hif, .nefx, .mpo.

The options are as follows:

-h, --help

show this help message and exit

-r, --recursive

make a recursive search of images files in subfolders.

-f, --force

overwrite existing sidecar files without prompting for confirmation.

-n, --dry-run

run in preview mode without any sidecar writing.

-a, --all

include all the metadata or filters in the list, not only the active one or not empty

--list-filters

list the active filters (or all if –all option is enabled) specified in sidecar files. The transferable filters are colored in green.

--list-metadata

list the metadata specified in the sidecar files

--log-level LOG_LEVEL

Logging messages which are less severe than level will be ignored. Level may be set to: NOTSET, DEBUG, INFO, WARNING, ERROR, CRITICAL. Upper case or lower case are accepted and level is set to INFO by default.

-v, --version

show program’s version number and exit

file ...

files or directory to parse. For each item that name a supported image file, darkbridge parse the associated Nikon sidecar file and copy metadata in the darktable sidecar file. For each item that name a directory, darkbridge lists supported images files contained in the directory, and parses each files. If no file are given, the content of the current directory is used.

  • a darktable sidecar exists with the same name that the Nikon sidecar in the parent folder (this criterion is only checked when options --list-filters or --list-metadata are not enabled)

Exit status

0

no error

1

an error occurred (error messages are print on stderr stream console).

2

invalid argument. An argument of the command line isn’t valid (see Usage).

Example

Convert the sidecar file ./NKSC_PARAM/landscape.NEF.nkcs into ./landscape.NEF.xmp:

darkbridge landscape.NEF

Same as above but converting all the sidecar files in the current directory.:

darkbridge ./*.NEF

Same as above but converting all the sidecar files in the current directory and all subdirectory:

darkbridge --recursive ./**/*.NEF