Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
descentis committed Oct 5, 2022
1 parent 79a1b56 commit 1260cb3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions kdap/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,19 +711,23 @@ def get_wiki_article(self, article_name, **kwargs):
output_dir = 'output'
if kwargs.get('output_dir') is not None:
output_dir = kwargs['output_dir']
if kwargs.get('history') is not None:
history = kwargs['history']
else:
history = True

if article_name in wiki_names:
if compress:
wikiConverter.getArticle(file_name=article_name, output_dir='outputD')
wikiConverter.getArticle(file_name=article_name, output_dir='outputD', history=history)
article_name = article_name.replace(' ', '_')
article_name = article_name.replace('/', '__')
wikiConverter.compress('outputD/' + article_name + '.knolml', output_dir)
else:
wikiConverter.getArticle(file_name=article_name, output_dir=output_dir)
wikiConverter.getArticle(file_name=article_name, output_dir=output_dir, history=history)
else:
print("Article name is not found. Taking '" + wiki_names[0] + "' as the article name")
article_name = wiki_names[0]
wikiConverter.getArticle(file_name=article_name, output_dir='outputD')
wikiConverter.getArticle(file_name=article_name, output_dir='outputD', history=history)
article_name = article_name.replace(' ', '_')
article_name = article_name.replace('/', '__')
wikiConverter.compress('outputD/' + article_name + '.knolml', output_dir)
Expand Down

0 comments on commit 1260cb3

Please sign in to comment.