|
@@ -194,20 +194,7 @@ def make_parser():
|
|
'and/or comma seperated list of names to schedule in ' +\
|
|
'and/or comma seperated list of names to schedule in ' +\
|
|
'their speaking order')
|
|
'their speaking order')
|
|
|
|
|
|
- parser.add_argument('-c', '--constraints',
|
|
|
|
- metavar = ('NAME', 'DATES'),
|
|
|
|
- nargs = '+', action = 'append', default = [],
|
|
|
|
- help = "specify someone *can't* speak on certain " +\
|
|
|
|
- 'dates (e.g., "-c Justin 2018-01-01 2018-01-08 -c ' +\
|
|
|
|
- 'Ian 2018-01-01")')
|
|
|
|
- parser.add_argument('-p', '--practice',
|
|
|
|
- metavar = ('NAME', 'DATE', 'NOTE'),
|
|
|
|
- nargs = 3, action = 'append', default = [],
|
|
|
|
- help = 'designate given DATE as a talk given by NAME, '+\
|
|
|
|
- 'and remove the next instance of NAME in the list of '+\
|
|
|
|
- 'names, if present (NOTE should usually be "practice '+\
|
|
|
|
- 'talk")')
|
|
|
|
- parser.add_argument('-C', '--constraintsfile',
|
|
|
|
|
|
+ parser.add_argument('-c', '--constraintsfile',
|
|
metavar = 'FILE',
|
|
metavar = 'FILE',
|
|
help = 'provide constraints, practice talks, and '+\
|
|
help = 'provide constraints, practice talks, and '+\
|
|
'notes via supplied csv file')
|
|
'notes via supplied csv file')
|
|
@@ -240,12 +227,12 @@ def main(argv=None):
|
|
if args.constraintsfile:
|
|
if args.constraintsfile:
|
|
constraints, practice, halves, notes = \
|
|
constraints, practice, halves, notes = \
|
|
parse_constraintsfile(args.constraintsfile)
|
|
parse_constraintsfile(args.constraintsfile)
|
|
|
|
+ cal = CryspCalendar(args.start, args.end, args.weeks, names,
|
|
|
|
+ constraints, practice, halves, notes,
|
|
|
|
+ args.no_repeat)
|
|
else:
|
|
else:
|
|
- constraints = args.constraints
|
|
|
|
- practice = args.practice
|
|
|
|
-
|
|
|
|
- cal = CryspCalendar(args.start, args.end, args.weeks, names,\
|
|
|
|
- constraints, practice, halves, notes, args.no_repeat)
|
|
|
|
|
|
+ cal = CryspCalendar(args.start, args.end, args.weeks, names,
|
|
|
|
+ no_repeat=args.no_repeat)
|
|
|
|
|
|
print(cal.table() if not args.email else cal.email(int(args.email)))
|
|
print(cal.table() if not args.email else cal.email(int(args.email)))
|
|
return 0;
|
|
return 0;
|