erikcox / ical2csv Goto Github PK
View Code? Open in Web Editor NEWA Python script that reads ics files and outputs their data into a csv file.
A Python script that reads ics files and outputs their data into a csv file.
('Extracting events from file:', 'rili.ics', '\n')
Traceback (most recent call last):
File "ical2csv.py", line 87, in
csv_write(filename)
File "ical2csv.py", line 69, in csv_write
wr.writerow(values)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-6: ordinal not in range(128)
I've just noticed that the parse only treats events as one-off, so I just want to add repeating events as a future TODO
I exported my ical calendar and then tried to use ical2csv and got the following error:
Traceback (most recent call last):
File "ical2csv.py", line 90, in
sortedevents=sorted(events, key=lambda obj: obj.start) # Needed to sort events. They are not fully chronological in a Google Calendard export ...
TypeError: can't compare datetime.datetime to datetime.date
I tried ical2txt limiting it to a 14 day period and got:
Processing events : Traceback (most recent call last):
File "ical2txt.py", line 176, in
txt_write(filename) # Write the matching events to the textfile. With recurring_ical_events, scoping is already done.
File "ical2txt.py", line 127, in txt_write
if event.location != '': values = values + " [" + event.location + "]" # Only include location if there is one
TypeError: can only concatenate str (not "NoneType") to str
WIthout the date limit, I got the same Type Error as with ical2csv.
It's a best practice... :)
Hi,
thanks for writing this tool.
I get the following error:
python3 ical2txt.py export.ics
Extracting events from file: export.ics
Traceback (most recent call last):
File "ical2txt.py", line 156, in <module>
txt_write(filename)
File "ical2txt.py", line 96, in txt_write
if sys.argv[2] != '':
IndexError: list index out of range
It works when I use start and end dates:
python3 ical2txt.py export.ics 2021-05-01 2021-05-31
Would also be nice to mention this option in the readme.
Quickfix:
if len(sys.argv) > 3:
if sys.argv[2] != '':
istart=parse(sys.argv[2]).timestamp()
if sys.argv[3] != '':
istop=parse(sys.argv[3]).timestamp()
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.