Coder Social home page Coder Social logo

daguhh / tri_photo_date Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 930 KB

Sort image using metadata placeholder

License: MIT No Attribution

Batchfile 0.50% Shell 0.78% Python 97.31% HTML 1.41%
interface metadata photo sorting exif gps-location placeholder

tri_photo_date's Introduction

Tri photo date

Foreword

Program is still in progress, please make copies of your photo before using. Nevertheless most function shoud work well at this time. So feel free to give any feedbacks.

About

The program offers an interface to sort your photo folders based on their metadata. Paths can be customized with placeholders to then be replaced by specific data for each photo.

Depending on the options enabled, the program achieves the following:

  1. Scan folders, get fingerprints, parse metadatas
  2. Generate new paths given filter and options:
    1. Filter files:
      • extensions,
      • camera model,
      • folder / regex
      • duplicates
    2. Perform actions:
      • parse photo date through filename
      • group photo applying a floating window over multiples days
      • resolve place of the shot using GPS datas (module geopy and the service Nominatim proposed by OpenStreetMap)
      • force date from filesystem timestamp
  3. Execute:
    1. Simulate/copy/move files
    2. Delete metadats / add new metadatas

Run & Install

Binaries

Compiled binaries are available to download for both linux and windows. No dependancies required, no install needed

Python package

Get python wheel, then, in a virtual env

python3 -m pip install tri_photo_date-x.y.z-py3-none-any.whl
tri_photo_date

From source code

With poetry:

git clone https://github.com/Daguhh/tri_photo_date.git
cd tri_photo_date
poetry install
poetry run tri_photo_date

Usage

TL;DR

Fill and execute action (push button) from top to down. Use tooltip to get hints on parameters function and format.

cli / shell

poetry run tri_photo_date --help
usage: tri_photo_date [-h] [-d [DUMP] | -D [DUMP_DEFAULT] | -l [LOAD]] [mode]

Sort image using metadata placeholder

positional arguments:
  mode                  shell/gui, chose interface to run, gui will be run by default

options:
  -h, --help            show this help message and exit
  -d [DUMP], --dump [DUMP]
                        save actual config to path and exit
  -D [DUMP_DEFAULT], --dump-default [DUMP_DEFAULT]
                        save default config to path and exit
  -l [LOAD], --load [LOAD]
                        run the program with given config

Also, you can directly run shell commands from command line:

poetry run tri_photo_date shell set <section> <param> <value>
poetry run tri_photo_date shell scan
poetry run tri_photo_date shell process
poetry run tri_photo_date shell preview
poetry run tri_photo_date shell execute

Simplified mode

            ┌──────────────────┐
            │ Set source and   │
            │ destination      │
            └───────┬──────────┘
                    ▼
            ┌──────────────────┐
            │    1. Scan       │
            └───────┬──────────┘
                    ▼
            ┌──────────────────┐
            │ Set paths format │
            │ set filters      │◀────┐
            │ set options      │  ┌──┴────────────┐
            └───────┬──────────┘  │ Check preview │
                    ▼             │     panel     │
            ┌──────────────────┐  └──┬────────────┘
            │ 2. Pre-calculate ├─────┘              
            └───────┬──────────┘  Update preview
                    ▼
            ┌──────────────────┐
            │   3. Execute     │
            └──────────────────┘

Advanced mode

                          ┌──────────────────┐
                          │  Set source and  │
                          │    destination   │
                          └───────┬──────────┘
                                  ▼
      Update toolboxes    ┌──────────────────┐
           ┌──────────────┤     1. Scan      │
           │              └───────┬──────────┘
           ▼                      ▼
  ┌──────────────────┐    ┌──────────────────┐
  │   Set checkbox   │    │ Set paths format │
  │ Copy placeholder │◀──▶│ set filters      │◀────┐
  └──────────────────┘    │ set options      │  ┌──┴────────────┐
                          └───────┬──────────┘  │ Check preview │
                                  ▼             │     panel     │
                          ┌──────────────────┐  └──┬────────────┘
                          │ 2. Pre-calculate ├─────┘              
                          └───────┬──────────┘   Update preview
                                  ▼
                          ┌──────────────────┐
                          │   3. Execute     │
                          └──────────────────┘

Command line (expired?)

A small command line utility is available. It's not very elaborate at the moment, but it should allow dealing with multiple preconfigurations to run scripts in the daily routine

usage: tri_photo_date [-h] [--cli] [-d [DUMP] | -D [DUMP_DEFAULT] | -l [LOAD]]

Sort image using metadata placeholder

options:
  -h, --help            show this help message and exit
  --cli                 run in cli
  -d [DUMP], --dump [DUMP]
                        save actual config to path and exit
  -D [DUMP_DEFAULT], --dump-default [DUMP_DEFAULT]
                        save default config to path and exit
  -l [LOAD], --load [LOAD]
                        run the program with given config

Files

Tri-photo-date generated files:

File Path Description
config.ini APPDATA/triphotodate Store user parameters
gps.db LOCALAPPDATA/triphotodate Cache for gps data (prevent unnecessay call to nominatim api)
images.db LOCALAPPDATA/triphotodate Cache for images datas and store datas during process
triphotodate.log ??????? program log file

Credits

Embed dependancies

Oneline service

This program use the OpenStreetMap nominatim service for resolving addresses from GPS coordinates:

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.