# -*- coding: utf-8 -*-

import click
from gojot import gojot


@click.command()
@click.option('--repo', '-r', default=None, help='Repo to open.')
@click.option('--doc', '-d', default=None, help='Document to open.')
@click.option('--imp', '-i', default=None, help='File to import.')
@click.option('--all', '-a', 'load_all', is_flag=True, help='Open all entries.')
@click.option('--edit', '-e', 'edit_one', is_flag=True, help='Edit an entry.')
@click.option('--export', '-x', 'export', is_flag=True, help='Export a document.')
@click.option('--stats', '-s', 'show_stats', is_flag=True, help='Show document stats.')
def main(repo, doc, imp, load_all, edit_one, export, show_stats, args=None):
    """gojot is a modern command-line journal that is distributed and encrypted by default."""
    click.echo("")
    click.echo("See gojot documentation at https://gojot.schollz.com/")
    if imp != None:
        gojot.run_import(imp)
    else:
        gojot.run(repo, doc, load_all=load_all,
                  edit_one=edit_one, export=export, show_stats=show_stats)


if __name__ == "__main__":
    main()

# -*- coding: utf-8 -*-

import click
from gojot import gojot


@click.command()
@click.option('--repo', '-r', default=None, help='Repo to open.')
@click.option('--document', '-d', default=None, help='Document to open.')
@click.option('--import', '-i', default=None, help='File to import.')
@click.option('--all', '-a', 'load_all', is_flag=True, help='Open all entries.')
@click.option('--edit', '-e', 'edit_one', is_flag=True, help='Edit an entry.')
@click.option('--export', '-x', 'export', is_flag=True, help='Export a document.')
@click.option('--stats', '-s', 'show_stats', is_flag=True, help='Show document stats.')
def main(repo, doc, imp, load_all, edit_one, export, show_stats, args=None):
    """gojot is a modern command-line journal that is distributed and encrypted by default."""
    click.echo("")
    click.echo("See gojot documentation at https://gojot.schollz.com/")
    if imp != None:
        gojot.run_import(imp)
    else:
        gojot.run(repo, doc, load_all=load_all,
                  edit_one=edit_one, export=export, show_stats=show_stats)


if __name__ == "__main__":
    main()

Change command line