Ok, I've thrown together a preliminary patch to move the actual rotation for ApiImageRotate to the job queue:
https://gerrit.wikimedia.org/r/#/c/225097/ Haven't had a chance to test it yet, so there's probably a typo or two still hiding in there. Steinsplitter, will there be a (more limited) bot hitting this API action, or will people need a user-interface for it in the near term? It shouldn't be too hard to rig up some JS buttons... The primary difficulty I see is with being able to see whether there's a pending rotation; in case it's delayed you don't want to accidentally queue up multiple rotations! Once something's fired into the job queue I don't think we have a good way to query it. (TimedMediaHandler shows queued transcode jobs, but maintains its own secondary database table to track them...) Also, I had a good talk with Trevor at the Wikimania hackathon about non-destructive image editing; somewhere down the road we should be able to integrate this sort of thing into the thumbnailing in a way that's more user-friendly and also allows for cropping and some basic filters. But I don't think we have to wait on that to help folks out for now by fixing up the disabled API action... -- brion On Thu, Jul 16, 2015 at 9:16 AM, Brion Vibber <[email protected]> wrote: > On Thu, Jul 16, 2015 at 9:00 AM, Steinsplitter Wiki < > [email protected]> wrote: > >> > Out of curiosity what is the problem with the bot that prevents it from >> > working? >> It is very old and bad written and needs a complete rewrite. >> > > That can be said of many things in our stack. ;) What made it stop working > in the last month, specifically? Can you point us to the source code? > > >> > It's entirely possible that fixing the bot is easier than hacking an >> > internal rotate and reupload feature that runs on the image scalers. >> It would be the best solution to fix that function in mediawiki. This >> would also allow real time rotation. >> >> > Or... Just making it possible to mark images as needing to be rotated >> > correctly on output (given we already rotate on thumbnail generation)... >> The thumb rotation is not always perfect and the file itself is not >> rotatet at all. >> > > Allowing override of the thumb rotation would provide you real time > rotation... > > I'm not sure about the need to rotate the original file; ideally original > files should be left as-is and kept archival. > > -- brion > > >> >> :-) >> >> > Date: Thu, 16 Jul 2015 08:51:47 -0500 >> > From: [email protected] >> > To: [email protected] >> > Subject: Re: [Wikitech-l] Provide a well-performing API to rotate an >> image >> > >> > Out of curiosity what is the problem with the bot that prevents it from >> > working? >> > >> > It's entirely possible that fixing the bot is easier than hacking an >> > internal rotate and reupload feature that runs on the image scalers. >> > >> > Or... Just making it possible to mark images as needing to be rotated >> > correctly on output (given we already rotate on thumbnail generation)... >> > >> > -- brion >> > On Jul 16, 2015 8:27 AM, "Steinsplitter Wiki" < >> [email protected]> >> > wrote: >> > >> > > Hi, >> > > >> > > I am not sure if this is the correct mailinglist to write. >> > > >> > > Every week on commons a bot is rotating hunderts of files, however >> this >> > > bot will stop working soon. In the last years tens of thousands files >> has >> > > been rotated. >> > > >> > > Rotating files is a vital feature on commons and therefore >> indispensable. >> > > The bugreport [1] on phabricator is open since three years, but, >> > > unfortunately no dev is working on it. The bug has also a lot of +1 >> > > (tokens). >> > > >> > > I am wonder if it is possible to enable and code review this feature >> asap. >> > > >> > > :-) >> > > >> > > Best, >> > > Steinsplitter >> > > >> > > [1] https://phabricator.wikimedia.org/T35186 >> > > >> > > _______________________________________________ >> > > Wikitech-l mailing list >> > > [email protected] >> > > https://lists.wikimedia.org/mailman/listinfo/wikitech-l >> > _______________________________________________ >> > Wikitech-l mailing list >> > [email protected] >> > https://lists.wikimedia.org/mailman/listinfo/wikitech-l >> >> _______________________________________________ >> Wikitech-l mailing list >> [email protected] >> https://lists.wikimedia.org/mailman/listinfo/wikitech-l >> > > _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
