pimutils / khal

:calendar: CLI calendar application
https://lostpackets.de/khal/
MIT License
2.59k stars 200 forks source link

View and Respond to .ics attachments (RFC 5546 support) #132

Open prologic opened 9 years ago

prologic commented 9 years ago

This might seem out of scope for khal but hopefully not.

This is the use-case:

There are several (only two actually that I've found) such tools that integrate (somewhat) with mutt that let one view and/or (maybe) respond to invitations.

Thoughts?

untitaker commented 9 years ago

How do responses to invitations look like?

prologic commented 9 years ago

They're basically emailed modified ics attachments.

See: https://github.com/marvinthepa/mutt-ical

geier commented 9 years ago

I do have this feature on the todo list, but it's not exactly high priority. This is actually specified in RFC 5546

untitaker commented 9 years ago

I think @jasonwryan did something with iCalendar invites.

jasonwryan commented 9 years ago

Yes, a little perl and awk hacked together: http://jasonwryan.com/blog/2014/04/05/calendar/

prologic commented 9 years ago

Yeah I've seen two hacked up examples both of which work more or less :)

I'd just like to see this polished up and included in something like khal :)

I'll see if I can put together a PR

flokli commented 6 years ago

@prologic Did you come up with something?

prologic commented 6 years ago

I'm sorry I did not.

James Mills / prologic

E: prologic@shortcircuit.net.au W: prologic.shortcircuit.net.au

On Tue, Dec 5, 2017 at 2:44 PM, Florian Klink notifications@github.com wrote:

@prologic https://github.com/prologic Did you come up with something?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pimutils/khal/issues/132#issuecomment-349466595, or mute the thread https://github.com/notifications/unsubscribe-auth/ABOv-mAz0GsXKHfJpijk2AuDBopomGBmks5s9cc_gaJpZM4DBjv- .

flokli commented 6 years ago

@prologic No problem, just hoped to go the easy path :-D

I already use khal printics to show invitations in mutt. Let's see it I find the time to add code to khal to display more ;-)

bepolymathe commented 5 years ago

@flokli Can you explain how you use khal printics for this ? Any solution for this problem in general ?

flokli commented 5 years ago

@bepolymathe my mailcap file has the following line:

text/calendar; khal printics %s;copiousoutput
bepolymathe commented 5 years ago

Thank you for your answer. This allows you to view the content of the.ics file but not to transfer it to Khal. "khal import" gives me a mistake. Can anyone import events into khal?

flokli commented 5 years ago

So far, I only used it to display ics attachments, not import - which is a bit of a mess on its own, as khal printics refuses to run if you have no calendars configured (that you don't need for reading ics), as that's an assertion done when reading settings, not when interacting with calendars…

guyest commented 5 years ago

They're basically emailed modified ics attachments.

See: https://github.com/marvinthepa/mutt-ical

I don't see why something like this script couldn't be rather easily incorporated into Khal. It is already in Python and gives a way to respond to invites (which it does not seem that Khal has at the moment or else this would be a closed issue). At the very least, it seems that the mailcap entry suggested above could be modified to be something like:

text/calendar; khal printics %s;copiousoutput
application/ics; <path>mutt-ical.py -i -e "user@domain.tld" %s; needsterminal

Then one would always see when an invite is attached and have the option to respond to it. To make it easy to do so, one could define a macro that selects the proper part of the multipart message which will activate the mailcap entry.

bepolymathe commented 5 years ago

For me, it doesn't work. Would it be possible to consider an order that would do:

save the.ics file temporarily + khal import + delete the file

What do you think of that?

ngw commented 5 years ago

Hi, I had quite some problems dealing with mutt2khal and the other perl script (sorry, I'm 100% perl ignorant) and I've built https://github.com/nofeed/vkhal mostly to have fun but as of now it works pretty well for me. I'm available to expand and refactor, in case open an issue with something I can reproduce, I'll be happy to help.

yourealwaysbe commented 4 years ago

I have tried the mutt-ical script above and another one. Both produced email responses that neither Outlook nor Google would recognise as replies to the invite.

With some minor adaptation i made the latter work. From my experiments it seems that you just need to build the right ICS file which you then attach to an email to the event organiser. Depending on scope, Khal could either just produce the ICS, or deal with sending the email.

My working script is here for reference. I don't have much time to look into coding it into Khal, but i might do something over Christmas.

tgy commented 1 year ago

Had a good laugh stumbling upon this thread dating back to... 2014, and which has been necrobumped several times now. My turn! Soon 10 years and we haven't come up with a proper solution within khal itself.

I think khal itself should be configurable to send the email (assuming the existence of an already-configured MUA (Mail User Agent, e.g. msmtp, Thunderbird) that is capable of sending an email from the command line), produce the ICS file, and execute the command in a subprocess.

What do you guys think? Maybe I can work something out in a PR (and hopefully not come back in 2 years when someone else necrobumps this thread, saying I switched back to Thunderbird)

geier commented 1 year ago

@tgy I'd love to see something like this. Have at it.

In #1271 I added a new address parameter for each calendar, which somewhat goes into this direction (but there was already an objection, that it might be more useful to have a list of addresses), perhaps you can add to that discussion if you are thinking about this.