This tool extracts selected metadata from files using ExifTool and sets corresponding attributes in the Starling CLI.
exiftool: Used to extract metadata from filesstarling: Starling CLI for setting attributesjq: For JSON processing (required for metadata extraction)
The tool uses a metadata filter file (metadata_filter.txt) to determine which metadata keys to extract and set as attributes. Each line in this file represents a metadata key to include.
A default metadata_filter.txt has been created with common photography metadata:
Make
Model
You can modify this file to include only the metadata keys you're interested in. The file must exist for the script to run.
The tool processes files from the default location ~/integrity-data/files.
Basic usage:
make run
Or Dry Run mode, to see what would be done without making any changes:
make test
This will display a report of each file that would be processed and the selected metadata attributes that would be set.
Process files in the default directory:
./exiftool-to-aa.sh
Run in test mode with a custom directory:
./exiftool-to-aa.sh --test --dir /path/to/images
- The script loads the list of metadata keys to process from
metadata_filter.txt - It scans the target directory for files
- For each file, it extracts metadata using ExifTool
- It filters the metadata to include only the keys specified in the filter file
- For each selected metadata key-value pair, it sets an attribute using the Starling CLI:
starling attr set --attr "<metadata_key>" --str "<metadata_value>" <filename>
All operations are logged to exiftool-to-aa.log.