Add media retention cleanup command
This commit is contained in:
parent
3b6503a6ed
commit
507074b80e
10 changed files with 722 additions and 52 deletions
|
|
@ -30,6 +30,20 @@ variants are written under `images/thumbs/` inside each feed output directory.
|
|||
Edit the Scrapy settings in [`demo/repub.toml`](/home/abel/src/guardianproject/anynews/republisher-redux/demo/repub.toml)
|
||||
when a demo run needs to disable thumbnails or test a different profile set.
|
||||
|
||||
## Media Cleanup
|
||||
|
||||
Published media can remain on disk after articles fall out of the current feed.
|
||||
Run cleanup in dry-run mode first:
|
||||
|
||||
```shell
|
||||
uv run repub cleanup-media --config demo/repub.toml --dry-run
|
||||
```
|
||||
|
||||
With `--config`, cleanup scans `demo/out/feeds/` and honors any
|
||||
`REPUBLISHER_*_DIR` media directory overrides in the config. Remove `--dry-run`
|
||||
to delete old unreferenced media. The default retention window is 25 days; use
|
||||
`--days N` to override it.
|
||||
|
||||
## Local File Feed
|
||||
|
||||
`repub` already accepts absolute `file://` feed URIs. To point it at the demo fixture, generate an absolute URI like this from the repo root:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue