[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Google calendar to org mode script and a feature request f
From: |
Torsten Wagner |
Subject: |
Re: [Orgmode] Google calendar to org mode script and a feature request for agenda |
Date: |
Fri, 09 Jul 2010 09:57:48 +0900 |
Just by reading and without the possibility to test it. Why you multiply the
hour with 36 instead of 3600 to get seconds?
Grettings
Torsten
Eric S Fraga <address@hidden> wrote:
>On Wed, 7 Jul 2010 17:38:45 -0300, Daniel Martins <address@hidden> wrote:
>>
>> Eric,
>>
>> Your awk seems to get timed appts in GMT
>>
>> How can I adapt it to GMT-3
>>
>> Daniel
>
>Okay! I think I've got this working for any time zone (as well as
>adding some more functionality -- read the prologue in the script for
>info).
>
>Attached is the awk script. I use this from within a shell script (on
>Linux) that essentially does this:
>
>--8<---------------cut here---------------start------------->8---
>ICS=basic.ics
>ORG=googlecalendar.org
>AWK=ical2org.awk
>
># get the Google calendar
>wget http://www.google.com/calendar/ical/[...]/basic.ics
>
># convert the ical entries to org format, adjusting for the
># time zone information
>
># this next command yields hours from UTC, + or -, times 100
># Note: this does not cater for those people living in time zones
># that are not aligned with discrete hours (e.g. Newfoundland)...
>timezone=$(date +%z | sed 's/^\([+-]\)0/\1/')
>
># convert this to seconds for use in the awk script
>seconds=$(($timezone*36))
>
># and now process the ics file with appropriate time zone
>awk -f $AWK --assign SECONDS=$seconds < $ICS > $ORG
>--8<---------------cut here---------------end--------------->8---
>
>Please test this all out and let me know if it works. If the date and
>sed commands work, you should be adjusting the times by -3*3600=-10800
>seconds. This seems to be working for me with BST (aka GMT+1).
>
>eric
>
>--
>Eric S Fraga
>GnuPG: 8F5C 279D 3907 E14A 5C29 570D C891 93D8 FFFC F67D
>
>_______________________________________________
>Emacs-orgmode mailing list
>Please use `Reply All' to send replies to the list.
>address@hidden
>http://lists.gnu.org/mailman/listinfo/emacs-orgmode
- Re: [Orgmode] Google calendar to org mode script and a feature request for agenda,
Torsten Wagner <=
- Re: [Orgmode] Google calendar to org mode script and a feature request for agenda, Nick Dokos, 2010/07/08
- Re: [Orgmode] Google calendar to org mode script and a feature request for agenda, Eric S Fraga, 2010/07/09
- Re: [Orgmode] [google] updated awk script for google to org conversion, Eric S Fraga, 2010/07/09
- Re: [Orgmode] [google] updated awk script for google to org conversion, Daniel Martins, 2010/07/10
- Re: [Orgmode] [google] updated awk script for google to org conversion, Sven Bretfeld, 2010/07/12
- [Orgmode] Re: [google] updated awk script for google to org conversion, Rémi Vanicat, 2010/07/12
- [Orgmode] Re: [google] updated awk script for google to org conversion, Michael Steiner, 2010/07/12
- Re: [Orgmode] Re: [google] updated awk script for google to org conversion, Sven Bretfeld, 2010/07/13
- Re: [Orgmode] [google] updated awk script for google to org conversion, Eric S Fraga, 2010/07/12
- Re: [Orgmode] [google] updated awk script for google to org conversion, Marcelo de Moraes Serpa, 2010/07/12