A tool for importing photos from one directory into a hierarchical folder structure in another directory based on the EXIF data of the photos.
The idea is that you’re able to sort a folder full of photos (such as those straight off a memory card) into a navigable hierarchy like the following:
$ tree Photos
Photos
└── 2019
├── 03
│ ├── 11
│ │ ├── photo1.jpg
│ │ ├── photo2.jpg
│ │ └── photo3.jpg
│ ├── 12
│ │ └── photo4.jpg
│ └── 13
└── 04
└── 01
├── photo5.jpg
└── photo6.jpg
Usage
Installation
The photo-import command can be installed via pip as follows:
$ pip install photo-import
$ photo-import --version
0.3.0
Usage
Basic usage is as follows:
$ photo-import /path/to/source/image.jpg /path/to/sorted/photos/
This will move image.jpg into an appropriate folder within the /path/to/sorted/photos/ directory, resulting in, for example, /path/to/sorted/photos/2019/03/11/image.jpg.
$ photo-import /path/to/photo-source /path/to/sorted/photos/
This will move all photos found within the /path/to/photo-source directory into an appropriate folder within the /path/to/sorted/photos/ directory, resulting in, for example, /path/to/sorted/photos/2019/03/11/image.jpg.
Further usage instructions are provided by using the --help option:
$ photo-import --help
Development
Running from source
There’s also a “runner” python script provided in the root of this repository for convenience when the source code is checked out locally:
$ pip install -r requirements.txt
$ python runner.py --version
0.3.0
$ ./runner.py --version
0.3.0
Commit message format
Commit messages should conform to the conventional commits standard, and to help with this you should install the commitizen tool:
$ pip install -r dev-requirements.txt
$ git add .
$ cz commit
Tests
To run the test suite locally, use nose2 for unit tests, and behave for behavioural tests (Note that running behave will run python setup.py install, installing photo-import into your current environment):
$ pip install -r requirements.txt
$ nose2
$ behave
Metadata
Release files for photo-import 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| photo-import-0.5.0.tar.gz | 22.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| photo_import-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.0 kB
Release files / photo-import-0.5.0.tar.gz
| Download URL | photo-import-0.5.0.tar.gz |
|---|---|
| Size | 22.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9a05e3db5eee831f1c025c8cadd6f8baf6582ff1788d6b61ae191a03b712b986
|
|
BLAKE2b-256 checksum How to use checksums |
b62383b009012c53c703c3e7cf2c586d62c2ba4229764c3c3cfc55e42b9d5e62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
|
Release files / photo_import-0.5.0-py3-none-any.whl
| Download URL | photo_import-0.5.0-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
444f65b3b5248e8126b8e1bc8602148b4de7cc1de29f369e9844c0644fe6eca5
|
|
BLAKE2b-256 checksum How to use checksums |
8aac9572c9808479151094823f4f3ef795c509b2214e9a743be55f7456835f20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
|