Running bot via reading dumps is implemented with xmlreader.py no need to do that, I have tons of code which used xmlreader. I can send it to you (to see how we can use xmlreader) or write a manual for it
Best On Sat, Mar 8, 2014 at 9:16 PM, Strainu <[email protected]> wrote: > Hi Maarten, > > Do note that a valid use case is to run pywikibot with a local > database dump (I haven't done this myself, but I know at least 1 > person who does that), so the user needs to be able to configure this > field. The user variable seems like the way to go for me. > > As to the default value, I suggest using the values from toollabs (you > know, with it being the future & all). > > Strainu > > 2014-03-08 17:54 GMT+02:00 Maarten Dammers <[email protected]>: > > Hi, > > > > We currently have the "MySQLPageGenerator" to do database queries. It > uses > > site.dbName() to figure out the name of the site, but we don't seem to > have > > any system to figure out what database server to connect to. For example: > > * Dutch Wikipedia on Toolserver: connect nlwiki_p nlwiki-p.db > > * English Wikipedia on Toolserver: connect enwiki_p enwiki-p.db > > * Dutch Wikipedia on Toollabs: connect nlwiki_p nlwiki.labsdb > > * English Wikipedia on Toollabs: connect nlwiki_p nlwiki.labsdb > > > > How to solve this? Possible solution is to make a function to detect what > > cluster we're on or a user variable to set it (config.cluster?) and than > add > > a function site.dbServer() to return the right server? > > > > Maarten > > > > [1] > > > https://git.wikimedia.org/blob/pywikibot%2Fcore.git/d2ea22661b967774048bc7c6cc9360986ce5ffb7/pywikibot%2Fpagegenerators.py#L1220 > > > > > > _______________________________________________ > > Pywikipedia-l mailing list > > [email protected] > > https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l > > _______________________________________________ > Pywikipedia-l mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l > -- Amir
_______________________________________________ Pywikipedia-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
