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

Enriching

External processors add metadata to indexed files.

worklist outputs sources as JSONL, a processor extracts metadata, and import-facts stores it.

canon worklist → processor → canon import-facts

A processor can be any CLI tool or script that extracts information from files: exiftool for EXIF data, file for MIME types, ffprobe for media info, or custom scripts. Writing Processors shows how to build your own.

Basic Usage

Extract EXIF metadata from images:

canon worklist --where 'source.ext|lowercase IN (jpg, jpeg, heic)' \
  | ./scripts/exif-worklist.sh \
  | canon import-facts

Detect MIME types for all files:

canon worklist | canonargs --fact mime -- file -b --mime-type {} | canon import-facts

Provided Processors

ProcessorPurposeRequires
scripts/exif-worklist.shEXIF, GPS, and media metadataexiftool, jq
scripts/hash-worklist.shSHA-256 content hashesjq
scripts/tag-worklist.shmacOS Finder tagsjq, python3
canonargs --fact mime -- file -b --mime-type {}MIME type detectioncanonargs

Install canonargs with: cargo install canonargs

Tip: Selective Hashing

To hash only specific file types, scan with --no-hash and hash through the pipeline:

canon scan --no-hash --add --role source /path/to/mixed-files
canon worklist /path/to/mixed-files --where 'source.ext|lowercase IN (jpg, jpeg, heic, mov, mp4)' \
  | ./scripts/hash-worklist.sh \
  | canon import-facts