Repository navigation
Remove Unsplash and Pixabay copies after 24 hours - #29
Merged
Merged
Conversation
The Unsplash API terms allow a local copy for 24 hours; Pixabay asks for the same cache limit. Each such record now carries expires_at (one day after retrieval). validate_record refuses an Unsplash or Pixabay record without it. image_find removes expired copies and their credit records before each run. Pexels copies have no expiry, as its terms state no limit. This is one step toward the Unsplash checklist. Hotlinking, the download trigger on use, and credit text in the rendered output are separate changes. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017qYKdYke3ySSZS76W9Tp34
Brings in Pixabay (#28). Conflicts in tools.py, studio.md and catalog.json resolved to keep both the 24-hour expiry and the Pixabay wording; the catalog was regenerated. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017qYKdYke3ySSZS76W9Tp34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Unsplash and Pixabay local copies expire 24 hours after download. Each such record carries
expires_at(one day after retrieval), andimage_findremoves expired copies and their credit records before each run. Pexels copies have no expiry, as its terms state no limit.validate_recordrefuses an Unsplash or Pixabay record withoutexpires_at.purge_expired(inputs, today)deletes the image and its.credit.json, and returns what it removed.docs/studio.mdstate the 24-hour rule. Catalog regenerated.Scope
This is one step toward the Unsplash checklist. It does not add hotlinking, does not change when the download trigger fires, and does not put a credit line into rendered output. Those are separate changes, and the production application is not submitted.
Merge
mainis merged in, including Pixabay (#28). Conflicts intools.py,studio.mdandcatalog.jsonwere resolved to keep both the expiry and the Pixabay wording.Tests
tests/studio/test_stock_cache.py(4 tests): expiry on Unsplash and Pixabay records and none on Pexels, validation withoutexpires_at, purge removes only expired Unsplash and Pixabay copies, afindrun purges expired copies first.414b389): 1288 passed, 13 skipped (about 27 min).🤖 Generated with Claude Code
Co-Authored-By: Claude Haiku 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_017qYKdYke3ySSZS76W9Tp34
Generated by Claude Code