https://github.com/pavelkryukov/phototools
Tools to manipulate with my photo base
https://github.com/pavelkryukov/phototools
Last synced: 4 months ago
JSON representation
Tools to manipulate with my photo base
- Host: GitHub
- URL: https://github.com/pavelkryukov/phototools
- Owner: pavelkryukov
- License: mit
- Created: 2020-03-28T14:13:14.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-04T20:51:50.000Z (about 5 years ago)
- Last Synced: 2025-01-14T02:43:16.307Z (5 months ago)
- Language: Python
- Homepage:
- Size: 63.5 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/pavelkryukov/phototools/actions)
[](https://codecov.io/gh/pavelkryukov/phototools)
[](https://lgtm.com/projects/g/pavelkryukov/phototools/alerts/)# Photo Tools
A set of tools I use to manipulate with my photo library.
### Move and arrange
The following command moves files and puts them in structured manner.
If destination file exists, no move is performed.```python
import phototools as pt
pt.move(generator=pt.all, src_path="E:\\Photos", dst_path="E:\\SortedPhotos", format='%Y/%m %B')
````format` defines folders structure: `%Y/%m %B` => `2020/05 May/Filename`.
To filter specific files, you may use different generators:
```python
all # all files
jpegs # jpeg files
nefs # Nikon raws files
takes(15) # all similar and sequntially named photos, so I can keep the best one and remove all others
# parameter sets threshold, 1 is to get very similar, 15 is to catch the less similar ones
duplicates # all photos which are stored under different name (uses SHA256 and timestamp)
duplicates_only_hash # all photos which are stored under different name (only SHA256)
nefs_with_jpg # raw+jpg pairs so I can keep only one format
instagram # all photos saved by Instagram app
```### Testing
Testing is handled with default `unittest` module.
Unpack samples before running tests (archive preserves filesystem timestamps).```bash
tar -xf td.tar
python -m unittest -b
```