Page MenuHomePhabricator

Support for Wikimedia Toolforge
Closed, ResolvedPublic

Description

Originally from: http://sourceforge.net/p/pywikipediabot/feature-requests/335/
Reported by: cdpark
Created on: 2013-04-08 01:52:09
Subject: Support for Wikimedia Labs and Toolserver
Original description:
1\. Source directory repositiory
Split pywikipedia source and user config/script. See also https://wikitech.wikimedia.org/wiki/Nova\_Resource\_Talk:Bots\#Pywikipediabot
Currently, pywikipedia imports\(or includes\) other file from \(1\) source code directory \(2\) current working directory \(3\) pywikipedia environment, depends on code. How about to support PYWIKIPEDIA\_HOME or similar environment for source code repository.

2\. Local mysql mirror support.
In WMLabs and toolserver, access of wikipedia mirror is available. Page.get\(\) and pagegenerators can be use this information. \(BTW, Page.put\(\) should work to original site, not mirrors\). It can be also useful for other mediawiki installs if admin runs some pywikipedia-based script \(e.g. replace.py\) for his own database.


Version: unspecified
Severity: enhancement
See Also:
https://sourceforge.net/p/pywikipediabot/feature-requests/335

Details

Reference
bz55011

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:14 AM
bzimport set Reference to bz55011.
bzimport added a subscriber: Unknown Object (????).

\#1: This is implemented in the rewrite branch, you just set the PYWIKIBOT2\_DIR variable to where your user-config is.

\#2: I think this would be an interesting layer to add onto pywikipedia. Probably can be done with a "MysqlSite" or something, since all queries should get routed through that. DB access doesn't mean you have page text access, so it isn't \*that\* useful.

I think the latter is possible and we can do something about it

The Toolserver is closed as of July 1st 2014.

The 'quickest' way to get mysql data access integrate is to write a generator which takes a generator, iterates over each title and yields a preloaded Page using Mysql data.

There are a few more 'fun' ways to do a better job, and would be suitable for a GSOC project, such as subclassing APISite/Request and overriding only the methods which are useful to serve from MySQL

Dvorapa renamed this task from Support for Wikimedia Labs to Support for Wikimedia Toolforge.Apr 8 2020, 12:11 PM
Dvorapa moved this task from Backlog to Wikimedia prod/Cloud Services issues on the Pywikibot board.
Dvorapa updated the task description. (Show Details)
Dvorapa subscribed.

Both suggestions work now, any specific issues can be discussed in new specific tasks