From dd8885e755d5b87036101090e75bda6ec060cd2f Mon Sep 17 00:00:00 2001 From: J-Donald Tournier Date: Mon, 16 Dec 2024 14:07:45 +0000 Subject: [PATCH] view_local: add -no-incremental option to skip incremental slides --- view_local | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/view_local b/view_local index 70d67f5..7c4a439 100755 --- a/view_local +++ b/view_local @@ -3,6 +3,12 @@ from sys import argv from os import path +if '-no-incremental' in argv: + remove_incremental = True + argv.remove ('-no-incremental') +else: + remove_incremental = False + if len(argv) < 2 or not argv[1].endswith ('.md'): raise ValueError ('expected markdown file with .md suffix') @@ -15,6 +21,8 @@ with open ('_layouts/presentation.html') as fd: with open(argv[1]) as fd: npagebreak = 0 for line in fd.readlines(): + if remove_incremental and line.strip() == '--': + continue if npagebreak >= 2: markdown += line elif line.startswith ('title:'):