tsoqnav1.4.2

Configuration

Every flag has a config-file equivalent. Set your preferences once and keep your command lines short.

Where tsoqna looks#

PlatformUser config file
Linux, BSD$XDG_CONFIG_HOME/tsoqna/config.toml (usually ~/.config/tsoqna/config.toml)
macOS~/Library/Application Support/tsoqna/config.toml
Windows%APPDATA%\tsoqna\config.toml

On top of that, any folder can carry its own .tsoqna.toml (since 1.3). When you run tsoqna on a source folder, it looks for that file in the folder and each of its parents, and the nearest one wins.

Precedence#

  1. Command-line flags
  2. Environment variables (TSOQNA_PATTERN, TSOQNA_TZ, …)
  3. The nearest .tsoqna.toml
  4. The user config file
  5. Built-in defaults

Not sure where a value is coming from? Ask:

$ tsoqna config show --origin
pattern      = "{date}_{time}{ext}"         # ~/.config/tsoqna/config.toml
folders      = "{Y}/{Y}-{m}"                # /home/ana/Photos/.tsoqna.toml
on_conflict  = "suffix"                     # default
fallback     = "skip"                       # default
timezone     = "local"                      # TSOQNA_TZ

A typical config file#

# ~/.config/tsoqna/config.toml

pattern  = "{date}_{time}{ext}"
folders  = "{Y}/{Y}-{m}"

# What to do when two photos would get the same name.
on_conflict = "suffix"        # suffix | skip | fail

# What to do with files that have no capture date.
fallback = "skip"             # skip | mtime | filename

# Move .xmp/.aae/.thm files along with their photo.
sidecars = true

timezone = "local"            # or an IANA name such as "America/Denver"

[filter]
include = ["*.jpg", "*.jpeg", "*.heic", "*.dng", "*.cr3", "*.nef", "*.arw", "*.raf", "*.mov", "*.mp4"]
exclude = ["**/.thumbnails/**", "**/@eaDir/**"]

[journal]
enabled = true
keep    = 20                  # how many past runs undo can see

All keys#

KeyDefaultFlagNotes
pattern"{date}_{time}{ext}"-pFile name template.
folders"{Y}/{Y}-{m}"--foldersFolder template, used by sort only.
on_conflict"suffix"--on-conflicttsoqna never overwrites, whatever this is set to.
fallback"skip"--fallbackFor files with no usable date.
sidecarstrue--no-sidecarsMatches by stem, case-insensitively.
timezone"local"--tzApplied only where the file has no offset of its own.
shift"0"--shiftFix a camera clock, e.g. "+1h" or "-00:07:30". (since 1.3)
mode"move"--copysort only: move or copy.
jobsnumber of cores-jMetadata is read in parallel; moves are always sequential.
dry_runfalse-nSet to true if you want tsoqna to be cautious by default; pass --no-dry-run to really do it.

Folder-level .tsoqna.toml files are read from the source side. A config file sitting in the destination is ignored, so a shared photo library cannot silently change how you sort your own imports.