insanum / gcalcli

Google Calendar Command Line Interface
MIT License
3.29k stars 311 forks source link

Deleting recurring events #157

Open absnc opened 9 years ago

absnc commented 9 years ago

Hi, I am trying to delete a given repeating event just once for all following events, using the standard command :

delete '*' --calendar @calname

However the program is deleting each events one by one until year 2019. Is there a way to match my event more precisely ?

Thanks in advance

tresni commented 9 years ago

Today deleting doesn't look at most flags (such as --nostarted) or accept any criteria besides the basic search on title. So while you could do delete 'name of the event' --calendar @calname it would search you calendar from the beginning of time.

As things stand today, we are working on individual event instances, so we don't treat things as actually recurring, we just tell Google to give us each single instance. That saves us from having to parse recurrences (and their exceptions) and has us focus on output. This is (partly) why you are prompted on each recurring item instead of the standard google prompt of "this one only", "this & all future" or "all". This maybe something that could be built into the delete logic, but don't quote me on that. I haven't seen anything in the API that easily allows us to delete all future items (essentially it looks like we'd have to get a list of all future items and delete them individually which could run into API limits depending on how often the even recurs.) As always, patches welcome :smile: