[Pywikipedia-bugs] [Maniphest] [Commented On] T221556: pywikibot's interwikidata.py won't handle projects where one externally-hosted language doesn't have access to the wikibase repo

2019-04-27 Thread Carlb
Carlb added a comment. (...and, as the added "print" statements are for debug only, they may be omitted.) TASK DETAIL https://phabricator.wikimedia.org/T221556 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Carlb Cc: Dvorapa, Ladsgroup, Xqt, Akl

[Pywikipedia-bugs] [Maniphest] [Commented On] T221556: pywikibot's interwikidata.py won't handle projects where one externally-hosted language doesn't have access to the wikibase repo

2019-04-27 Thread Carlb
Carlb added a comment. OK, so what happened? - The script retrieved [[pt:*]] and found a bunch of interwikis on that page: [[en:*]] [[`~:*]] [[de:Asterix]] [[fr:Astérix]] [[it:Asterix (fumetto)]] [[ja:*]] [[nl:Asterix]] [[pl:Asterix]] - As [[pt:*]] already has a Wikibase item, it tried

[Pywikipedia-bugs] [Maniphest] [Commented On] T221556: pywikibot's interwikidata.py won't handle projects where one externally-hosted language doesn't have access to the wikibase repo

2019-04-27 Thread Carlb
Carlb added a comment. This is specific to Pywikibot-interwikidata.py, which requires your 'bot run on a "home" wiki with access to a Wikidata-style (Wikibase) repository. You can't do this on cs:uncyc but it should be possible on pt:uncyc (as one example). OK, here goes: $ wget https

[Pywikipedia-bugs] [Maniphest] [Updated] T188157: Mediawiki.org interwiki is mw or mediawikiwiki, not mediawiki

2019-04-27 Thread Dvorapa
Dvorapa added a comment. name=Page.title() if insite: target_code = insite.code target_family = insite.family.name else: target_code = config.mylang target_family = config.family if force_interwiki or \ (allow_interwiki and (self.site.f

[Pywikipedia-bugs] [Maniphest] [Created] T222026: Site.interwiki_prefix() should not fail if the interwiki is indirect

2019-04-27 Thread Dvorapa
Dvorapa created this task. Dvorapa added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION **Steps to reproduce** After aplying patch for T188179 the methd fails in some cases, where n

[Pywikipedia-bugs] [Maniphest] [Merged] T188179: site.interwiki_prefix() method always fails

2019-04-27 Thread Dvorapa
Dvorapa merged a task: T222025: interwiki_prefix() does not seem to work. TASK DETAIL https://phabricator.wikimedia.org/T188179 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt, Dvorapa Cc: Dvorapa, gerritbot, Aklapper, XZise, Xqt, pywikibot-bugs-l

[Pywikipedia-bugs] [Maniphest] [Updated] T222025: interwiki_prefix() does not seem to work

2019-04-27 Thread Dvorapa
Dvorapa closed this task as a duplicate of T188179: site.interwiki_prefix() method always fails. TASK DETAIL https://phabricator.wikimedia.org/T222025 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Dvorapa Cc: Aklapper, pywikibot-bugs-list, Dvorapa,

[Pywikipedia-bugs] [Maniphest] [Merged] T57235: Treat code-only interwikis as valid for main page

2019-04-27 Thread Dvorapa
Dvorapa merged a task: T222022: Pywikibot should continue or skip if page has blank-title link. Dvorapa added subscribers: Carlb, Aklapper. TASK DETAIL https://phabricator.wikimedia.org/T57235 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Dvorapa C

[Pywikipedia-bugs] [Maniphest] [Updated] T222022: Pywikibot should continue or skip if page has blank-title link

2019-04-27 Thread Dvorapa
Dvorapa closed this task as a duplicate of T57235: Treat code-only interwikis as valid for main page. TASK DETAIL https://phabricator.wikimedia.org/T222022 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Dvorapa Cc: Aklapper, pywikibot-bugs-list, Car

[Pywikipedia-bugs] [Maniphest] [Commented On] T221556: pywikibot's interwikidata.py won't handle projects where one externally-hosted language doesn't have access to the wikibase repo

2019-04-27 Thread Dvorapa
Dvorapa added a comment. Yeah, steps to reproduce would be handy as generate_family_file works well and the generated family file as well (tested on cs:uncy) TASK DETAIL https://phabricator.wikimedia.org/T221556 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpref

[Pywikipedia-bugs] [Maniphest] [Retitled] T222025: interwiki_prefix() does not seem to work

2019-04-27 Thread Dvorapa
Dvorapa renamed this task from "interwiki_prefix() does no seem to work" to "interwiki_prefix() does not seem to work". TASK DETAIL https://phabricator.wikimedia.org/T222025 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Dvorapa Cc: Aklapper, pywiki

[Pywikipedia-bugs] [Maniphest] [Edited] T222025: interwiki_prefix() does no seem to work

2019-04-27 Thread Dvorapa
Dvorapa updated the task description. TASK DETAIL https://phabricator.wikimedia.org/T222025 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Dvorapa Cc: Aklapper, pywikibot-bugs-list, Dvorapa, DannyS712, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Avicennas

[Pywikipedia-bugs] [Maniphest] [Created] T222025: interwiki_prefix() does no seem to work

2019-04-27 Thread Dvorapa
Dvorapa created this task. Dvorapa added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION **Steps to reproduce** $ python3 pwb.py shell >>> s=pywikibot.Site('cs', 'wikipedia') >>> s.interwiki_prefix(s) Traceback (m

[Pywikipedia-bugs] [Maniphest] [Commented On] T222021: pywikibot's interwikidata.py can't handle projects where the API-reported wikiID differs from the project's globalID

2019-04-27 Thread Dvorapa
Dvorapa added a comment. And I also recommend to link dbName docstring to MediaWiki GlobalID too. TASK DETAIL https://phabricator.wikimedia.org/T222021 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Dvorapa Cc: Dvorapa, Aklapper, revi, pywikibot-

[Pywikipedia-bugs] [Maniphest] [Commented On] T222021: pywikibot's interwikidata.py can't handle projects where the API-reported wikiID differs from the project's globalID

2019-04-27 Thread Dvorapa
Dvorapa added a comment. Okay, now I see it more clearly and I'm more confident in recommending what I said above: In T222021#5142109 , @Dvorapa wrote: > a) add a Uncy family file into the Pywikibot library, where you can rewrite t

[Pywikipedia-bugs] [Maniphest] [Commented On] T222021: pywikibot's interwikidata.py can't handle projects where the API-reported wikiID differs from the project's globalID

2019-04-27 Thread Carlb
Carlb added a comment. WikiID is useful internally, within that one MediaWiki instance, as it's unique within one database server. It's not useful to an external process (such as interwikidata.py) which has no direct connection to the SQL database. It looks best, for this application, to

[Pywikipedia-bugs] [Maniphest] [Commented On] T222021: pywikibot's interwikidata.py can't handle projects where the API-reported wikiID differs from the project's globalID

2019-04-27 Thread Dvorapa
Dvorapa added a comment. So it seems Pywikibot has no option to get GlobalID? Then the only option is to presume it is same as wikiID and allow users to specify it (rewrite it) in the family file. What's wikiID good for anyway? TASK DETAIL https://phabricator.wikimedia.org/T222021 EMAIL P

[Pywikipedia-bugs] [Maniphest] [Commented On] T222021: pywikibot's interwikidata.py can't handle projects where the API-reported wikiID differs from the project's globalID

2019-04-27 Thread Carlb
Carlb added a comment. T221550 says that there is no GlobalID available from API because there is no support for GlobalID in the core code. According to that task, "Anomie: As far as MediaWiki-API is concerned, this is blocked on someone movin

[Pywikipedia-bugs] [Maniphest] [Commented On] T222021: pywikibot's interwikidata.py can't handle projects where the API-reported wikiID differs from the project's globalID

2019-04-27 Thread Dvorapa
Dvorapa added a comment. Okay, what is the way to get GlobalID from API? TASK DETAIL https://phabricator.wikimedia.org/T222021 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Dvorapa Cc: Dvorapa, Aklapper, revi, pywikibot-bugs-list, Carlb, alaa_wm

[Pywikipedia-bugs] [Maniphest] [Commented On] T222021: pywikibot's interwikidata.py can't handle projects where the API-reported wikiID differs from the project's globalID

2019-04-27 Thread Carlb
Carlb added a comment. Yes. Pywikibot blindly trusts that whatever wikiID is supplied by the remote wiki's API is indeed going to exactly match the GlobalID. That may well be true at WMF, but a third-party wiki could be naming their local server's databases just about anything. TASK DET

[Pywikipedia-bugs] [Maniphest] [Updated] T222021: pywikibot's interwikidata.py can't handle projects where the API-reported wikiID differs from the project's globalID

2019-04-27 Thread Dvorapa
Dvorapa added a project: Pywikibot-Wikidata. Dvorapa added a comment. Thank you for your explanation. You want to say that Pywikibot does not distinguish between wikiID and GlobalID? TASK DETAIL https://phabricator.wikimedia.org/T222021 EMAIL PREFERENCES https://phabricator.wikimedia.org

[Pywikipedia-bugs] [Maniphest] [Commented On] T222021: pywikibot's interwikidata.py can't handle projects where the API-reported wikiID differs from the project's globalID

2019-04-27 Thread Carlb
Carlb added a comment. The GlobalID is the name of the wiki, as it appears in Wikidata. For instance, "enwiki" is the English-language Wikipedia. A Wikidata entry with the individual GlobalID for each wiki looks like https://www.wikidata.org/wiki/Q2736 Wikipedia (204 entries):

[Pywikipedia-bugs] [Maniphest] [Commented On] T222021: pywikibot's interwikidata.py can't handle projects where the API-reported wikiID differs from the project's globalID

2019-04-27 Thread Dvorapa
Dvorapa added a comment. Okay, I'm not sure if I understand it correctly, I also don't really know, what GlobalID and wikiID is and what's the difference between them (could you please explain briefly?). From Pywikibot side, we can do two things I think: a) add a Uncy family file into the Py

[Pywikipedia-bugs] [Maniphest] [Created] T222022: Pywikibot should continue or skip if page has blank-title link

2019-04-27 Thread Carlb
Carlb created this task. Carlb added projects: Pywikibot, Pywikibot-interwiki.py. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION The Pywikibot-interwikidata.py will stop if it encounters a link like [[en:]] on a page. Conversely, a link with a bl

[Pywikipedia-bugs] [Maniphest] [Edited] T222021: pywikibot's interwikidata.py can't handle projects where the API-reported wikiID differs from the project's globalID

2019-04-27 Thread Carlb
Carlb updated the task description. TASK DETAIL https://phabricator.wikimedia.org/T222021 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Carlb Cc: Aklapper, revi, pywikibot-bugs-list, Carlb, DannyS712, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Avicennas

[Pywikipedia-bugs] [Maniphest] [Created] T222021: pywikibot's interwikidata.py can't handle projects where the API-reported wikiID differs from the project's globalID

2019-04-27 Thread Carlb
Carlb created this task. Carlb added projects: Pywikibot, Pywikibot-interwiki.py. Restricted Application added subscribers: pywikibot-bugs-list, revi, Aklapper. TASK DESCRIPTION This should probably be tagged as "Pywikibot-interwikidata.py" but there doesn't seem to be an available tag for that

[Pywikipedia-bugs] [Maniphest] [Edited] T222021: pywikibot's interwikidata.py can't handle projects where the API-reported wikiID differs from the project's globalID

2019-04-27 Thread Carlb
Carlb updated the task description. Carlb added a project: Wikidata. TASK DETAIL https://phabricator.wikimedia.org/T222021 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Carlb Cc: Aklapper, revi, pywikibot-bugs-list, Carlb, alaa_wmde, DannyS712, Nand