Skip to content

SamRoberts8/rust_test_sam_cluade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JPEG Metadata Extractor

A command-line tool written in Rust that extracts metadata from JPEG images and outputs it as JSON files.

Features

  • Extracts filesystem metadata (filename, size, created_time, modified_time)
  • Extracts EXIF metadata (orientation, capture_time, camera_model, camera_serial)
  • Processes multiple files in a single command
  • Outputs JSON files in the same directory as input images
  • Omits unavailable metadata fields from output

Usage

cargo run -- image1.jpg image2.jpg image3.jpg

Or after building:

./target/release/jpeg-metadata-extractor image1.jpg image2.jpg image3.jpg

Output

For each input file image.jpg, a corresponding image.json file will be created in the same directory containing the extracted metadata.

Example output:

{
  "filename": "CAM18839.jpg",
  "size": 1164980,
  "created_time": "2020-08-13T10:57:06.773358405Z",
  "modified_time": "2020-08-13T10:57:06.773358405Z",
  "orientation": 1,
  "capture_time": "2020-08-09T12:58:32",
  "camera_model": "EOS 5D Mark IV",
  "camera_serial": "025021000535"
}

Building

cargo build --release

Testing

cargo test

Dependencies

  • kamadak-exif - EXIF data parsing
  • serde & serde_json - JSON serialization
  • chrono - Date/time handling
  • clap - Command-line argument parsing

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages