Multi-line Watermark

Edit 9 Nov: to correct web page formatting on the $ symbol and added headers for ease of understanding.

Sharing my solution for multi-line watermark.

I caption my bird photos with the name of the bird, place and date on 3 lines. The “simple-text.svg” watermark does not work as it provides only a single line of user text and the other darktable watermark templates prints equipment and exposure data.

Summary
The workaround uses tags/categories to tag the photos with the information and the variable $(CATEGORYn(category)) to print the required text. Using tags is a good way for repeating data as it avoids variations and reduces typing effort.

The $(TAGS) variable isn’t useful as it prints all the tags that are on the photo including any processing or categorizing tags.

Tags Data Structure
Organise the Tags to be printed as Categories grouped under main categories like “places” and “birds”. Under “birds”, it is further sub-categorised under various bird groups to maintain listing lengths reasonable. The data format is { category|bird family|bird name }

birds|Eagle|Bald
birds|Eagle|White-Bellied Sea
birds|Bulbul|Red-Whiskered
birds|Bulbul|Straw-Headed
places|Park A
places|Forest B
etc

Create Watermark SVG File
Create a SVG watermark file with the following to read the tags, it is easier to edit the darktable “simple-text.svg” file using Inkscape or similiar to create (note the double $$ below, should be a single sign, a single here interferes with the web page formatting:

$$(CATEGORY1(birds) $$(CATEGORY0(birds)
$$(CATEGORY1(places))
$$(EXIF.DAY) $$(EXIF.MONTH) $$(EXIF.YEAR)

References:
https://docs.darktable.org/usermanual/4.0/en/module-reference/utility-modules/shared/tagging/
https://docs.darktable.org/usermanual/4.0/en/special-topics/variables/

The watermark svg file provides 3 lines of text:

  1. Bird name
  2. Location
  3. EXIF date

This solution can be adjusted for any number of text lines.

File Exporting
As I export the processed photo in JPEG or PNG format for general viewing, I use the tag info in the “target storage” field setting to provide output in “Bird family, Bird Name, original filename” format, giving “Bulbul, Red-Whiskered Park A DSC01634”. I add the places name and the original filename to maintain filename uniqueness (same $$ is just single $). This helps in reducing the data entry for each photo to just once or clicking on available vs having to a filename for every photo export.

$$(FILE_FOLDER)/darktable_exported $(CATEGORY0(birds)),
$$(CATEGORY1(birds)) $$(CATEGORY0(PLACES)) $(FILE_NAME)"

Hope this idea is useful.

5 Likes

This example should go into the manual … useful for any number of people.