Listing scheduled events
The simple program list_my_appointments.py collects information about scheduled events and puts them into a spreadsheet. You can call it without any date and get all events, with a single date and get events that start on or after than date, or a pair of dates and get events that start between these two dates.
./list_my_appointments.py ./list_my_appointments.py 2017-01-01 ./list_my_appointments.py 2016-09-01 2016-10-01
You can optionally give a "-v" option to get verbose output.
./list_my_appointments.py -v
One can use the following construct to drop unwanted columns:
columns_to_drop=['duplicates', 'html_url', 'hidden', 'reserve_url', 'url' ]
if len(columns_to_drop) > 0: ag_df.drop(columns_to_drop,inplace=True,axis=1)
The most challenging part of the code was dealing with the problem of ISO 8601 dates and datetimes in the local timezone. This part of the code could use some attention.
The earliest starting date is assumed to be: 1900-01-01T00:00:00Z
and the latest date: 3000-01-01T00:00:00Z. Hopefully, these choices this will satisfy most needs, but the solution could have been cleaner.