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>
This commit is contained in:
Edward Betts 2026-02-07 10:22:19 +00:00
parent d59e67b55d
commit c5efd429ce
4 changed files with 403 additions and 19 deletions

View file

@ -1,5 +1,33 @@
{# vim:ft=jinja
#}
{% if is_nonfree_cc %}
Hi,
I'd like to use your photo to illustrate the article about {{ name }} on Wikipedia.
{{ flickr_url }}
{{ wiki_part1 }}{{ wiki_part2 | urlencode }}
I noticed your photo is licensed under {{ license_name }}. Thank you for sharing your work with a Creative Commons license! Unfortunately, Wikipedia can only use images that allow commercial use and derivative works, so the current license restrictions prevent us from using it.
{% if 'NC' in license_name and 'ND' in license_name %}
The "NonCommercial" restriction means the image can't be used on Wikipedia because Wikipedia content may be reused commercially. The "NoDerivs" restriction also prevents use because Wikipedia needs to allow image cropping and other modifications.
{% elif 'NC' in license_name %}
The "NonCommercial" restriction means the image can't be used on Wikipedia because Wikipedia content may be reused commercially by anyone.
{% elif 'ND' in license_name %}
The "NoDerivs" restriction means the image can't be used on Wikipedia because Wikipedia needs to allow modifications like cropping or colour correction.
{% endif %}
Would you consider changing the license to Creative Commons Attribution (CC BY) or Attribution-ShareAlike (CC BY-SA)? These licenses still require credit to be given to you, but allow the broader use that Wikipedia requires.
To adjust the license settings, you can click on the license name on the right-hand side of the photo's page, just underneath the date.
Thanks,
Edward
edward@4angle.com
{% else %}
Hi,
I'd like to use your photo to illustrate the article about {{ name }} on Wikipedia.
@ -18,3 +46,4 @@ Thanks,
Edward
edward@4angle.com
{% endif %}