emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Python script to download Google Calendar events
@ 2011-07-11 10:21 Felix Geller
  2011-07-11 20:13 ` Felix Geller
  2011-07-12 15:37 ` Torsten Wagner
  0 siblings, 2 replies; 9+ messages in thread
From: Felix Geller @ 2011-07-11 10:21 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 420 bytes --]

Hi,

I wrote a Python script that [1] uses the GData API to download events
for your Google Calendar and prints them to a given org-file. It is a
very tiny script, but perhaps it is of use to other people as well.

Small disclaimer: I've tested this on Mac OS X only, using Python 2.7.2.

Let me know what you think :)


Cheers,
Felix

Footnotes:

[1] https://bitbucket.org/fgeller/gcal2org/src/8fa7d2b83ab3/gcal2org.py

[-- Attachment #2: Type: application/pgp-signature, Size: 202 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Python script to download Google Calendar events
  2011-07-11 10:21 Python script to download Google Calendar events Felix Geller
@ 2011-07-11 20:13 ` Felix Geller
  2011-07-13  8:38   ` Bastien
                     ` (2 more replies)
  2011-07-12 15:37 ` Torsten Wagner
  1 sibling, 3 replies; 9+ messages in thread
From: Felix Geller @ 2011-07-11 20:13 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 491 bytes --]

Hi,

I wrote a Python script that [1] uses the GData API to download events
for your Google Calendar and prints them to a given org-file. It is a
very tiny script, but perhaps it is of use to other people as well.

Small disclaimer: I've tested this on Mac OS X only, using Python 2.7.2.

Let me know what you think :)


Cheers,
Felix

P.S.: Please excuse double posting if the first version does show up.

Footnotes:

[1] https://bitbucket.org/fgeller/gcal2org/src/8fa7d2b83ab3/gcal2org.py

[-- Attachment #2: Type: application/pgp-signature, Size: 202 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Python script to download Google Calendar events
  2011-07-11 10:21 Python script to download Google Calendar events Felix Geller
  2011-07-11 20:13 ` Felix Geller
@ 2011-07-12 15:37 ` Torsten Wagner
  1 sibling, 0 replies; 9+ messages in thread
From: Torsten Wagner @ 2011-07-12 15:37 UTC (permalink / raw)
  To: Felix Geller; +Cc: emacs-orgmode

Hi Felix,

> Small disclaimer: I've tested this on Mac OS X only, using Python 2.7.2.

It took me a while to get the gpg part working but now its working nicely :)
I had to remove -no-tty for some reason.
getting from
authinfo = os.popen('gpg -q -no-tty -d ~/org/google_passwd.org.gpg').read()
to
authinfo = os.popen('gpg -q -d ~/org/google_passwd.org.gpg').read()

This is working under Arch-Linux, obvious after tweaking to use python2 
and not python3.

I will test if I could add the generated file to my agenda.

This would allow me to merge the google calendar with org.
Basically, I started to use the google calendar since most of the time I 
add events on my smartphone. Adding a quick event is, for now, much 
easier using the google calendar rather then trying to sync via 
org-mobile. I also appreciate the calendar view on small screens rather 
then a text-based view. A sync between org-mode and google events is not 
necessary as long as I stick with the way to add/change events only on 
my mobile phone. (but sure it would be awesome if there would be a real 
sync).

Lets see how it works out.

Totti

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Python script to download Google Calendar events
  2011-07-11 20:13 ` Felix Geller
@ 2011-07-13  8:38   ` Bastien
  2011-07-13 10:54     ` Felix Geller
  2011-07-22 12:59   ` Rasmus
  2011-07-22 13:01   ` Rasmus
  2 siblings, 1 reply; 9+ messages in thread
From: Bastien @ 2011-07-13  8:38 UTC (permalink / raw)
  To: Felix Geller; +Cc: emacs-orgmode

Hi Felix,

Felix Geller <fgeller@gmail.com> writes:

> I wrote a Python script that [1] uses the GData API to download events
> for your Google Calendar and prints them to a given org-file. It is a
> very tiny script, but perhaps it is of use to other people as well.
>
> Small disclaimer: I've tested this on Mac OS X only, using Python
> 2.7.2.

This looks nice.  I've not tested it yet, I'm busy with the release.

Would you have any objection if I put this in this section of Worg:

  http://orgmode.org/worg/org-translators.html

?

Thanks!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Python script to download Google Calendar events
  2011-07-13  8:38   ` Bastien
@ 2011-07-13 10:54     ` Felix Geller
  2011-07-13 11:24       ` Bastien
  0 siblings, 1 reply; 9+ messages in thread
From: Felix Geller @ 2011-07-13 10:54 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 382 bytes --]

Hi Bastien,

On Wed, 13 Jul 2011 10:38:22 +0200, Bastien <bzg@altern.org> wrote:

> This looks nice.  I've not tested it yet, I'm busy with the release.
> 
> Would you have any objection if I put this in this section of Worg:
> 
>   http://orgmode.org/worg/org-translators.html
> 
> ?

no, not at all :)


Cheers,
Felix


>
> 
> Thanks!
> 
> -- 
>  Bastien

[-- Attachment #2: Type: application/pgp-signature, Size: 202 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Python script to download Google Calendar events
  2011-07-13 10:54     ` Felix Geller
@ 2011-07-13 11:24       ` Bastien
  0 siblings, 0 replies; 9+ messages in thread
From: Bastien @ 2011-07-13 11:24 UTC (permalink / raw)
  To: Felix Geller; +Cc: emacs-orgmode

Felix Geller <fgeller@gmail.com> writes:

> no, not at all :)

