🎨 make output directories a config option
This commit is contained in:
parent
955790b788
commit
55483e4897
27 changed files with 8 additions and 6 deletions
|
@ -14,9 +14,9 @@ site = mwclient.Site(WIKI_HOST, path=WIKI_PATH)
|
|||
site.login(WIKI_USERNAME, WIKI_PASSWORD)
|
||||
|
||||
# Process and upload each .mediawiki file
|
||||
for filename in tqdm(os.listdir(DIRECTORY)):
|
||||
for filename in tqdm(os.listdir(OUTDIR_MEDIAWIKI)):
|
||||
if filename.endswith('.mediawiki'):
|
||||
filepath = os.path.join(DIRECTORY, filename)
|
||||
filepath = os.path.join(OUTDIR_MEDIAWIKI, filename)
|
||||
article_name = WIKI_ARTICLE_PREFIX + filename.replace('.mediawiki', '')
|
||||
|
||||
with open(filepath, 'r', encoding='utf-8') as f:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue