Remember why photos failed and report the pages without one
Each run now writes .failures.json in the backup directory: the last reason every photo failed and the wiki pages that use it, dropping any photo that has since arrived. A new --report mode reads the wiki index and that file and lists every page whose photo is not on disk, with the reason or "not yet attempted", calling neither flickr nor immich. That is what tells a wiki editor which photos have gone from flickr and need replacing. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
3 files changed
+195
-2
No files matched your search
@@ -42,6 +42,7 @@ Make the credential files `chmod 600`.
|
||||
./rgl-photo-backup --settings other.yml DIR # a different settings file
|
||||
./rgl-photo-backup --debug DIR # log every request to stderr
|
||||
./rgl-photo-backup -q DIR # same as --quiet
|
||||
./rgl-photo-backup --report DIR # which pages have no photo on disk, and why
|
||||
```
|
||||
|
||||
The first run downloads about 4800 photos, one Flickr info call and one
|
||||
@@ -117,6 +118,13 @@ image URL (`url-0f4b1c2d3e4f5a6b.jpg`), with a matching sidecar. The
|
||||
directory is a complete backup on its own. A `.part` file is an interrupted
|
||||
download and is refetched next run.
|
||||
|
||||
`.failures.json` records the last reason each photo failed, with the pages
|
||||
that use it. A photo that later arrives drops out of it. `--report` reads the
|
||||
wiki index and that file, and lists every page whose photo is not on disk
|
||||
with the reason, or `not yet attempted`, without calling Flickr or Immich, so
|
||||
it is the way to find photos that have gone from Flickr and need replacing
|
||||
on the wiki.
|
||||
|
||||
## Running under cron
|
||||
|
||||
```cron
|
||||
@@ -141,6 +149,7 @@ A flag beats the environment, which beats the file, which beats the default.
|
||||
| `fetch` | `--sync-only` sets false | | `true` |
|
||||
| `sync` | `--fetch-only` sets false | | `true` |
|
||||
| `dry_run` | `--dry-run` | | `false` |
|
||||
| `report` | `--report` | | `false` |
|
||||
| `limit` | `--limit N` | | unlimited |
|
||||
| `pace` | `--pace SECONDS` | `RGL_PHOTO_BACKUP_PACE` | `1` |
|
||||
| `quiet` | `--quiet`, `-q` | | `false` |
|
||||
|
||||
Reference in new issue
Block a user