Skip to content

Commit

Permalink
Added a bit of verbosity
Browse files Browse the repository at this point in the history
  • Loading branch information
keul committed Jun 24, 2024
1 parent 8072568 commit 7bfee66
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ History
0.7.4 (unreleased)
------------------

- Nothing changed yet.
- Read events: added a bit of verbosity during operations


0.7.3 (2024-06-13)
Expand Down
9 changes: 9 additions & 0 deletions haunts/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ def extract_events(config_dir, sheet, day):
events_service = calendar_service.events()
sheet_service = spreadsheet_service.spreadsheets()

click.echo("Checking your calendars…")

configured_calendars = get_calendars(
sheet_service, ignore_alias=True, use_read_col=True
)
Expand Down Expand Up @@ -107,6 +109,8 @@ def extract_events(config_dir, sheet, day):
all_sheet_events = get_calendar_col_values(sheet_service, sheet, "Event id")
all_sheet_event_urls = get_calendar_col_values(sheet_service, sheet, "Link")

click.echo(f"Start downloading events for day {day}")

# Main operation loop
for event in all_events:
event_summary = event.get("summary", "No summary")
Expand Down Expand Up @@ -153,3 +157,8 @@ def extract_events(config_dir, sheet, day):
link_col=event_link,
action_col="I" if not is_linked and project != "???" else "",
)

if not all_events:
click.echo("No events found.")
else:
click.echo("Done!")

0 comments on commit 7bfee66

Please sign in to comment.