binbot added a subscriber: Dalba. binbot added a comment.
I did some coding. https://hu.wikipedia.org/wiki/Szerkeszt%C5%91:BinBot/huwiki/flaggedrevs.py is a module for handling FlaggedRevs in Hungarian Wikipedia Features for end users: `flagged_state():` returns a state code (see `class Flags`) for a page. `cosmeticable()`: tells if a page is suitable for cosmetic changes `CosmeticableFilterPageGenerator()`: a wrapper page generator that filters cosmeticable pages. It has two variations: either it handles pages one by one, or takes all the pages from the inner generator, and quries them from API en masse. Perhaps this may be faster. Because the current soultion does not reflect the API call clearly, I uploaded an erarlier version: https://hu.wikipedia.org/w/index.php?title=Szerkeszt%C5%91:BinBot/huwiki/flaggedrevs.py&oldid=25979018 If you search for `def flagged_state(` in this code, you will see the API query. Special thanks to @Dalba for mining the query (https://www.mediawiki.org/w/index.php?title=Extension%3AFlaggedRevs&diff=3274706&oldid=3214539&diffmode=source). However please keep in mind that FlaggedRevs may vary from wiki to wiki. Huwiki uses the so called "German approach", see https://en.wikipedia.org/wiki/Wikipedia:Flagged_revisions#Wikipedia That means we have flagged namespaces, and once a page in these namespaces gets reviewed the first time, it will be flagged forever unless we explicitely declare it unreviewed. So my code may not be suitable as is for every wiki. Coding a general solution may be a bit more complicated. Currently my next problem is how to build this pagegenerator into cosmetic changes, because it does not have a general command line parameter. TASK DETAIL https://phabricator.wikimedia.org/T57081 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: binbot Cc: Dalba, binbot, Huji, JJMC89, Zache, Ejs-80, Xqt, xSavitar, Jwu96, AbhishekSinghDhadwal, Subhang65523, Dvorapa, Iamsandipbhuyan, Cyberpower678, Cirdan, Soumya-ranjan7, Rammanojpotla, BamLifa, Tgr, srishakatux, zhuyifei1999, djff, Mjbmr, DerHexer, KasiaWMDE, 01tonythomas, Shrutika719, Aklapper, jayvdb, Legoktm, Ricordisamoa, pywikibot-bugs-list, PotsdamLamb, Asartea, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Dzaky17, Viztor, DannyS712, Wenyi, Tbscho, MayS, Framawiki, Mdupont, XanonymusX, Altostratus, Avicennasis, mys_721tx, jeblad, Tacsipacsi, Masti, Alchimista, Ladsgroup, Jackmcbarn
_______________________________________________ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org