项目作者: 2n3906

项目描述 :
A simple CLI to tag film scans with EXIF metadata.
高级语言: Python
项目地址: git://github.com/2n3906/filmtagger.git
创建时间: 2019-06-13T02:37:15Z
项目社区:https://github.com/2n3906/filmtagger

开源协议:MIT License

下载


filmtagger

A simple CLI to tag film scans with EXIF metadata.

Installation

  1. pip install filmtagger

Usage

  1. # Show help
  2. filmtagger --help
  3. # Tag a single image
  4. filmtagger tag image.jpg
  5. # Tag multiple images
  6. filmtagger tag *.jpg

Development

This project uses Hatch for development and package management.

Setup Development Environment

  1. Install Hatch:

    1. pip install hatch
  2. Create and activate development environment:

    1. hatch shell

Running Tests

  1. # Run all tests
  2. hatch run test
  3. # Run tests with coverage
  4. hatch run test-cov
  5. # Run linting checks
  6. hatch run lint:all
  7. # Format code
  8. hatch run lint:fmt

Building and Publishing

  1. # Build the package
  2. hatch build
  3. # Publish to PyPI
  4. hatch publish

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Usage examples

To set the date of all images to 12 June 2019, specifying camera and
film as well:

  1. $ filmtagger -d 2019-06-12 -c "Leica M6" -f "E100G" *.jpg

Filmtagger supports fuzzy-matching against its database of cameras and
films, so your input strings needn’t be exact. Likewise, it attempts to
autodetect a variety of date/time input.

Configuration

You may configure your own camera and film definitions to override the
system-wide ones.

Create a ~/.config/filmtagger/cameras.toml file that looks like this:

  1. ["Mamiya RB67"]
  2. "Exif.Image.Make" = "Mamiya"
  3. "Exif.Image.Model" = "RB67"

And a ~/.config/filmtagger/films.toml like this:

  1. ["Ilford HP5 Plus"]
  2. "Exif.Photo.ISOSpeedRatings" = 400
  3. "Xmp.AnalogExif.FilmMaker" = "Ilford"
  4. "Xmp.iptcExt.DigitalSourceType" = "http://cv.iptc.org/newscodes/digitalsourcetype/negativeFilm"

The section headings will be fuzzy-matched from the command-line
arguments. The key-value pairs that follow will be set as metadata,
assuming they are valid tag names.
In addition to the standard Exiv2 tag schema, AnalogExif
tags
are
also supported.