tag:blogger.com,1999:blog-8540876.post114700157891422112..comments2024-01-17T00:22:00.802+03:00Comments on Deniz Yuret's Homepage: Google calendar: how to delete multiple entriesDeniz Yurethttp://www.blogger.com/profile/00578023665603100985noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-8540876.post-87343351063371830422012-05-29T19:00:12.279+03:002012-05-29T19:00:12.279+03:00I guess you can use the following free web applica...I guess you can use the following free web application: http://elementi.ws/gcalendarcleaner/Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8540876.post-8424792996341064702009-05-16T02:04:00.000+03:002009-05-16T02:04:00.000+03:00use --no-check-certificate if the first command do...use --no-check-certificate if the first command does not return anything. (some version of cygwin might have this problem)Sumithttp://sumitrangwala.wordpress.com/noreply@blogger.comtag:blogger.com,1999:blog-8540876.post-69021987433544788282009-04-07T09:10:00.000+03:002009-04-07T09:10:00.000+03:000D is hex for a space character, so you either hav...0D is hex for a space character, so you either have a space at the end of the lines (where you set minTime, maxTime and maxResults), or there is a space where you are inserting those variables when calling wget.Unknownhttps://www.blogger.com/profile/14454727970707678264noreply@blogger.comtag:blogger.com,1999:blog-8540876.post-80598336474198570002009-04-04T15:34:00.000+03:002009-04-04T15:34:00.000+03:00Thanks, this is great! The only problem I have is ...Thanks, this is great! The only problem I have is that when trying to get the bash script working I get extra %0D after the dates and maxResults: http://www.google.com/calendar/feeds/default/private/full?start-min=2008-11-03T12:29:00%0D&start-max=2008-11-10T12:29:59%0D&max-results=2%0D<BR/><BR/>This gives then "Invalid value for start-min parameter:" error. <BR/><BR/>The script works ok if I hard code the dates in the wget command. <BR/><BR/>How do I get rid of the extra %0D's?<BR/><BR/>Thanks, MarttiAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8540876.post-43270733715362564522009-01-29T10:48:00.000+02:002009-01-29T10:48:00.000+02:00it is a bash script, not a batch script. it is mea...it is a bash script, not a batch script. it is meant to run in a Linux shell.<BR/><BR/>copy the text in my previous post to a file called delevents.sh.<BR/><BR/>change the following details to match the entries you want deleted:<BR/>guser=YourGmailUsername@gmail.com<BR/>gpass=YourGmailPassword<BR/>minTime=2008-07-18T12:29:00<BR/>maxTime=2008-07-18T12:29:59<BR/>maxResults=2<BR/><BR/>set execute permission on the file:<BR/>chmod +x delevents.sh<BR/><BR/>run the file:<BR/>/bin/sh delevents.shUnknownhttps://www.blogger.com/profile/14454727970707678264noreply@blogger.comtag:blogger.com,1999:blog-8540876.post-45826434409813323222008-09-19T17:19:00.000+03:002008-09-19T17:19:00.000+03:00Hi,I'm having the multiple calendar entries proble...Hi,<BR/><BR/>I'm having the multiple calendar entries problem, and since I'm not a developer I would like to know some details on how to run this batch.<BR/><BR/>Thx in advance,<BR/>MiguelUnknownhttps://www.blogger.com/profile/02322522888184190400noreply@blogger.comtag:blogger.com,1999:blog-8540876.post-22541746284144959082008-09-19T16:38:00.000+03:002008-09-19T16:38:00.000+03:00Hi,I'm facing the same problem while I need to del...Hi,<BR/>I'm facing the same problem while I need to delete multiple entries at my Google Calendar. Since I'm not a developer, can you give some help on what type of batch I need this code to be run? <BR/><BR/>Thx in advance,<BR/>MiguelUnknownhttps://www.blogger.com/profile/02322522888184190400noreply@blogger.comtag:blogger.com,1999:blog-8540876.post-80112715360493147932008-07-19T11:27:00.000+03:002008-07-19T11:27:00.000+03:00Thanks for this, it saved me from manually deletin...Thanks for this, it saved me from manually deleting over 2000 entries. In return, here is a bash script to do everything in one go.<BR/><BR/># set up user parameters<BR/>guser=YourGmailUsername@gmail.com<BR/>gpass=YourGmailPassword<BR/>minTime=2008-07-18T12:29:00<BR/>maxTime=2008-07-18T12:29:59<BR/>maxResults=2<BR/><BR/># login and get the auth token<BR/>authToken=`wget -q -O- --post-data 'Email='${guser}'&Passwd='${gpass}'&service=cl&source=Gulp-CalGulp-1.05' https://www.google.com/accounts/ClientLogin | grep Auth | awk '{print substr($0, 6) }'`<BR/><BR/># get all events that match criteria and delete them one by one<BR/>wget -v -O- --header="Authorization: GoogleLogin auth="${authToken} "http://www.google.com/calendar/feeds/default/private/full?start-min="${minTime}"&start-max="${maxTime}"&max-results="${maxResults} |<BR/>tidy -q -xml -wrap 999 |<BR/>grep edit |<BR/>awk '{ system ("wget -v -nv -O- --header=\"Authorization: GoogleLogin auth='${authToken}'\" --header=\"X-HTTP-Method-Override: DELETE\" --post-data=\"\" " substr($0,52,length($0)-55)) }' 2>&1 | grep gsessionid | awk '{print("Deleting " NR "\11\13"); system("wget -nv -O- --header=\47Authorization: GoogleLogin auth='${authToken}'\47 --header=\47X-HTTP-Method-Override: DELETE\47 --post-data=\47\47 \47" substr($0,index($0,"gsessionid")-97,130) "\47")}'Unknownhttps://www.blogger.com/profile/14454727970707678264noreply@blogger.comtag:blogger.com,1999:blog-8540876.post-11145118114280987702007-11-14T17:20:00.000+02:002007-11-14T17:20:00.000+02:00Thank you - very useful!Thank you - very useful!Boazhttps://www.blogger.com/profile/03233346649566261050noreply@blogger.com