launcher.py

git-svn-id: https://wikiteam.googlecode.com/svn/trunk@501 31edc4fc-5e31-b4c4-d58b-c8bc928bcb95
pull/117/head
emijrp 12 years ago
parent 2e8755d4c9
commit bc86e0a900

@ -25,8 +25,7 @@ wikis = f.read().splitlines()
f.close()
for wiki in wikis:
os.system('python dumpgenerator.py --api=%s --xml --images' % wiki)
wikiname = re.sub(r'(\.|^www\.|\/api\.php)', '', wiki.split('://')[1])
wikiname = re.sub(r'(\.|^www\.|\/api\.php)', '', wiki.lower().split('://')[1])
wikiname = re.sub('[-/]', '_', wikiname)
wikidir = ''
for dirname, dirnames, filenames in os.walk('.'):
@ -36,7 +35,12 @@ for wiki in wikis:
wikidir = d
prefix = wikidir.split('-wikidump')[0]
print "---->", wikidir, prefix
if wikidir: #resume
print 'Resuming download, using directory', wikidir
os.system('python dumpgenerator.py --api=%s --xml --images --resume --path=%s' % (wiki, wikidir))
else:
os.system('python dumpgenerator.py --api=%s --xml --images' % wiki)
if wikidir and prefix:
os.chdir(wikidir)
print 'Changed directory to', os.getcwd()

Loading…
Cancel
Save