percent progress

git-svn-id: https://wikiteam.googlecode.com/svn/trunk@48 31edc4fc-5e31-b4c4-d58b-c8bc928bcb95
pull/117/head
emijrp 13 years ago
parent 37f87354e3
commit 2285c2e0a9

@ -297,6 +297,7 @@ def generateXMLDump(config={}, titles=[], start=''):
xmlfile = open('%s/%s' % (config['path'], xmlfilename), 'a')
c = 1
total = len(titles)
for title in titles:
if title == start: #start downloading from start, included
lock = False
@ -304,7 +305,7 @@ def generateXMLDump(config={}, titles=[], start=''):
continue
delay(config=config)
if c % 10 == 0:
print ' Downloaded %d pages' % (c)
print ' Downloaded %d pages of %d (%.1f%%)' % (c, total, c/(total/100))
xml = getXMLPage(config=config, title=title)
xml = cleanXML(xml=xml)
xmlfile.write(xml)

Loading…
Cancel
Save