Metadata: Import "hints" file #438

Open
opened 2026-02-19 23:08:51 -05:00 by deekerman · 0 comments
Owner

Originally created by @JohanAR on GitHub (Sep 30, 2020).

I was thinking that it might be useful if I could create .ppimport (or something) files and put them in my photo library, to give me more control over how PhotoPrism imports the photos. My photo collection is semi-sorted and PhotoPrism gets some things right, while it misses some "metadata" that is somehow encoded in the file structure.

Pseudo-code example:

# Some folders have Swedish names
translate:
  to: Greece
  from: Grekland

# Our cat's different nicknames
translate:
  to: Agrippa
  from: Tippan
  from: Tippis

# Don't create keywords from irrelevant words
ignore-keywords:
  och
  thumbnail
  original
  new
  unsorted

# Extract info from file path and add it to files if they miss the corresponding field
# Here are some of the different date encodings I have in my collection
detect-meta:
  <yyyy>/<mm>/<dd>/*
  <yyyy><mm><dd>_*
  <yyyy><mm>_*
  <yyyy>-<mm>-<dd>_*

# Group non-adjacent files. The characters matching the wildcard would have
# to be the same for two files to be grouped of course
stack-files:
  *.jpg
  original/*.cr2

# Group files with asymmetric naming
stack-files:
  *.cr2
  *_CR2_embedded.jpg

# Group files that already I used for PWG (another self hosted gallery)
stack-files:
  *.jpg
  *.cr2
  thumbnail/TN-*.jpg
  pwg_high/*.jpg

At least for me it would be much easier to create some rules than to either do all these changes manually in PhotoPrism, or than to learn how to do it with SQL queries.

Originally created by @JohanAR on GitHub (Sep 30, 2020). I was thinking that it might be useful if I could create .ppimport (or something) files and put them in my photo library, to give me more control over how PhotoPrism imports the photos. My photo collection is semi-sorted and PhotoPrism gets some things right, while it misses some "metadata" that is somehow encoded in the file structure. Pseudo-code example: ```yaml # Some folders have Swedish names translate: to: Greece from: Grekland # Our cat's different nicknames translate: to: Agrippa from: Tippan from: Tippis # Don't create keywords from irrelevant words ignore-keywords: och thumbnail original new unsorted # Extract info from file path and add it to files if they miss the corresponding field # Here are some of the different date encodings I have in my collection detect-meta: <yyyy>/<mm>/<dd>/* <yyyy><mm><dd>_* <yyyy><mm>_* <yyyy>-<mm>-<dd>_* # Group non-adjacent files. The characters matching the wildcard would have # to be the same for two files to be grouped of course stack-files: *.jpg original/*.cr2 # Group files with asymmetric naming stack-files: *.cr2 *_CR2_embedded.jpg # Group files that already I used for PWG (another self hosted gallery) stack-files: *.jpg *.cr2 thumbnail/TN-*.jpg pwg_high/*.jpg ``` At least for me it would be much easier to create some rules than to either do all these changes manually in PhotoPrism, or than to learn how to do it with SQL queries.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/photoprism#438
No description provided.