Skip to content

starlinglab/exiftool-to-aa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExifTool to Asset Authentication

This tool extracts selected metadata from files using ExifTool and sets corresponding attributes in the Starling CLI.

Prerequisites

  • exiftool: Used to extract metadata from files
  • starling: Starling CLI for setting attributes
  • jq: For JSON processing (required for metadata extraction)

Metadata Filtering

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.

Usage

The tool processes files from the default location ~/integrity-data/files.

Usage

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.

Examples

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

How It Works

  1. The script loads the list of metadata keys to process from metadata_filter.txt
  2. It scans the target directory for files
  3. For each file, it extracts metadata using ExifTool
  4. It filters the metadata to include only the keys specified in the filter file
  5. 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>
    

Logs

All operations are logged to exiftool-to-aa.log.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published