https://github.com/barasher/picture-dispatcher
https://github.com/barasher/picture-dispatcher
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/barasher/picture-dispatcher
- Owner: barasher
- License: gpl-3.0
- Created: 2021-11-23T20:48:21.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-11-29T21:46:22.000Z (over 4 years ago)
- Last Synced: 2024-06-20T03:45:49.167Z (almost 2 years ago)
- Language: Go
- Size: 1.76 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# Picture-dispatcher
[](https://github.com/barasher/picture-dispatcher/actions)[](https://github.com/barasher/picture-dispatcher/actions)
[](https://goreportcard.com/report/github.com/barasher/picture-dispatcher)
## Presentation
**Picture-dispatcher** is a CLI tool designed to :
- drop Apple live pictures
- dispatch multimedia files (pictures, movies) by date
## Execution
```
$ ./dispatcher -h
Usage of file-dispatcher:
-c string
Configuration file
-d string
Destination folder
-s string
Source folder
```
Dispatch files contained in `/path/containing/pictures` in `/path/to/store/dispatched`
`$ ./dispatcher -c dispatcher.json -s /path/containing/pictures -d /path/to/store/dispatched` dispatchs files contained in `/path/containing/pictures` in `/path/to/store/dispatched`.
If `-d` is not provided, a new `out` folder will be created in de "source" folder. `$ ./dispatcher -c dispatcher.json -s /path/containing/pictures` will dispatch files contained in `/path/containing/pictures` in `/path/containing/pictures/out`.
## Configuration
```json
{
"loggingLevel":"info",
"threadCount":2,
"dateFields": [
{ "field":"CreateDate", "pattern":"2006:01:02 15:04:05" },
{ "field":"Media Create Date", "pattern":"2006:01:02 15:04:05" }
],
"outputDateFormat":"2006_01",
"exiftoolPath":"/path/to/exiftool"
}
```
- **loggingLevel** : (optional) logging level (debug, info, warn, error, fatal, panic)
- **threadCount** : (optional, default : max proc) how many goroutines are spawned to extract date
- **dateFields** : exiftool tags that have to be considered as valid date for dispatching
- **dateFields.field** : exiftool tag key
- **dateFields.pattern** : date pattern, based on golang specifications (https://golang.org/pkg/time/#Time.Format)
- **outputDateFormat** : date pattern for the output folders, based on golang specifications (https://golang.org/pkg/time/#Time.Format)
- **exiftoolPath** : (optional) path to `exiftool` binary if not in `$PATH`