We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
You can continue the conversation there. Go to discussion →
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
How to add Yes No May be options in ICS file using Python? please let me know if anyone implemented it.
The text was updated successfully, but these errors were encountered:
Hi shohagcsediu, will this snippet do?
import datetime from datetime import datetime from icalendar import Calendar, Event, vText, vCalAddress calendar = Calendar() calendar.add('prodid', 'icalendar') calendar.add('version', '2.0') attende_that_accepted = vCalAddress(f'mailto:someone@example.com') attende_that_accepted.params['PARSTAT'] = vText('ACCEPTED') attende_that_declined = vCalAddress(f'mailto:someone1@example.com') attende_that_declined.params['PARSTAT'] = vText('DECLINED') tentative_attende = vCalAddress(f'mailto:mum@example.com') tentative_attende.params['PARSTAT'] = vText('TENTATIVE') event = Event() event.add('DTSTART', datetime(2022, 7, 22, 12, 30)) event.add('DTEND', datetime(2022, 7, 22, 16, 30)) event.add('DTSTAMP', datetime.now()) event.add('UID', 'unique-id') event.add('description', 'Birthday party') event.add('attendee', attende_that_accepted) event.add('attendee', attende_that_declined) event.add('attendee', tentative_attende) calendar.add_component(event) print(calendar.to_ical().decode('utf-8'))
The output:
BEGIN:VCALENDAR VERSION:2.0 PRODID:icalendar BEGIN:VEVENT DTSTART:20220722T123000 DTEND:20220722T163000 DTSTAMP:20230118T225027Z UID:unique-id ATTENDEE;PARSTAT=ACCEPTED:mailto:someone@example.com ATTENDEE;PARSTAT=DECLINED:mailto:someone1@example.com ATTENDEE;PARSTAT=TENTATIVE:mailto:mum@example.com DESCRIPTION:Birthday party END:VEVENT END:VCALENDAR
Sorry, something went wrong.
No branches or pull requests
How to add Yes No May be options in ICS file using Python? please let me know if anyone implemented it.
The text was updated successfully, but these errors were encountered: