get events from google calendar for a given dates range

wget -q -O - 'URL/full?orderby=starttime&singleevents=true&start-min=2009-06-01&start-max=2009-07-31' | perl -lane '@m=$_=~m/<title type=.text.>(.+?)</g;@a=$_=~m/startTime=.(2009.+?)T/g;shift @m;for ($i=0;$i<@m;$i++){ print $m[$i].",".$a[$i];}';
substitute the URL with your private/public XML url from calendar sharing settings substitute the dates YYYY-mm-dd adjust the perl parsing part for your needs
Sample Output
Claudio,2009-07-30
Claudio,2009-07-23
Claudio,2009-07-17
Claudio,2009-07-16
Claudio,2009-07-10
Claudio,2009-07-03
Claudio,2009-07-02
Claudio,2009-06-26
Claudio,2009-06-25
Failure,2009-06-20
Glconsulting,2009-06-18
Failure,2009-06-15
production migration,2009-06-08

These Might Interest You

  • Requires googlecl (http://code.google.com/p/googlecl/) Even better when you wrap this in a script and allow the --date=STRING to be $1. Then you can type: whatson "next Thursday" The date string for UNIX date is very flexible. You can also add --cal "[regex]" to the end for multiple calendars.


    1
    google calendar list --date `date --date="next thursday" +%Y-%m-%d`
    sramsay · 2010-08-22 16:18:53 3
  • Using the gcalcli interface to google calendar, print the calendar for the next 2 weeks according to the width of the terminal being used. * Remove "--mon" to start week on sunday, * Change 2 for more or less weeks gcalcli --mon --width $((COLUMNS/8)) calm for whole month Show Sample Output


    0
    gcalcli --mon --width $((COLUMNS/8)) calw 2
    jaw42 · 2013-07-04 12:28:51 0
  • remotely connects to an https site, fetches the ssl certificate and displays the valid dates for the cert


    32
    echo | openssl s_client -connect www.google.com:443 2>/dev/null |openssl x509 -dates -noout
    systemj · 2009-02-05 15:21:50 3
  • shows number of mysql bin log events (which are mysql server events) per minute, useful to check stress times postmortem Show Sample Output


    1
    mysqlbinlog <logfiles> | grep exec | grep end_log_pos | cut -d' ' -f2- | cut -d: -f-2 | uniq -c
    theist · 2012-05-30 09:42:21 4

What Others Think

Just thought I'd mention the gcalcli package. Very configurable and fast.
anzan · 465 weeks ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: