diff --git a/parse b/parse index 1521769..77d89fd 100755 --- a/parse +++ b/parse @@ -33,16 +33,19 @@ def get_charset(part): parser = argparse.ArgumentParser(description='Parses emails into an SQLite database, and optionally renders static HTML files.') -parser.add_argument('-p', '--pattern', dest='pattern', action='store', default='*', +parser.add_argument('-p', dest='pattern', action='store', default='*', help='glob pattern (including path) that has to be matched for a file to be parsed') +parser.add_argument('-d', dest='database', action='store', default='emails.db', + help='path of the database that should be used to store the emails (will be created if it does not exist yet)') + parser.add_argument('-r', '--render', dest='render', action='store_true', help='render static HTML files using the template files in templates/') args = parser.parse_args() options = vars(args) -database = sqlite3.connect('emails.db') +database = sqlite3.connect(options['database']) cursor = database.cursor() try: