reprostim bids-inject-sidecar

Extract BIDS media-file metadata from audio/video files and write/update their .json sidecars.

Usage

reprostim bids-inject-sidecar [OPTIONS] FILES...

Options

-f, --videos <videos>

Optional path to videos.tsv produced by video-audit. When given, cached fields are looked up for each FILE by resolved path and reused instead of re-running ffprobe.

-m, --mode <mode>

Sidecar write mode. ‘replace’: overwrite the entire sidecar with only the freshly extracted/added fields. ‘update’: merge freshly extracted/added fields into the existing sidecar, preserving other existing keys untouched.

Default:

'update'

Options:

replace | update

-a, --add <add_meta>

Manually specify or override a metadata field as META=VALUE. Repeatable, e.g. –add DeviceSerialNumber=ABC12345 –add RecordingDuration=3600. Known BIDS fields are cast to their declared type; unknown fields are stored as strings.

-e, --existing-different <existing_different>

Policy when a field about to be written already exists in the sidecar with a different, non-n/a value. ‘error’: abort processing that file. ‘overwrite’: log a warning and proceed with the new value.

Default:

'error'

Options:

error | overwrite

-s, --strict

Treat metadata problems (e.g. a filename with no valid BIDS media type suffix) as a fatal error for that file. When not set (default), such problems are reported as a warning and processing continues.

-d, --dry-run

Compute and print the field set that would be written per file, without writing any sidecar.

-v, --verbose

Enable verbose output.

Arguments

FILES

Required argument(s)