ical2csv
ical2csv copied to clipboard
May this script do not support Chinese and other not-English language?
('Extracting events from file:', 'rili.ics', '\n')
Traceback (most recent call last):
File "ical2csv.py", line 87, in
I know it works with mostly latin-based languages like mine (Danish), but I don't know if it's set up to handle Chinese, Japanese and the like. Also, there might be some fixes I have implemented in ical2txt.py that is not in ical2csv.py yet. I plan to have a look at that one soon.
Can you upload a sample ics file somewhere that has this problem? It is working for Danish and English for sure. If UTF-16 is needed, then that is not currently supported.
@martinm76 Sorry, I don't have the env (my Mac is broken) to test right now, but I made a test ics file with calendar items in Chinese, you can download it and do some test. Hope it will help.
Okay, those two examples work for me at least, with my current branch Note: I have used Europe/Copenhagen as timezone. CSV:
"Summary","UID","Description","Location","Start` Time","End Time","URL"
`"测试1` test1","[email protected]","测试内容1 content1","","2021-05-04 20:30:00+02:00","2021-05-04 20:45:00+02:00",""
"测试2 test2","[email protected]","内容2 content2","","2021-05-05 22:00:00+02:00","2021-05-05 22:15:00+02:00",""
TXT:
Worklog, 2021-05-04
===================
20:30 - 20:45 (00:15) 测试1 test1
测试内容1 content1
Time Total: 00:15
Worklog, 2021-05-05
===================
22:00 - 22:15 (00:15) 测试2 test2
内容2 content2
Time Total: 00:15
Overridden for your timezone from the file (not sure why that is not adopted, but at least it gives us the option to use our own):
root@MMO-Monitoring - /opt/git/ical2csv -> sortedevents > TZ="Asia/Shanghai" ./ical2txt.py /tmp/fortest.ics
Opening ics file
Extracting events from file: /tmp/fortest.ics
Sorting events
Processing events : ..
Wrote 2 events to /tmp/fortest.txt and skipped 0 events
root@MMO-Monitoring - /opt/git/ical2csv -> sortedevents > cat /tmp/fortest.txt
Worklog, 2021-05-05
===================
02:30 - 02:45 (00:15) 测试1 test1
测试内容1 content1
Time Total: 00:15
Worklog, 2021-05-06
===================
04:00 - 04:15 (00:15) 测试2 test2
内容2 content2
Time Total: 00:15