Re: [O] Python script to download Google Calendar events

2011-07-29 Thread Felix Geller
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 ras...@gmx.us wrote:
 
 Hi Felix, 
 
 Felix Geller fgel...@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 n...@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.


pgp2Ke7HJs0Lx.pgp
Description: PGP signature


Re: [O] Python script to download Google Calendar events

2011-07-22 Thread Rasmus

Hi Felix, 

Felix Geller fgel...@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 n...@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




Re: [O] Python script to download Google Calendar events

2011-07-22 Thread Rasmus

Hi Felix, 

Felix Geller fgel...@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 n...@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




Re: [O] Python script to download Google Calendar events

2011-07-13 Thread Bastien
Hi Felix,

Felix Geller fgel...@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



Re: [O] Python script to download Google Calendar events

2011-07-13 Thread Felix Geller
Hi Bastien,

On Wed, 13 Jul 2011 10:38:22 +0200, Bastien b...@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


pgpV5itQIFZyl.pgp
Description: PGP signature


Re: [O] Python script to download Google Calendar events

2011-07-13 Thread Bastien
Felix Geller fgel...@gmail.com writes:

 no, not at all :)

Okay, done.  Thanks a lot!

-- 
 Bastien



Re: [O] Python script to download Google Calendar events

2011-07-12 Thread Torsten Wagner

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