jayvdb created this task. jayvdb claimed this task. jayvdb added projects: Pywikibot-interwiki.py, pywikibot-compat.
TASK DESCRIPTION interwiki.py (core and compat) has help saying -namespace:all works. It doesnt, except for in compat using special pages (not using API). Special pages such as NewPages and RecentChanges have a dedicated option for 'all' namespaces. The API doesnt have an 'all' option for namespaces; instead the default is all namespaces.
https://en.wikipedia.org/w/api.php?action=query&generator=recentchanges&...
``` { "query-continue": { "recentchanges": { "grccontinue": "20141224132023|701539549" } }, "warnings": { "recentchanges": { "*": "Unrecognized value for parameter 'grcnamespace': all" }, "query": { "*": "Formatting of continuation data will be changing soon. To continue using the current formatting, use the 'rawcontinue' parameter. To begin using the new format, pass an empty string for 'continue' in the initial query." } }, ... } ```
TASK DETAIL https://phabricator.wikimedia.org/T85272
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb Cc: Aklapper, pywikipedia-bugs
jayvdb added a project: pywikibot-redirect.py. jayvdb added a comment.
redirect.py also claims to support -namespace:all , and has a code comment "Only works with the API read interface."
I believe these scripts have -namespace:all because they default to using namespace 0 , so the user needs a way to override that behaviour.
TASK DETAIL https://phabricator.wikimedia.org/T85272
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb Cc: Aklapper, pywikipedia-bugs
jayvdb added a comment.
This problem isnt just a command line problem; interwiki.py says it can handle multiple -namespace with -new, but in fact it only handles one normally. If two or more -namespace are used, the script fails because it uses NewpagesPageGenerator(.., namespaces='all' ) which doesnt work. It then has a NamespaceFilterPageGenerator to filter the output of NewpagesPageGenerator to the namespaces selected on the command line, which would be inefficient, but of course the code fails before it gets to do this filtering.
TASK DETAIL https://phabricator.wikimedia.org/T85272
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb Cc: Aklapper, pywikipedia-bugs
pywikipedia-bugs@lists.wikimedia.org