From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6273043969746141184 X-Received: by 10.107.17.197 with SMTP id 66mr6898628ior.6.1460569955268; Wed, 13 Apr 2016 10:52:35 -0700 (PDT) X-BeenThere: supmua@googlegroups.com Received: by 10.140.18.85 with SMTP id 79ls2582691qge.3.gmail; Wed, 13 Apr 2016 10:52:34 -0700 (PDT) X-Received: by 10.159.36.77 with SMTP id 71mr6564419uaq.13.1460569954879; Wed, 13 Apr 2016 10:52:34 -0700 (PDT) Return-Path: Received: from sasl.smtp.pobox.com (pb-smtp2.pobox.com. [64.147.108.71]) by gmr-mx.google.com with ESMTPS id f135si1473538vke.1.2016.04.13.10.52.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Apr 2016 10:52:34 -0700 (PDT) Received-SPF: pass (google.com: domain of marka@pobox.com designates 64.147.108.71 as permitted sender) client-ip=64.147.108.71; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@pobox.com; spf=pass (google.com: domain of marka@pobox.com designates 64.147.108.71 as permitted sender) smtp.mailfrom=marka@pobox.com Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id C4A0D10A19; Wed, 13 Apr 2016 13:52:31 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=H+/nm2E8eHx2 GALUUl3Xyiplycs=; b=dW8ZgoLHGLUo58AYLb5n1k78lsrMN+Qi9JlAHuoYCZsn QcRLr+ujFqvXCogLU/fTz84huRQJ/yYc3cpEck1q7R++FAVNO35I7mP+zrwtTm02 07glO+Tja6Zgvw0BMHljKaAkyVGlMa/i1bR15+T/H0jmq+vNeHCqmaJB88jJAws= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=xZ+mvc /HlTTgX06H+B0CDGh/DUOx2AhdzYfsVl5hHREB5JE/t2ZZ3ADrluQbFS34f5SQhe 5mAznfx6RTXMt/degc4y6rzj4oGhwVyfH8qUGhq4S60X8hVd7PjM9gwH6Z7T1JXq d3HNUsFyNmlPriW5h/W/hzGrd2v9GqZxKMGww= Received: from pb-smtp2. (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id BBF6B10A18; Wed, 13 Apr 2016 13:52:31 -0400 (EDT) Received: from localhost (unknown [64.222.110.242]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id 271E210A17; Wed, 13 Apr 2016 13:52:31 -0400 (EDT) From: Mark Alexander To: Elias Norberg Cc: supmua Subject: Re: [sup] Calendar integration In-reply-to: <1460556707-sup-9370@kudzu> References: <1460556707-sup-9370@kudzu> Date: Wed, 13 Apr 2016 13:52:29 -0400 Message-Id: <1460569126-sup-746@t60p> User-Agent: Sup/0.22.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-1460569949-959668-28156-5196-1-=" X-Pobox-Relay-ID: 7E98FB54-01A0-11E6-96B2-D05A70183E34-04141195!pb-smtp2.pobox.com Content-Transfer-Encoding: 7bit --=-1460569949-959668-28156-5196-1-= Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Excerpts from Elias Norberg's message of 2016-04-13 16:14:12 +0200: > I was wondering if anyone has a neat solution to dealing with .ICS-files? > Displaying them via mailcap is simple enough - accepting or rejecting a > meeting not so much. > > How do you deal with stuff like this? Just reply with a simple "I'll be > there / Won't be there", or something more advanced? I worked at a company that used the calendar stuff. Unfortunately, I didn't find a solution to the problem you're describing. I see there is a program called gcalcli, a command line tool for dealing with Google calendars. But I'm not sure this would have worked with other calendar systems. This probably won't help, but I was able to get the calendar events to display in sup without mailcap. Attached is my ~/.sup/hooks/mime-decode.rb file. --=-1460569949-959668-28156-5196-1-= Content-Disposition: attachment; filename="mime-decode.rb" Content-Type: application/x-ruby; name="mime-decode.rb" Content-Transfer-Encoding: quoted-printable unless sibling_types.member? "text/plain" case content_type when "text/html" `/usr/bin/w3m -dump -T #{content_type} '#{filename}'` when "text/calendar" summary =3D "No summary" dtstart =3D "No start time" dtend =3D "No end time" location =3D "No location" event =3D false File.open(filename) do |f| f.each do |line| case line when /^BEGIN:VEVENT/ event =3D true when /^END:VEVENT/ event =3D false when /^SUMMARY[^:]*:(.*)/ if event summary =3D $1 end when /^LOCATION[^:]*:(.*)/ if event location =3D $1 end when /^DTSTART[^:]*:(.*)/ if event dtstart =3D DateTime.strptime($1, '%Y%m%dT%H%M%S').ctime end when /^DTEND[^:]*:(.*)/ if event dtend =3D DateTime.strptime($1, '%Y%m%dT%H%M%S').ctime end end end end "Summary: #{summary}\n" + "Start: #{dtstart}\n" + "End: #{dtend}\n" + "Location: #{location}\n" end end --=-1460569949-959668-28156-5196-1-=--