Переглянути джерело

remove CLI options for constraints/practice talks
There was a bug in them, but these days, constraints are way too numerous to
use these anyway, so I just removed them instead of fixing it.

Justin Tracey 5 роки тому
батько
коміт
fa458997b9
1 змінених файлів з 6 додано та 19 видалено
  1. 6 19
      vice-speaker-rotator.py

+ 6 - 19
vice-speaker-rotator.py

@@ -194,20 +194,7 @@ def make_parser():
                        'and/or comma seperated list of names to schedule in ' +\
                        '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',
                         help = 'provide constraints, practice talks, and '+\
                         'notes via supplied csv file')
@@ -240,12 +227,12 @@ def main(argv=None):
     if args.constraintsfile:
         constraints, practice, halves, notes = \
             parse_constraintsfile(args.constraintsfile)
+        cal = CryspCalendar(args.start, args.end, args.weeks, names,
+                            constraints, practice, halves, notes,
+                            args.no_repeat)
     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)))
     return 0;