https://bugzilla.wikimedia.org/show_bug.cgi?id=72847
Bug ID: 72847 Summary: fileIsShared only works with Wikimedia and Wikitravel shared repository Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: network Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: jayvdb@gmail.com Web browser: --- Mobile Platform: ---
Setting up a shared_image_repository for a family requires adding logic to page.fileIsShared, which is currently:
if not self.site.has_image_repository: return False elif 'wikitravel_shared' in self.site.shared_image_repository(): return self.fileUrl().startswith( u'http://wikitravel.org/upload/shared/') else: return self.fileUrl().startswith( 'https://upload.wikimedia.org/wikipedia/commons/')
https://bugzilla.wikimedia.org/show_bug.cgi?id=72847
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugzilla.wikimedia. | |org/show_bug.cgi?id=72846
https://bugzilla.wikimedia.org/show_bug.cgi?id=72847
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugzilla.wikimedia. | |org/show_bug.cgi?id=72873
https://bugzilla.wikimedia.org/show_bug.cgi?id=72847
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |legoktm.wikipedia@gmail.com Blocks| |70936 Severity|normal |major
--- Comment #1 from John Mark Vandenberg jayvdb@gmail.com --- Site should use meta=filerepoinfo
https://www.mediawiki.org/wiki/API:Meta#filerepoinfo_.2F_fri
https://www.wikidata.org/w/api.php?action=query&meta=filerepoinfo&fr...
https://en.wikipedia.org/w/api.php?action=query&meta=filerepoinfo&fr...
The apiurl appears to no longer be in the returned data, and the rootUrl is not very helpful if we want to determine where the front end processor is for the shared repo.
But we can get the base URL of the images, which covers most of the needs of FilePage.
http://mapping.referata.com/w/api.php?action=query&meta=filerepoinfo&...
pywikipedia-bugs@lists.wikimedia.org