eoleedi / timetree-exporter Goto Github PK
View Code? Open in Web Editor NEWA Tool for Exporting TimeTree Calendar to iCal / 將 TimeTree 日曆匯出成 iCal 格式
License: MIT License
A Tool for Exporting TimeTree Calendar to iCal / 將 TimeTree 日曆匯出成 iCal 格式
License: MIT License
I'm currently trying to convert a calendar and one event has negative values in start_at and end_at.
That breaks the program. Probably should be checked for before using the values.
The error:
File "C:\Users\_\AppData\Roaming\Python\Python312\Scripts\timetree-exporter.exe\__main__.py", line 4, in <module>
File "C:\Users\_\AppData\Roaming\Python\Python312\site-packages\timetree_exporter\__main__.py", line 54, in <module>
iCalEvent = formatter.to_ical()
^^^^^^^^^^^^^^^^^^^
File "C:\Users\_\AppData\Roaming\Python\Python312\site-packages\timetree_exporter\formatter.py", line 147, in to_ical
event.add("dtstart", self.dtstart)
^^^^^^^^^^^^
File "C:\Users\_\AppData\Roaming\Python\Python312\site-packages\timetree_exporter\formatter.py", line 107, in dtstart
return self.get_datetime(is_start_time=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\_\AppData\Roaming\Python\Python312\site-packages\timetree_exporter\formatter.py", line 92, in get_datetime
datetime.fromtimestamp(
OSError: [Errno 22] Invalid argument
Part of the Object it failed on:
{
"category": 1,
"type": 1,
"author_type": "User",
"title": "",
"all_day": true,
"start_at": -284169600000,
"start_timezone": "UTC",
"end_at": -284169600000,
"end_timezone": "UTC",
"label_id": 1,
"recurrences": ["RRULE:FREQ=YEARLY"],
"alerts": [],
"attachment": {},
"like_count": 0,
"files": [],
}
If you want, I can do pr for this.
Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "C:\Python312\Scripts\timetree-exporter.exe\__main__.py", line 4, in <module> ImportError: cannot import name 'main' from 'timetree_exporter.__main__' (C:\Python312\Lib\site-packages\timetree_exporter\__main__.py)
What is the Problem?
Related Discussion #7
Hi all,
I tried to export my TimeTree calendar via timetree-exporter. So I downloaded it on my MacBook Pro via pip3 and created the .json files out of the "sync" answers via dev tools in Microsoft Edge.
Now, when I tree to run the timetree-exporter tool, it tells me the following error:
xxx@xxx bin % ./timetree-exporter /Users/xxx/Desktop/response1.json
2024-06-12 10:00:24 [INFO] Parsing /Users/xxx/Desktop/response1.json
Traceback (most recent call last):
File "/Users/xxx/Library/Python/3.9/bin/./timetree-exporter", line 8, in
sys.exit(main())
File "/Users/xxx/Library/Python/3.9/lib/python/site-packages/timetree_exporter/main.py", line 63, in main
events = get_events_from_file(filename)
File "/Users/xxx/Library/Python/3.9/lib/python/site-packages/timetree_exporter/utils.py", line 16, in get_events_from_file
response_data = json.load(response_file)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/json/init.py", line 293, in load
return loads(fp.read(),
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
I checked my json file and tried to add double quotes to the value in line 1 column 2, not working. What else can I do?
Thanks in advance!
Marius
There is an event that represents the user's birthday.
However, the event title, which may be generated by another script, is empty.
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.