From: Torsten Wagner <torsten.wagner@gmail.com>
To: e.fraga@ucl.ac.uk, Daniel Martins <danielemc@gmail.com>
Cc: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: Google calendar to org mode script and a feature request for agenda
Date: Fri, 09 Jul 2010 09:57:48 +0900 [thread overview]
Message-ID: <cfspd30k4gbetiyo8g8epnth.1278634182890@email.android.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1953 bytes --]
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 <ucecesf@ucl.ac.uk> wrote:
>On Wed, 7 Jul 2010 17:38:45 -0300, Daniel Martins <danielemc@gmail.com> 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.
>Emacs-orgmode@gnu.org
>http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
next reply other threads:[~2010-07-09 0:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-09 0:57 Torsten Wagner [this message]
2010-07-09 1:54 ` Google calendar to org mode script and a feature request for agenda Nick Dokos
2010-07-09 8:30 ` Eric S Fraga
2010-07-09 9:44 ` [google] updated awk script for google to org conversion Eric S Fraga
2010-07-11 3:03 ` Daniel Martins
2010-07-12 7:49 ` Sven Bretfeld
2010-07-12 9:22 ` Rémi Vanicat
2010-07-12 13:48 ` Michael Steiner
2010-07-13 7:29 ` Sven Bretfeld
2010-07-12 17:50 ` Eric S Fraga
2010-07-12 17:54 ` Marcelo de Moraes Serpa
-- strict thread matches above, loose matches on Subject: below --
2010-06-29 22:28 Google calendar to org mode script and a feature request for agenda Eric S Fraga
2010-06-30 5:43 ` Stephen Eglen
2010-07-07 20:38 ` Daniel Martins
2010-07-07 22:17 ` Eric S Fraga
2010-07-07 22:57 ` Daniel Martins
2010-07-08 18:07 ` Eric S Fraga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cfspd30k4gbetiyo8g8epnth.1278634182890@email.android.com \
--to=torsten.wagner@gmail.com \
--cc=danielemc@gmail.com \
--cc=e.fraga@ucl.ac.uk \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.