Skip to content

Commit

Permalink
Add commandline option for publish to exclude the TOC
Browse files Browse the repository at this point in the history
  • Loading branch information
robtaylor committed Oct 16, 2024
1 parent 73032f7 commit 75d4a72
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions doorstop/cli/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,8 @@ def run_publish(args, cwd, error, catch=True):
kwargs = {}
if args.width:
kwargs["width"] = args.width
if args.no_toc:
kwargs["toc"] = False

# Write to output file(s)
if args.path:
Expand Down
7 changes: 6 additions & 1 deletion doorstop/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,12 @@ def _publish(subs, shared):
help="do not include levels on heading and non-heading or non-heading items",
)
sub.add_argument("--template", help="template file", default=None)

sub.add_argument(
"--no-toc",
action="store_true",
help="do not include a table-of-contents in the output",
)


if __name__ == "__main__":
main()

0 comments on commit 75d4a72

Please sign in to comment.