diff --git a/calendar/teachingdates/app.py b/calendar/teachingdates/app.py index 45f8565..1b2bb7b 100644 --- a/calendar/teachingdates/app.py +++ b/calendar/teachingdates/app.py @@ -21,9 +21,11 @@ print("{prog}: debug: paper config: {c}".format( prog=PROG, c=dates_config.get_paper_config())) cal = calendars.TeachingCalendar.from_configuration(dates_config) - print("Period = {p}".format(p=args.period)) - print(cal.calendar()) - print(cal.lecture_dates()) + if args.debug: + print("Calendar: {cal}".format(cal=cal.calendar())) + print("Lectures: {lec}".format(lec=cal.lecture_dates())) + for c in cal.render(args.style, args.format): + print(c) except configuration.ConfigurationError as e: print("{prog}: error: failed to load configuration from "