mirror of
https://github.com/derfenix/photocatalog.git
synced 2026-03-11 21:35:34 +03:00
Update README.md
This commit is contained in:
24
README.md
24
README.md
@@ -19,7 +19,7 @@ structure for that files.
|
|||||||
|
|
||||||
## Installing
|
## Installing
|
||||||
```bash
|
```bash
|
||||||
go install github.com/derfenix/photocatalog@latest
|
go install github.com/derfenix/photocatalog/v2@latest
|
||||||
```
|
```
|
||||||
Optionally you could copy created binary from the GO's bin path to
|
Optionally you could copy created binary from the GO's bin path to
|
||||||
system or user $PATH, e.g. /usr/local/bin/.
|
system or user $PATH, e.g. /usr/local/bin/.
|
||||||
@@ -27,44 +27,48 @@ system or user $PATH, e.g. /usr/local/bin/.
|
|||||||
sudo cp ${GOPATH}/bin/photocatalog /usr/local/bin/photocatalog
|
sudo cp ${GOPATH}/bin/photocatalog /usr/local/bin/photocatalog
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Migrating from v0.*
|
||||||
|
|
||||||
|
TODO
|
||||||
|
|
||||||
## Supported formats
|
## Supported formats
|
||||||
At this moment supported jpeg files with filled exif data or any other
|
At this moment supported jpeg files with filled exif data or any other
|
||||||
files but with names matching pattern `yyymmdd_HHMMSS.ext`. Such
|
files but with names matching pattern `yyymmdd_HHMMSS.ext`. Such
|
||||||
names format applied by android's camera software (I guess all cams
|
names format applied by android's camera software (I guess all cams
|
||||||
use this format, fix me if I'm wrong).
|
use this format, fix me if I'm wrong).
|
||||||
|
|
||||||
There is no support for changing names format without modifying source code
|
There is no support for changing names format without modifying source code
|
||||||
at this time.
|
at this time.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
### One-shot
|
### One-shot
|
||||||
#### Copy files (make a COW if fs supports it)
|
#### Copy files (make a COW if fs supports it)
|
||||||
```bash
|
```bash
|
||||||
photocalog -mode copy -target ./photos/ ./sync/photos/*
|
photocalog -mode copy -target ./photos/ -source ./sync/photos/
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Create hardlinks (only withing one disk partition)
|
#### Create hardlinks (only withing one disk partition)
|
||||||
```bash
|
```bash
|
||||||
photocalog -mode hardlink -target ./photos/ ./sync/photos/*
|
photocalog -mode hardlink -target ./photos/ -source ./sync/photos/
|
||||||
```
|
```
|
||||||
or
|
or
|
||||||
```bash
|
```bash
|
||||||
photocalog -target ./photos/ ./sync/photos/*
|
photocalog -target ./photos/ -source ./sync/photos/*
|
||||||
```
|
```
|
||||||
|
|
||||||
### Monitor
|
### Watch mode
|
||||||
#### Copy files (make a COW if fs supports it)
|
#### Copy files (make a COW if fs supports it)
|
||||||
```bash
|
```bash
|
||||||
photocalog -mode copy -target ./photos -monitor ./sync/photos/*
|
photocalog -mode copy -target ./photos -watch -source ./sync/photos/
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Create hardlinks (only withing one disk partition)
|
#### Create hardlinks (only withing one disk partition)
|
||||||
```bash
|
```bash
|
||||||
photocalog -mode hardlink -target ./photos/ -monitor ./sync/photos/
|
photocalog -mode hardlink -target ./photos/ -watch -source ./sync/photos/
|
||||||
```
|
```
|
||||||
or
|
or
|
||||||
```bash
|
```bash
|
||||||
photocalog -target ./photos/ -monitor ./sync/photos/
|
photocalog -target ./photos/ -watch -source ./sync/photos/
|
||||||
```
|
```
|
||||||
|
|
||||||
## Install and run monitor service
|
## Install and run monitor service
|
||||||
@@ -89,6 +93,6 @@ under corresponding sub-dir.
|
|||||||
|
|
||||||
### Why this tool was created if there is awesome XXX tool?
|
### Why this tool was created if there is awesome XXX tool?
|
||||||
I had two good reasons:
|
I had two good reasons:
|
||||||
1. I wanted
|
1. I wish
|
||||||
2. I can
|
2. I can
|
||||||
|
|
||||||
|
|||||||
@@ -268,6 +268,7 @@ func (o *Organizer) BuildTargetPath(sourcePath string, meta metadata.Metadata) (
|
|||||||
o.targetDir,
|
o.targetDir,
|
||||||
strconv.Itoa(meta.Created.Year()),
|
strconv.Itoa(meta.Created.Year()),
|
||||||
strconv.Itoa(int(meta.Created.Month())),
|
strconv.Itoa(int(meta.Created.Month())),
|
||||||
|
strconv.Itoa(meta.Created.Day()),
|
||||||
sourcePath,
|
sourcePath,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user