Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wikipedia: retrieve image descriptions for non-fragment links to Wikipedia/Wikimedia Commons files #2389

Open
SnoopJ opened this issue Dec 29, 2022 · 0 comments

Comments

@SnoopJ
Copy link
Contributor

SnoopJ commented Dec 29, 2022

Requested Feature

Sopel should be able to retrieve the file description in response to links directly to File:… objects (i.e. links that are not fragments of the form Some_Other_Article#/media/File:…)

Currently, Sopel responds to these links in a generic way using the url plugin, because URLs containing File: are excluded by the wikipedia plugin's pattern.

<SnoopJ> https://commons.wikimedia.org/wiki/File:Comparison_strut_diffraction_spikes.svg
<Sopel> [url] File:Comparison strut diffraction spikes.svg - Wikimedia Commons | commons.wikimedia.org
<SnoopJ> https://en.wikipedia.org/wiki/File:Staring_Down_Hurricane_Florence.jpg
<Sopel> [url] File:Staring Down Hurricane Florence.jpg - Wikipedia | en.wikipedia.org

With this feature implemented, the responses will come from the wikipedia plugin and will include the file description if there is one, something akin to the behavior under #2388 but not restricted to fragments at the end of an article URL

17:31 <SnoopJ> https://commons.wikimedia.org/wiki/File:Comparison_strut_diffraction_spikes.svg
17:31 <Sopel> [wikipedia] Comparison of diffraction spikes for various strut arrangements of a reflecting telescope. The inner circle represents the secondary mirror.
17:31 <SnoopJ> https://en.wikipedia.org/wiki/File:Staring_Down_Hurricane_Florence.jpg
17:31 <Sopel> [wikipedia] Photo taken of Hurricane Florence convection with deep eyewall in Atlantic Sea from ISS by astronaut Alexander Gerst: Ever stared down the gaping eye of a category 4 hurricane? It's chilling, even from space ...(There is hope, photos and observations like that can improve preparations for hurricanes like Hurricane Florence.)

Problems Solved

This feature request is an extension of the functionality added by #2388

Alternatives

No response

Notes

Here are some test URLs that may be helpful for checking the functionality of this feature

https://en.wikipedia.org/wiki/File:Staring_Down_Hurricane_Florence.jpg
https://en.wikipedia.org/wiki/File:Google1998.png
https://en.wikipedia.org/wiki/History_of_supercomputing#/media/File:Paragon_XP-E_-_mesh.jpg
https://ja.wikipedia.org/wiki/スーパーコンピュータ技術史#/media/ファイル:CDC_6600_introduced_in_1964.jpg
https://de.wikipedia.org/wiki/Liste_der_Stra%C3%9Fen_in_Aachen-Mitte#/media/Datei:Aachen-Mitte.jpg
https://commons.wikimedia.org/wiki/File:Comparison_strut_diffraction_spikes.svg
@SnoopJ SnoopJ added the Feature label Dec 29, 2022
@dgw dgw added this to the 8.1.0 milestone Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants