https://bugzilla.wikimedia.org/show_bug.cgi?id=55114
Web browser: --- Bug ID: 55114 Summary: Ask before creating graphs in interwiki.py Product: Pywikibot Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: legoktm.wikipedia@gmail.com Classification: Unclassified Mobile Platform: ---
Originally from: http://sourceforge.net/p/pywikipediabot/feature-requests/65/ Reported by: tuvic Created on: 2006-07-19 13:01:54 Subject: Ask before creating graphs in interwiki.py Original description: In the interwiki.py, there's a very handy feature to create graphs of ambigious interwikis. The only annoyance, is that it takes ages if the amount of pages is big. Also, it doesn't look to be able to create correct png's of those huge interwiki-layouts. (but that might be an error in pydot maybe)
To get rid of this annoyance, I'd like the interwiki-bot to ask wether of not to create a graph. I experimented already a little, and came up with this rudimentary code:
In stead of
if config.interwiki_graph: self.createGraph()
I'dd add something like this:
if config.interwiki_graph: print "Found %s error(s) in %s wiki(s) (total: %s pages)"% (nerr,len(new.items()), len(self.foundin.iterkeys())) while 1: dodraw = wikipedia.input(u"Do you want to draw a graph? [(y)es, (n)o] : ") if dodraw: if dodraw in 'nN': # Don't draw a graph break elif dodraw in 'yY': self.createGraph() break
Maybe there could be some command-line option that can be set to always draw a graph if the number of pages is below a certain amount, or something like that.
Thanks, Tuvic
P.S. While I came up with this idea, created code, and tested it a bit, the interwikibot is now already 2 hours trying to make a graph of the interwikis of Albania...