Giter VIP home page Giter VIP logo

Comments (9)

insanum avatar insanum commented on September 18, 2024 1

I don't like the idea of gcalcli storing it's own dictionary matching up event UIDs. gcalcli should remain as stateless as possible. I DO like the idea of stuffing the Exchange UID at the end of the event description with a "gcalcli" tag specifying so.

It's been a while since I looked at the gdata calendar spec. Is the event attachment interface exposed? We could use that and come up with our own.

from gcalcli.

tresni avatar tresni commented on September 18, 2024

There is a UID field for the ICS event, but not sure if there is much we can do since any operation would require we know the ID of the previously imported event. The events from Google have UID, but it can only bet set with sync events it looks like. This is also the UID created by Google when it adds the event and not the UID from the ICS, so there is no default relationship.

Couple options I can think to do this would be to use something (sqlite, pickle'd object, something) that stores a dictionary of ICS UID -> Google Event ID and then update operations would use that information. Either that, or add something to the ticket body that says "gcalcli imported: " and search for that before importing an ICS to see if there is an event that needs updated.

from gcalcli.

tresni avatar tresni commented on September 18, 2024

Doing some further reading, we may be able to leverage Extended Properties which won't render to the user but allow us to store simple key/value pairs. Trying to find an example of looking up an event based on Extended Properties.

from gcalcli.

tresni avatar tresni commented on September 18, 2024

Of course Extended Properties aren't searchable, because that would make it to easy. Attachments don't look to be exposed in the V2 API (didn't bother looking at the V3 API.) So yeah, I'm thinking the tag is the only way to go as at least it should be searchable.

from gcalcli.

insanum avatar insanum commented on September 18, 2024

Going to use this issue for tracking the track_import_event_ids branch. See commit 928a9df which attempts to add this enhancement.

from gcalcli.

guiniol avatar guiniol commented on September 18, 2024

I have been using the track_import_events_ids branch for a few days and it seems to work properly. I haven't tested removing events because I'm unsure as to how to do that with an .ics file

from gcalcli.

insanum avatar insanum commented on September 18, 2024

That's good. This changes in that branch work great for single events. For removing events, the .ics file will have a STATUS:CANCELLED field. This triggers gcalcli to remove the event from the calendar.

Note that you'll really start seeing problems when trying to move/delete single events inside a recurrence.

from gcalcli.

guiniol avatar guiniol commented on September 18, 2024

I'm not sure if it would qualify as a bug (especially since it seems to be due to the google side), but if I add an event, cancel it, and then try to re-add it, I get:

googleapiclient.errors.HttpError: <HttpError 409 when requesting https://www.googleapis.com/calendar/v3/calendars/gguiniol%40gmail.com/events?alt=json returned "The requested identifier already exists.">

from gcalcli.

insanum avatar insanum commented on September 18, 2024

Yes I've seen that as well. For some reason the event UID remains on the Google servers and you can't re-use it. I never followed up as to why and whether or not the API allows you to override it. Maybe there is a more permanent way to perform the previous cancellation/deletion. Don't know.

from gcalcli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.