Code Monkey home page Code Monkey logo

lenstagger's Introduction

Lens Tagger

This tool is a simple frontend to help you Exif tag your manual lenses. It is inspired by NameThatLens, a GUI designed to do this.

NameThatLens

Don't get me wrong, NameThatLens is a cool tool; I have used it with joy. Over time, I think it could be better.

  • I switch lenses a lot, which complicates my workflow. I have to open a image gallery which previews the raw files, note lens types with file names, and click around in he tool. I believe I can build a tool that does all of this.
  • It lacks fine grained control over which Exif tags it exactly manipulates. For instance, I'd like Lens to be filled with both make and model, not just model.
  • When I switched to Mac, the tool simply refused to work. Of course, the author could/should fix that, but the link pointing to the community forum is dead and the tool does not look very actively maintained.
  • I'd like to be able to poke around and fix things myself. NameThatLens is closed source.

Configuration

Create or edit the file named lenses.yaml. It should contain a list of maps, where each map should have the keys key and exif. The former is used to reference the lens upon tool invocation, and the latter a map containing the arguments for Exiftool.

Please be advised that PyExiftool calls exiftool with -n (no print conversion), and does not pass warnings. For example: instead of writing LensInfo: 28mm f/2.8, you should write LensInfo: 28 28 2.8 2.8.

A full example:

---
- key: helios44
  exif:
    Lens: Zenit Helios 44-2
    LensType: Zenit Helios 44-2
    LensMake: Zenit
    LensModel: Helios 44-2
    LensInfo: 58 58 2.0 2.0
    FocalLength: 58
    FocalLengthIn35mmFormat: 116
    LensSerialNumber: '83090316'
- key: vivitar28
  exif:
    Lens: Vivitar 28mm 1:2.8 Auto Wide-Angle
    LensType: Vivitar 28mm 1:2.8 Auto Wide-Angle
    LensMake: Vivitar
    LensModel: 28mm 1:2.8 Auto Wide-Angle
    LensInfo: 28 28 2.8 2.8
    FocalLength: 28
    FocalLengthIn35mmFormat: 56
    LensSerialNumber: '28832266'
...

Next, prepare the tool like this:

$ python3 -m venv venv
$ . venv/bin/activate
$ pip3 install -r requirements.txt

To run the GUI (currently only tested on MacOS), you need to build the app:

$ ./gen-iconset.sh
$ python setup.py py2app

Usage

There are two ways to use LensTagger: CLI and GUI. The CLI is pretty straightforward:

$ python3 cli.py --lens helios44 file1.RW2 file2.JPG

The GUI is meant to be invoked using your OS "Open With" menu in its file browser. Just point the "Open With" dialog to either openwith.sh (Linux) or to the built LensTagger.app (MacOs).

$ ./openwith.sh --lenses lenses.yaml file1.RW2 file2.JPG

The wrapper script openwith.sh takes care the venv-python is used.

To Do

  1. But exiftool into some thread to make GUI responsive during tagging
  2. Find a way to permanently put Lens Tagger in OSX 'Open With' menu
  3. Package the app

lenstagger's People

Contributors

jonkerj avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.