albertyw / csv-ical Goto Github PK
View Code? Open in Web Editor NEWA simple script to convert data in CSV format to iCal format
License: MIT License
A simple script to convert data in CSV format to iCal format
License: MIT License
codeship, gemnasium, codeclimate, etc.
Shouldn't HEADER_COLUMNS_TO_SKIP
be HEADER_ROWS_TO_SKIP
?
I have an ical file I've exported from Apple's Calendar. I've followed the process in examples/to_csv.py
but when doing convert.make_csv()
I get this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/phil/.pyenv/versions/csv-ical/lib/python3.6/site-packages/csv_ical/convert.py", line 81, in make_csv
event['LOCATION'],
File "/Users/phil/.pyenv/versions/csv-ical/lib/python3.6/site-packages/icalendar/caselessdict.py", line 42, in __getitem__
return super(CaselessDict, self).__getitem__(key.upper())
KeyError: 'LOCATION'
Here's a truncated version of my ics file, with a single event (with SUMMARY and DESCRIPTION replaced):
BEGIN:VCALENDAR
METHOD:PUBLISH
VERSION:2.0
X-WR-CALNAME:Health
PRODID:-//Apple Inc.//Mac OS X 10.13.4//EN
X-APPLE-CALENDAR-COLOR:#A2845E
X-WR-TIMEZONE:Europe/London
CALSCALE:GREGORIAN
BEGIN:VTIMEZONE
TZID:Europe/London
BEGIN:DAYLIGHT
TZOFFSETFROM:+0000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
DTSTART:19810329T010000
TZNAME:BST
TZOFFSETTO:+0100
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0100
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
DTSTART:19961027T020000
TZNAME:GMT
TZOFFSETTO:+0000
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20150401T105219Z
UID:623DE640-F0FF-4362-BC51-1890C2732BB2
DTEND;VALUE=DATE:20080620
TRANSP:OPAQUE
X-APPLE-TRAVEL-ADVISORY-BEHAVIOR:AUTOMATIC
SUMMARY:Event title
DTSTART;VALUE=DATE:20080619
DTSTAMP:20111014T103701Z
SEQUENCE:0
DESCRIPTION:My description.
END:VEVENT
END:VCALENDAR
Hi,
I've been looking all over the place for a script like this an its promising based on the examples you have, but I've tried numerous combinations of 'csv_configs' and just cannot get anything to output correctly to ics. The only thing I get in an output are the first two lines below:
BEGIN:VCALENDAR
END:VCALENDAR
I've even gone so far as to use the same data and configuration from your csv file and arrive.py file, within my csv and script, and even that doesn't work. Any thoughts on what I could be doing wrong?
it seems that recurring events are put in the CSV only for their first occurrence, is that intended? can it be changed?
Hi,
could you clarify the license?
Thank you.
Hello! Are there any plans to support decoding into readable encodings such as UTF8? Now I'm getting a file like this.
Нагаев отпуск 2 часть,2024-07-15,2024-07-29,,None
Резванцев А.М. pt.2,2024-08-11,2024-09-01,,None
Резванцев А.М. pt.1,2024-04-21,2024-04-28,,None
For this kind of event a copy of a recurred event, a undocumented tag is created : X-MOZ-FAKED-MASTER:1
this behaviour has been identified :
https://bugzilla.mozilla.org/show_bug.cgi?id=536796
Some how it's not corrected in Thunderbird.
BEGIN:VEVENT
CREATED:20210118T075836Z
LAST-MODIFIED:20210118T075906Z
DTSTAMP:20210118T075906Z
UID:3BE58C04-1B6C-4C1E-8AA9-60A0F3A25864
ATTENDEE;[email protected];RSVP=TRUE;PARTSTAT=ACCEPTED;CN=Me
hdi Guiraud;CUTYPE=INDIVIDUAL:mailto:[email protected]
RDATE;VALUE=DATE-TIME:20210120T090000Z
DTSTART;TZID=Europe/Paris:20210120T100000
X-MOZ-FAKED-MASTER:1
X-MOZ-GENERATION:1
DURATION:PT1H
CLASS:PUBLIC
END:VEVENT
I've created a patch that works for me. Im ' testing DTEND which is not there because of the nature of the copying.
The bot created this issue to inform you that pyup.io has been set up on this repo.
Once you have closed it, the bot will open pull requests for updates as soon as they are available.
I have a ics files with some recurring elements which have no DTEND, so it throws a exception:
Traceback (most recent call last): File "./convert", line 8, in <module> convert.make_csv() File "/usr/local/lib/python3.7/dist-packages/csv_ical/convert.py", line 78, in make_csv event.get('DTEND').dt, AttributeError: 'NoneType' object has no attribute 'dt'
Could you provide a script to convert from Ical to csv?
One of the CSV files that I was parsing had an address from Hong Kong in it.
When it was being opened it was throwing an error.
I had to modify read_csv
and save_ical
and save_csv
and read_ical
to be with open(csv_location, encoding="utf8") as csv_file:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.