Skip to content

Add optional --calendar-name filter to calendar-events command - #27

Open
gklei wants to merge 3 commits into
mainfrom
cli-calendar-filter
Open

Add optional --calendar-name filter to calendar-events command#27
gklei wants to merge 3 commits into
mainfrom
cli-calendar-filter

Conversation

@gklei

@gklei gklei commented May 12, 2026

Copy link
Copy Markdown
Contributor

Add optional --calendar-name click option to calendar-events command.

If it's present:

  • the user's calendars will be retrieved and filtered by lowercased calendar_name to match the value from the command line option
  • the calendar_ids from the filtered set of calendars will be passed through to the FulcraAPI.calendar_events() call

@gklei
gklei marked this pull request as ready for review May 12, 2026 17:33
@gklei
gklei requested review from kaiju and unsynchronized May 12, 2026 17:33
Comment thread fulcra_api/cli.py Outdated
@cli.command("calendar-events", short_help="Return Apple calendar events")
@time_range
@click.option(
"--calendar-name", type=str, default=None, help="Which calendar to retrieve events for by calendar name"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "Return events matching calendar name."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's much better! Updated.

@gklei
gklei requested a review from kaiju May 21, 2026 20:57
@gklei
gklei changed the base branch from add-cli to main May 21, 2026 20:57
@kaiju

kaiju commented May 27, 2026

Copy link
Copy Markdown
Contributor

Do we want to return nothing if no calendars match?

@gklei

gklei commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

Do we want to return nothing if no calendars match?

That's a good question, probably not. Should we return some type of output like "No calendars found with name: X"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants