Giter VIP home page Giter VIP logo

ical2csv's People

Contributors

hans avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

hbosnjak cweiske

ical2csv's Issues

Document dependencies

I had to use pip to install:

  • python-dateutil
  • icalendar

Otherwise ical2csv would not work.

KeyError: 'LOCATION'

The file at the end of this issue leads to a crash:

$ python3 ical2csv.py noloc.ics 
UID,CREATED,LAST-MODIFIED,DTSTART,DTEND,SUMMARY,LOCATION
Traceback (most recent call last):
  File "ical2csv.py", line 148, in <module>
    args.include_full_day):
  File "ical2csv.py", line 56, in process
    item['LOCATION'] = item['LOCATION'].replace(',', ';')
  File "/usr/local/lib/python3.5/dist-packages/icalendar/caselessdict.py", line 42, in __getitem__
    return super(CaselessDict, self).__getitem__(key.upper())
KeyError: 'LOCATION'

BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Europe/Berlin
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
END:STANDARD
END:VTIMEZONE

BEGIN:VEVENT
CREATED:20160715T134945Z
LAST-MODIFIED:20160718T074326Z
DTSTAMP:20160718T074326Z
UID:16CC71D0-3938-484A-8348-D450D5A3AEC5
SUMMARY:test
STATUS:CONFIRMED
DTSTART;TZID=Europe/Berlin:20160718T090000
DTEND;TZID=Europe/Berlin:20160719T140000
SEQUENCE:0
X-DEFAULT-ALARM:TRUE
END:VEVENT

END:VCALENDAR

Error on fullday-event: can't compare datetime.datetime to datetime.date

When trying to export a full-day event, I get a crash:

$ python3 ical2csv.py --include-full-day=1 fullday.ics 
UID,CREATED,LAST-MODIFIED,DTSTART,DTEND,SUMMARY,LOCATION
Traceback (most recent call last):
  File "ical2csv.py", line 151, in <module>
    args.include_full_day):
  File "ical2csv.py", line 52, in process
    if (start_date is not None and start_date > item_start) or end_date < item_end:
TypeError: can't compare datetime.datetime to datetime.date

BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Europe/Berlin
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
END:STANDARD
END:VTIMEZONE

BEGIN:VEVENT
CREATED:20151218T191453Z
LAST-MODIFIED:20151222T082058Z
DTSTAMP:20151222T082058Z
UID:[email protected]
SUMMARY:test
STATUS:CONFIRMED
DTSTART;VALUE=DATE;TZID=Europe/Berlin:20151223
DTEND;VALUE=DATE;TZID=Europe/Berlin:20160104
TRANSP:TRANSPARENT
SEQUENCE:0
X-DEFAULT-ALARM:TRUE
END:VEVENT

END:VCALENDAR

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.