Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Facts Reference

Facts are key-value metadata. See the overview and key names.

Namespaces

NamespaceDescription
source.*Source facts: taken from what the scanner records (path, size, mtime)
content.*Content facts: imported (EXIF, mime type), and the content hash

Values

The value types. Only the path source facts have the type path:

TypeExamples
TextApple, image/jpeg, "2019"
Number1024, 3.14, -5, 1e6
Time2024-07-23 14:30:45, 2024-07, 2024
Pathsource.rel_path

Modifiers

Transform values using | syntax:

Time Modifiers

Time modifiers work on time values (like source.mtime or EXIF dates) and on text written as a time. Each works in your local time. The examples use the time 2024-07-23 14:30:45:

ModifierGivesPrintsIn a filterNeeds a time known to the
yearA number2024|year=2024year
monthA number, 1–1207|month=7 or 07month
dayA number, 1–3123|day=23day
hourA number, 0–2314|hour>=14minute
minuteA number, 0–5930|minute=30minute
secondA number, 0–5945|second=45second
dateA day2024-07-23|date=2024-07-23day
timeA time of day, at the time’s own precision14:30:45|time>=18:00minute
datetimeThe time, at its own precision2024-07-23 14:30:45|datetime="2024-07-23 14:30"year
yearmonthA month2024-07|yearmonth=2024-07month
weekA number, the ISO week 1–5330|week=30day
weekdayA number, 1–7 from MondayTuesday|weekday=2 or Tuesdayday
quarterA number, 1–4Q3|quarter=3 or Q3month

A time coarser than the last column has no value for that modifier (Precision).

String Modifiers

These work on text and paths, and on the printed form of another modifier’s result (Chaining).

ModifierDescriptionExample
lowercaseConvert to lowercaseJPG → jpg
uppercaseConvert to uppercasejpg → JPG
capitalizeCapitalize the first letter, the rest lower case; on a path, each nameapple → Apple, my photos/IMG.JPG → My photos/Img.jpg
stemFilename without extensionphoto.jpg → photo
extFile extension; a name with none (README, .bashrc, trail.) has no valuephoto.jpg → jpg
shortFirst 8 charactersabc123def456 → abc123de

Numeric Modifiers

ModifierTakesGives
numberText, as a number; a number, as itselfA number. Text that is not a number has no value
bucketA number from 0 upA range label: 0, then powers of ten, 1-to-10, 10-to-100, 1K-to-10K, 0.00001-to-0.0001. A number below zero has no value
bucket(a,b,c)Any number, negative ones includedA range label: under-a, a-to-b, b-to-c, c-and-up, a number below zero written with minus- (|bucket(-90,0,90) gives under-minus-90, minus-90-to-0, 0-to-90, 90-and-up)

A range includes its lower edge and not its upper: 1K-to-10K holds 1,000 up to 9,999, since K is 1,000, M 1,000,000 and G 1,000,000,000. A label is compared with =, != and IN, and typed the way Canon shows it (source.size|bucket(1e6)=1000000-and-up).

Path Accessors

Python-style indexing for path values, and for text, which an accessor splits into path segments (content.SourceFile[-1]):

SyntaxMeaning
key[-1]Last segment (filename)
key[0]First segment
key[1:3]Slice segments 1 and 2
key[:-1]All but last segment

An index past the end has no value; a slice past the end is a path with no segments.

source.rel_path[-1]        → IMG_001.jpg
source.rel_path[-1]|stem   → IMG_001
source.rel_path[0]         → photos