@@ -183,7 +183,9 @@ def find_and_replace_sections(boundaries, section_estimate, fname):
183
183
if minitocline :
184
184
lower = max ((section_estimate - 2 ), 1 ) # lower boundary not lower than 1
185
185
upper = section_estimate + 2
186
- upper = upper if upper < boundaries ["upper" ] else boundaries ["upper" ] + 1 # upper boundary not higher then upper boundary ;-)
186
+ upper = (
187
+ upper if upper < boundaries ["upper" ] else boundaries ["upper" ] + 1
188
+ ) # upper boundary not higher then upper boundary ;-)
187
189
sections = f"{ lower } -{ upper } "
188
190
lines [minitocline ] = (
189
191
" \\ tableofcontents[currentsection, sections={"
@@ -234,9 +236,15 @@ if __name__ == "__main__":
234
236
"--sample-directory" ,
235
237
help = "needed with `--handout` - should indicate directory with script files (cloze and solution)" ,
236
238
)
239
+ parser .add_argument (
240
+ "--no-packaging" ,
241
+ help = "needed for the CI, which should not attempt to package slides" ,
242
+ default = False ,
243
+ action = argparse .BooleanOptionalAction ,
244
+ )
237
245
args = parser .parse_args ()
238
246
239
- if args .handout and not args .sample_directory :
247
+ if args .handout and ( not args .sample_directory or not args . no_packaging ) :
240
248
print (
241
249
"ERROR: must indicate --sample-directory when writing handouts" ,
242
250
file = sys .stderr ,
@@ -334,6 +342,9 @@ if __name__ == "__main__":
334
342
]
335
343
opj = os .path .join
336
344
345
+ if args .no_packaging :
346
+ sys .exit (0 )
347
+
337
348
for root , dirs , files in os .walk (args .sample_directory ):
338
349
for fname in files :
339
350
# restrict to sample files, no helper files
0 commit comments