Commit graph

20 commits

Author SHA1 Message Date
7b741e951f Add Flickr search term override field
Allow users to edit the Flickr search query without changing the
Wikipedia article. Shows a text field with the current search term
(including quotes for phrase search) that can be modified and
re-submitted. The search term persists across pagination and photo
selection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 13:42:18 +00:00
57b2e474df Add pagination to category search for large categories
Large categories like "Living people" (900k+ articles) were impractical
because the code tried to download all members before displaying results.
Now stops after collecting ~200 articles and provides a "Next page" link.

Also fixes the MediaWiki API continuation protocol: passes the full
continue dict (not just gcmcontinue) so imcontinue responses are handled
properly, and reduces gcmlimit from "max" to 50 so each batch's images
fit in one API response.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 13:32:56 +00:00
08f5128e8d Add interaction logging and tighten model NOT NULL constraints
Log searches (article/category) and message-generation events to a new
interaction_log table, capturing IP address and User-Agent.

Also apply NOT NULL constraints to Contribution, SentMessage, FlickrUpload,
and ThumbnailCache fields that are always populated, and remove stale
continue_token references from category.html.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-08 12:34:04 +00:00
9f0fb01878 Extract flickr_mail package with Mapped models and shared utilities
Move from JSON file storage to SQLite database using SQLAlchemy with
Mapped type hints. Deduplicate URL utility functions into shared
flickr_mail package.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 13:10:49 +00:00
c5efd429ce Add category search, license handling, and message page improvements
Add /category route to find Wikipedia articles without images in a
category using the MediaWiki API. Filter out non-content images (UI
icons, logos) when checking articles.

Show image license on message page with alternate message for non-free
CC licenses (NC/ND) explaining Wikipedia's restrictions. For photos
with free licenses, show upload options linking to UploadWizard instead
of a message form.

Add Flickr CC 4.0 license codes, user profile links, previous message
detection from sent mail index, and back-navigation between category,
search results, and message pages.

Closes #3

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 10:22:19 +00:00
d59e67b55d Display total count of photos obtained via Flickr mail
Show the total number of successful Flickr mail requests on the home
page, not just the count of recent uploads displayed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 18:17:33 +00:00
a2d29d7937 Show recent Commons uploads obtained via Flickr mail
Display recent Wikimedia Commons uploads on the home page, filtered to
only show images that were obtained by contacting creators via Flickr
mail. Each upload shows:
- Thumbnail linking to Commons
- Creator name linking to their Flickr profile
- Link to the illustrated Wikipedia article (or Wikidata item)

Features:
- Parse sent mail messages to extract Flickr and Wikipedia URLs
- Match Commons uploads with sent mail by normalized Flickr URL
- Cache Commons API thumbnail responses and sent mail index
- Handle Wikidata item URLs (Q-numbers) with correct links
- Add update_flickr_uploads.py script to find uploads from UploadWizard
  contributions by checking Commons API metadata

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 10:43:45 +00:00
0062de8ede Add pagination for search results
- Add SearchResult dataclass with pagination metadata
- Update search_flickr() to accept page parameter
- Parse total results count from Flickr response
- Add Bootstrap pagination controls to template
- Display total result count in UI
- Update documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 17:03:30 +00:00
08d1f9b6c4 Add integrated Flickr search with photo selection
Instead of showing a link to search Flickr, the app now performs the
search directly and displays results as a grid of thumbnails. Each photo
shows the photographer's name and license (with Wikipedia-compatible
licenses highlighted in green). Clicking a photo takes the user to the
message composition page with the selected image displayed alongside.

Includes validation to ensure image URLs are from Flickr's static servers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 13:41:37 +00:00
6f43cee91b Fix support for Wikipedia URLs
Closes: #4
2023-10-30 06:43:45 +00:00
e4e9df88d7 First form can take name or URL
Closes: #2
2023-10-02 19:48:50 +01:00
adc7cffbd6 Fix typo 2023-09-29 12:28:23 +01:00
af1640abec Show errors, even in production. 2023-09-09 17:06:01 +03:00
3f573043a1 Tidy code 2023-09-08 19:03:51 +01:00
5d257055a6 Combine into single page, add copy buttons. 2023-09-08 19:03:07 +01:00
0768cc101c Combine first and second pages. 2023-09-08 12:11:42 +01:00
d29285d468 Add link to send flickr message 2023-09-08 11:01:50 +01:00
c77ae56ba0 More steps, include link to search flickr 2023-09-08 03:46:04 +01:00
bec16f8dcb Improvements 2023-09-08 01:52:04 +01:00
084c886933 Initial commit 2023-09-08 01:10:55 +01:00