Okay, done.  Thanks a lot!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Python script to download Google Calendar events
  2011-07-11 20:13 ` Felix Geller
  2011-07-13  8:38   ` Bastien
@ 2011-07-22 12:59   ` Rasmus
  2011-07-29 21:23     ` Felix Geller
  2011-07-22 13:01   ` Rasmus
  2 siblings, 1 reply; 9+ messages in thread
From: Rasmus @ 2011-07-22 12:59 UTC (permalink / raw)
  To: emacs-orgmode


Hi Felix, 

Felix Geller <fgeller@gmail.com> writes:

> I wrote a Python script that [1] uses the GData API to download events
> for your Google Calendar and prints them to a given org-file. It is a
> very tiny script, but perhaps it is of use to other people as well.

Now I've had some time to play around with your script and it is very
nice and fast. I tingled a bit with it.

I (think) I have added support for other calendars using the
https://.*/private/full urls. I've also added a category.

Thus, one can specify gcal2org.py name@gpost.com file uri 

and if uri is left out it will work as your script. 

I have hosted the alternative script here:

  http://andromeda.kiwilight.com/~pank/gcal2org.txt (no .py allowed)
  http://andromeda.kiwilight.com/~pank/gcal2org.diff

The thing is, I don't know where you find these private/full urls in the
web-interface. I found them via Gdata. Optimally, it should just use
one of the urls from the web-interface.

Cheers,
Rasmus

-- 
Sent from my Emacs

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Python script to download Google Calendar events
  2011-07-11 20:13 ` Felix Geller
  2011-07-13  8:38   ` Bastien
  2011-07-22 12:59   ` Rasmus
@ 2011-07-22 13:01   ` Rasmus
  2 siblings, 0 replies; 9+ messages in thread
From: Rasmus @ 2011-07-22 13:01 UTC (permalink / raw)
  To: emacs-orgmode


Hi Felix, 

Felix Geller <fgeller@gmail.com> writes:

> I wrote a Python script that [1] uses the GData API to download events
> for your Google Calendar and prints them to a given org-file. It is a
> very tiny script, but perhaps it is of use to other people as well.

Now I've had some time to play around with your script and it is very
nice and fast. I tingled a bit with it.

I (think) I have added support for other calendars using the
https://.*/private/full urls. I've also added a category.

Thus, one can specify gcal2org.py name@gpost.com file uri 

and if uri is left out it will work as your script. 

I have hosted the alternative script here:

  http://andromeda.kiwilight.com/~pank/gcal2org.txt (no .py allowed)
  http://andromeda.kiwilight.com/~pank/gcal2org.diff

The thing is, I don't know where you find these private/full urls in the
web-interface. I found them via Gdata. Optimally, it should just use
one of the urls from the web-interface.

Cheers,
Rasmus

-- 
Sent from my Emacs

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Python script to download Google Calendar events
  2011-07-22 12:59   ` Rasmus
@ 2011-07-29 21:23     ` Felix Geller
  0 siblings, 0 replies; 9+ messages in thread
From: Felix Geller @ 2011-07-29 21:23 UTC (permalink / raw)
  To: Rasmus, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1759 bytes --]

Hi Rasmus and list :)

Small updates:
 1. Integration of Rasmus' idea to support different calendars (thanks!)
 2. Support for publishing a new title of an event. 

The second one is a very limited form of sync'ing changes back to Google
Calendar, but suits my needs [2]. I updated the documentation to include
examples. Take a look if you're interested: http://goo.gl/rZU78


Cheers,
Felix


On Fri, 22 Jul 2011 14:59:34 +0200, Rasmus <rasmus@gmx.us> wrote:
> 
> Hi Felix, 
> 
> Felix Geller <fgeller@gmail.com> writes:
> 
> > I wrote a Python script that [1] uses the GData API to download events
> > for your Google Calendar and prints them to a given org-file. It is a
> > very tiny script, but perhaps it is of use to other people as well.
> 
> Now I've had some time to play around with your script and it is very
> nice and fast. I tingled a bit with it.
> 
> I (think) I have added support for other calendars using the
> https://.*/private/full urls. I've also added a category.
> 
> Thus, one can specify gcal2org.py name@gpost.com file uri 
> 
> and if uri is left out it will work as your script. 
> 
> I have hosted the alternative script here:
> 
>   http://andromeda.kiwilight.com/~pank/gcal2org.txt (no .py allowed)
>   http://andromeda.kiwilight.com/~pank/gcal2org.diff
> 
> The thing is, I don't know where you find these private/full urls in the
> web-interface. I found them via Gdata. Optimally, it should just use
> one of the urls from the web-interface.
> 
> Cheers,
> Rasmus
> 
> -- 
> Sent from my Emacs
> 
>

Footnotes:

[2] I add a hook to toggling the TODO state of an entry, and invoke the
script to update the event title if applicable. There's an example in
the script.

[-- Attachment #2: Type: application/pgp-signature, Size: 242 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-07-29 21:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-11 10:21 Python script to download Google Calendar events Felix Geller
2011-07-11 20:13 ` Felix Geller
2011-07-13  8:38   ` Bastien
2011-07-13 10:54     ` Felix Geller
2011-07-13 11:24       ` Bastien
2011-07-22 12:59   ` Rasmus
2011-07-29 21:23     ` Felix Geller
2011-07-22 13:01   ` Rasmus
2011-07-12 15:37 ` Torsten Wagner

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).