Skip to content

Commit

Permalink
updating dateparser-download
Browse files Browse the repository at this point in the history
  • Loading branch information
gavishpoddar authored Sep 1, 2021
1 parent e68260a commit 001a9d7
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions dateparser_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

def entrance():
dateparser_argparse = argparse.ArgumentParser(
description='dateparser download manager.'"
description='dateparser download manager.'
)
dateparser_argparse.add_argument(
'--fasttext',
Expand All @@ -23,8 +23,12 @@ def entrance():

args = dateparser_argparse.parse_args()

if args.fasttext:
fasttext_downloader(args.fasttext)
if args.clear:
clear_cache()
dateparser_argparse.error("dateparser-download: All cache deleted")
logging.info("dateparser-download: All cache deleted")

if args.fasttext:
fasttext_downloader(args.fasttext)

if not (args.clear or args.fasttext):
dateparser_argparse.error("dateparser-download: You need to specify the command (i.e.: --fasttext or --clear)")

0 comments on commit 001a9d7

Please sign in to comment.