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

Add support for processing and importing ics without UID #1082

Merged
merged 1 commit into from
Feb 3, 2022

Conversation

viiru-
Copy link
Contributor

@viiru- viiru- commented Aug 20, 2021

Files like this seem to be produced by all kinds of proprietary reservation
systems and such. They are clearly out of spec, but since they exist I'd
prefer to be able to import them without needing to manually add an UID
every time.

Another alternative would be to report an error if there is no UID and
random_uid=False, and then doing this only when random_uid=True. I'm not
sure it would be an improvement over this simpler solution, so I'll offer
this first.

@WhyNotHugo
Copy link
Member

WhyNotHugo commented Aug 20, 2021 via email

@d7415
Copy link
Collaborator

d7415 commented Aug 20, 2021

I'd also suggest adding a warning, so that a user importing it knows it's a bad file.

@viiru-
Copy link
Contributor Author

viiru- commented Aug 20, 2021

Both suggestions sound good to me. I'll rework and get back to you (sadly not today, I'm out of time for the moment). Thanks for the review @WhyNotHugo and @d7415.

@viiru-
Copy link
Contributor Author

viiru- commented Aug 22, 2021

I have pushed a new version that implements the suggested improvements, can you review again?

khal/icalendar.py Outdated Show resolved Hide resolved
Files like this seem to be produced by all kinds of proprietary reservation
systems and such. They are clearly out of spec, but since they exist I'd
prefer to be able to import them without needing to manually add an UID
every time.

A sha256 checksum of the event is used as the UID to make it stable.
Copy link
Member

@WhyNotHugo WhyNotHugo left a comment

Choose a reason for hiding this comment

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

LGTM

@WhyNotHugo WhyNotHugo closed this in 2a23a7b Feb 3, 2022
@WhyNotHugo WhyNotHugo merged commit 2a23a7b into pimutils:master Feb 3, 2022
@WhyNotHugo
Copy link
Member

Merged, thanks!

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.

3 participants