logseq_doctor.cli¶
cli
¶
Module that contains the command line app.
Why does this file exist, and why not put this in main?
You might be tempted to import things from main later, but that will cause problems: the code will get executed twice:
- When you run
python -m logseq_doctorpython will execute__main__.pyas a script. That means there won't be anylogseq_doctor.__main__insys.modules. - When you import main it will get executed again (as a module) because
there's no
logseq_doctor.__main__insys.modules.
Also see (1) from https://click.pocoo.org/5/setuptools/#setuptools-integration
GlobalOptions
dataclass
¶
TaskFormat
¶
lqdpy(ctx, logseq_graph_path=typer.Option(..., '--graph', '-g', help='Logseq graph', envvar='LOGSEQ_GRAPH_PATH', dir_okay=True, file_okay=False))
¶
Logseq Doctor: heal your flat old Markdown files before importing them.
Source code in src/logseq_doctor/cli.py
outline(text_file)
¶
tasks(ctx, tag_or_page=typer.Argument(None, metavar='TAG', help='Tags or pages to query'), logseq_host_url=typer.Option(..., '--host', '-h', help='Logseq host', envvar='LOGSEQ_HOST_URL'), logseq_api_token=typer.Option(..., '--token', '-t', help='Logseq API token', envvar='LOGSEQ_API_TOKEN'), json_=typer.Option(False, '--json', help='Output in JSON format'), verbose=typer.Option(False, '--verbose', '-v', help='Verbose output'), completed=typer.Option(False, '--completed', '-c', help='Include canceled and done tasks'))
¶
List tasks in Logseq.