https://github.com/deseteral/pastelogue
🗂 🖼 Automatically catalogue your photo collection
https://github.com/deseteral/pastelogue
Last synced: about 2 months ago
JSON representation
🗂 🖼 Automatically catalogue your photo collection
- Host: GitHub
- URL: https://github.com/deseteral/pastelogue
- Owner: Deseteral
- Created: 2019-08-10T15:52:04.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-10T22:38:36.000Z (about 4 years ago)
- Last Synced: 2025-02-06T09:38:28.447Z (3 months ago)
- Language: Rust
- Homepage:
- Size: 1.56 MB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pastelogue
Automatically catalogue your photo collection.
## Cataloging algorithm
Every media file inside the library directory has to be in correct location with correct name.### Directory structure scheme
```
///
```
where
- `year` is in four digit notation (so `1996` not `96`)
- `month` and `day` are numbers (with leading zero for values from 1 to 9)### Filename scheme
```
--_--<_optional_counter>.
```
where
- `year`, `month`, `day` are the same as in directory name
- `hour` is number from 00 to 23 (24h format, so 19:00 not 7pm)
- `hour`, `minute`, `second` are numbers with leading zero for values from 1 to 9
- `optional_couter` is for cases when there was more then one photo taken in the same second. When that is the case, first photo doesn't have a counter, and second one has `_1` suffix### Example
Given two photos that were taken on June 21st 2019 18:13:37 the paths should look like that:
```
/2019/06/21/2019-06-21_18-13-37.jpeg
/2019/06/21/2019-06-21_18-13-37_1.jpeg
```## Development
### Dependencies
To extract Exif metadata from files pastelogue uses Exiv2 library. To setup this dependency run
```shell
./scripts/macos_setup_exiv2.sh
```
or if you're on Windows
```powershell
./scripts/windows_setup_exiv2.ps1
```### Making release package
For MacOS run
```shell
./scripts/macos_make_release.sh
```
or if you're on Windows
```powershell
./scripts/windows_make_release.ps1
```Packages with binaries built for specific platform are in `release` directory.
## Server
When the server starts it will emit the `READY` event:
```json
{
"id": "READY",
"payload": {
"version": "0.4.0"
}
}
```### Processing
Request:
```json
{
"action": "START_PROCESSING",
"args": {
"path": "/Some/user/path/to/photos/directory"
}
}
```Response:
```json
{
"id": "PROCESSING_STARTED",
"payload": null
}
{
"id": "PROCESSING_PROGRESS",
"payload": {
"progress": {
"current": 231,
"total": 674
},
"file": {
"input": {
"path": "/Some/user/path/to/single_photo.jpeg"
},
"output": {
"path": "/Some/user/path/to/single_photo_with_correct_path_and_name.jpeg"
}
},
"metadata": {
"createdAt": "2020-06-08T20:02:24"
}
}
}
{
"id": "PROCESSING_FINISHED",
"payload": null
}
```### Read EXIF data from single image
Request:
```json
{
"action": "READ_EXIF_DATA",
"args": {
"path": "/Some/user/path/to/single_photo.jpeg"
}
}
```Response:
```json
{
"id": "EXIF_DATA",
"payload": {
"exif_data": { ... }
}
}
```### Error
Response:
```json
{
"id": "ERROR",
"payload": {
"messages": [
"Some error message",
"Other error message"
]
}
}
```## License
This project is licensed under the [MIT license](LICENSE).