Update README.md

This commit is contained in:
2025-01-04 02:31:36 +03:00
parent f73d612666
commit 62ca9f2378
2 changed files with 15 additions and 10 deletions

View File

@@ -19,7 +19,7 @@ structure for that files.
## Installing
```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
system or user $PATH, e.g. /usr/local/bin/.
@@ -27,6 +27,10 @@ system or user $PATH, e.g. /usr/local/bin/.
sudo cp ${GOPATH}/bin/photocatalog /usr/local/bin/photocatalog
```
## Migrating from v0.*
TODO
## Supported formats
At this moment supported jpeg files with filled exif data or any other
files but with names matching pattern `yyymmdd_HHMMSS.ext`. Such
@@ -40,31 +44,31 @@ at this time.
### One-shot
#### Copy files (make a COW if fs supports it)
```bash
photocalog -mode copy -target ./photos/ ./sync/photos/*
photocalog -mode copy -target ./photos/ -source ./sync/photos/
```
#### Create hardlinks (only withing one disk partition)
```bash
photocalog -mode hardlink -target ./photos/ ./sync/photos/*
photocalog -mode hardlink -target ./photos/ -source ./sync/photos/
```
or
```bash
photocalog -target ./photos/ ./sync/photos/*
photocalog -target ./photos/ -source ./sync/photos/*
```
### Monitor
### Watch mode
#### Copy files (make a COW if fs supports it)
```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)
```bash
photocalog -mode hardlink -target ./photos/ -monitor ./sync/photos/
photocalog -mode hardlink -target ./photos/ -watch -source ./sync/photos/
```
or
```bash
photocalog -target ./photos/ -monitor ./sync/photos/
photocalog -target ./photos/ -watch -source ./sync/photos/
```
## Install and run monitor service
@@ -89,6 +93,6 @@ under corresponding sub-dir.
### Why this tool was created if there is awesome XXX tool?
I had two good reasons:
1. I wanted
1. I wish
2. I can

View File

@@ -268,6 +268,7 @@ func (o *Organizer) BuildTargetPath(sourcePath string, meta metadata.Metadata) (
o.targetDir,
strconv.Itoa(meta.Created.Year()),
strconv.Itoa(int(meta.Created.Month())),
strconv.Itoa(meta.Created.Day()),
sourcePath,
)