jayrav13 / ical_dict

A Python library to convert an .ics file into a Dictionary object.
MIT License
5 stars 1 forks source link

Customized Mapping for Keys #2

Closed jayrav13 closed 8 years ago

jayrav13 commented 8 years ago

Here is a sample event:

{
        "DTSTAMP": "20160725T150101Z",
        "BEGIN": "VEVENT",
        "X-MICROSOFT-CDO-ALLDAYEVENT": "FALSE",
        "DTEND;TZID=America/New_York": "20160821T150000",
        "UID": "http",
        "DTSTART;TZID=America/New_York": "20160821T080000",
        "SUMMARY": "NJ Region of the NYC Church of Christ",
        "X-TRUMBA-CUSTOMFIELD;NAME=\"Organization\";ID=5323;TYPE=SingleLine": "Confere nce Services",
        "X-TRUMBA-CUSTOMFIELD;NAME=\"Event Type\";ID=12;TYPE=number": "Lecture\\, Semin ar\\, Workshop",
        "X-TRUMBA-CUSTOMFIELD;NAME=\"Submitter Name\";ID=36;TYPE=SingleLine": "Wilson \\, Doneita",
        "LOCATION": "Campus Center Ballroom \"A\"\\, Campus Center Conference Room 240 \\, Campus Center Conference Room 220\\, Campus Center Conference Room 225",
        "END": "VEVENT",
        "X-TRUMBA-CUSTOMFIELD;NAME=\"Event Name\";ID=6143;TYPE=SingleLine": "NJ Region  of the NYC Church of Christ",
        "X-TRUMBA-LINK": "http",
        "CATEGORIES": "Lecture, Seminar, Workshop"
    }

While the output is valid and usable, the keys are a bit messy. A feature is needed where the client can specify what they want the .ics file's keys to be mapped to (i.e. their own preferences).

jayrav13 commented 8 years ago

README.md has been update to show how to use this functionality.