File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ Description of your event.
4242Add the event using:
4343
4444``` bash
45- python -m git_calendar --add [event .md]
45+ python -m git_calendar --add event1.md [event2 .md ... ]
4646```
4747
4848See help menu for more options:
Original file line number Diff line number Diff line change @@ -6,9 +6,10 @@ def main():
66 parser = argparse .ArgumentParser (description = "Manage your git-based calendar." )
77 parser .add_argument (
88 "-a" , "--add" ,
9+ nargs = "+" ,
910 metavar = "FILENAME" ,
1011 type = str ,
11- help = "Add an event from the specified markdown file ."
12+ help = "Add events from the specified list of markdown files ."
1213 )
1314 parser .add_argument (
1415 "--regenerate" ,
@@ -29,8 +30,9 @@ def main():
2930 calendar = GitCalendar (args .ics_file )
3031
3132 if args .add :
32- print (f"Adding event from file: { args .add } " )
33- calendar .add_event (args .add )
33+ for event_mdfile in args .add :
34+ print (f"Adding event from file: { event_mdfile } " )
35+ calendar .add_event (event_mdfile )
3436
3537 if args .regenerate :
3638 print ("Regenerating calendar file." )
You can’t perform that action at this time.
0 commit comments