Last modified: 2013-10-05 11:44:24 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T57114, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55114 - Ask before creating graphs in interwiki.py
Ask before creating graphs in interwiki.py
Status: NEW
Product: Pywikibot
Classification: Unclassified
interwiki.py (Other open bugs)
unspecified
All All
: Unprioritized enhancement
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-05 04:26 UTC by Kunal Mehta (Legoktm)
Modified: 2013-10-05 11:44 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Kunal Mehta (Legoktm) 2013-10-05 04:26:24 UTC
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...

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links