Skip to content

Commit

Permalink
Merge pull request #48 from dwoiwode/handout_switch
Browse files Browse the repository at this point in the history
Add warning if handout-flag is set without any compilation
  • Loading branch information
mlindauer authored Jul 1, 2021
2 parents 7849ec9 + a44a987 commit 670a890
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion slides.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,18 @@ def main():
DST_FOLDER = Path(args.destination)
HANDOUT_MODE = args.handout

if args.handout and not (args.compile or args.compile_git or args.compile_all):
print("Warning: --handout flag set, but no compilation initiated. "
"Use --compile, --compile-all or --compile-git to compile tex to pdf")

_did_smth = False
if args.compile_all:
compile_all()
_did_smth = True
if args.compile_git and not args.compile_all:
compile_git()
_did_smth = True
if args.compile and not (args.compile_all or args.compile_git):
if args.compile and not args.compile_all:
compile_single(*args.compile)
_did_smth = True
if args.cleanup:
Expand Down

0 comments on commit 670a890

Please sign in to comment.