Coder Social home page Coder Social logo

ndrezn / wikipedia-pic-of-the-day Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 1.72 MB

Posts the picture of the day from Wikipedia to Bluesky (50k followers!)

Home Page: https://bsky.app/profile/wiki-potd.bsky.social

License: MIT License

Python 99.46% Shell 0.54%
bot python python-twitter twitter wikipedia

wikipedia-pic-of-the-day's People

Stargazers

 avatar

Watchers

 avatar

wikipedia-pic-of-the-day's Issues

Better documentation

Update the README.md with full documentation of the mechanics of the bot, dependencies, attribution, etc.

You might want to document on GitHub how the attribution works. Schwede66 3:20 pm, Today (UTC−4)

Thanks Schwede 🙂

Author parsing when authors are parameterized as templates

Occassionally authors for photographs are annotated using templates, see: https://commons.wikimedia.org/wiki/File:Red-and-green_macaw_(Ara_chloropterus)_juvenile.JPG on https://en.wikipedia.org/wiki/Template:POTD/2022-09-07 and https://en.wikipedia.org/wiki/Template:POTD/2022-09-06. These templates should be parsed and converted to strings as part of the attribution reply. For now attribution in these cases only includes the link to the photograph.
Screen Shot 2022-09-07 at 12 02 04 PM

Resolve issue when posting to `potd_test`

I see an issue with posting to potd_test. This is a shame, because potd_test is a nice way to make sure this bot is ship-shape without posting to main, specifically a json.decoder.JSONDecoder error. I will investigate but I am suspicious that this is caused by my Twitter API permissions not yet propagating for the new account.

Better quote splitting when first sentence is >240 characters

Right now, captions are generated by concatanating sentences until the 240 character limit is reached. This works fine, but occassionally the first sentence is >240 characters and there's no prose attached to the tweet. In this circumstance, the caption should be tokenized by word rather than character and split in the middle of the sentence, with the rest of the sentence added to the reply caption. See https://en.wikipedia.org/wiki/Template:POTD/2022-09-26 for an example.

Better attribution to comply with varying CC licenses

As noted by andrybak over on Wikipedia:

for better compliance with licenses of the images (mostly variants of Creative Commons) I recommend that you include a link to the file page in the tweets. Either to Wikipedia https://en.wikipedia.org/wiki/File:Le_Voyage_dans_la_lune_(black_and_white,_1902).webm or Wikimedia Commons: https://commons.wikimedia.org/wiki/File:Le_Voyage_dans_la_lune_(black_and_white,_1902).webm. Quiet a few of POTD pictures are in the public domain (including today's Template:POTD/2022-09-01), but some are published under CC licenses that require attribution. For example, Template:POTD/2022-08-27, license of which was violated by https://twitter.com/wiki_potd/status/1563476127624007681. —⁠andrybak (talk)

I think this could be resolved by adding a second reply including the name of the author and a link to the image on WP or WM.

Support for short videos

Video support should be updated to check video length. If >2:20, crop down to 2:30 and add a fade. If <2:20, leave as-is. Twitter has a max length of 2:20 for videos.

Right now, videos <2:20 will have the last frame extended for the length it takes to fill the 2:20, which is pretty sloppy...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.