Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set/unset alarms (configurable) #29

Merged
merged 12 commits into from
Dec 23, 2022
Merged

Conversation

odin568
Copy link
Contributor

@odin568 odin568 commented Dec 22, 2022

Hi @darkphnx
I have one more feature I need.

As said I want to split with this project one calendar into multiple logical.
There I also need different alarms (as they will be imported to another tool which handles them).

As alarms are something total different than filters, I added a dedicated section.

Not sure if this feature is already going too far for an "ical-filter-proxy".

@darkphnx
Copy link
Owner

I considered this feature last year, but couldn't get it to work in Google Calendar for some reason so chucked it in the bin. I could certainly use it myself though.

Only comment I have on this PR is do you think we could find a nicer way to express the triggers? I know those are the iCal values, but something more user readable that we can compile would be great.

@odin568
Copy link
Contributor Author

odin568 commented Dec 22, 2022

Hmm... good point. I just saw in the rfc document that also absolute datetime can be defined, so quite flexible. But having a fixed date in our use case attached to all events probably won't make sense.
So in fact we could rely on ISO8601 format. Not sure how to simplify it - format is already quite readable (for techies 😺 ).

So simplest solution would be to add link to documentation about format and to check the format by parsing it into time in order to check if it is technically valid entry

@odin568
Copy link
Contributor Author

odin568 commented Dec 22, 2022

Or we just support i.e. "\d+ days" and "\d+ hours" simply....
And still a full ISO format as now

@odin568
Copy link
Contributor Author

odin568 commented Dec 22, 2022

Implemented something, please have a look @darkphnx

Copy link
Owner

@darkphnx darkphnx left a comment

Choose a reason for hiding this comment

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

I think a solid approach. A little refactoring to tidy up would be great.

lib/ical_filter_proxy/calendar_builder.rb Outdated Show resolved Hide resolved
lib/ical_filter_proxy/calendar.rb Outdated Show resolved Hide resolved
lib/ical_filter_proxy/calendar.rb Outdated Show resolved Hide resolved
lib/ical_filter_proxy/calendar_builder.rb Outdated Show resolved Hide resolved
lib/ical_filter_proxy/calendar.rb Outdated Show resolved Hide resolved
Copy link
Owner

@darkphnx darkphnx left a comment

Choose a reason for hiding this comment

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

This is looking good, just onto the nitpicks now, and then some tests.

lib/ical_filter_proxy/alarm_trigger.rb Outdated Show resolved Hide resolved
lib/ical_filter_proxy/calendar_builder.rb Outdated Show resolved Hide resolved
lib/ical_filter_proxy/calendar_builder.rb Outdated Show resolved Hide resolved
@odin568
Copy link
Contributor Author

odin568 commented Dec 22, 2022

So then only tests open so far

@odin568
Copy link
Contributor Author

odin568 commented Dec 23, 2022

Added tests, you can also have a look here @darkphnx

Copy link
Owner

@darkphnx darkphnx left a comment

Choose a reason for hiding this comment

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

Beautiful!

@darkphnx darkphnx merged commit 322df1f into darkphnx:master Dec 23, 2022
@odin568 odin568 deleted the AlarmFeature branch December 23, 2022 16:13
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