buzz / ics2owncloud.py Goto Github PK
View Code? Open in Web Editor NEWWebcal subscriptions that work with ownCloud 9
License: GNU General Public License v2.0
Webcal subscriptions that work with ownCloud 9
License: GNU General Public License v2.0
Hello,
i tried the script with oc 10, but it does not work. No imported items, no errors!?
Regards
Maik
The certificate of a server can be either expired (the letsencrypt scripts did not run for a time 😈 ) or can be issued via an company internal certificate authority.
In any case, it might be helpful to have a way to ignore certificate validation errors.
Also mentioned in #5
Hi, and thanks a lot for this wonderful utility - even if it's just meant as a workaround until the functionality becomes a first-class member in OC. By the way, IIUC it could be ics2caldav - there's nothing OC-specific, right?
My suggestion is actually a counter-request to #1 and #7, and would make this ics2owncloud independently useful even if remote calendars will be integrated in OC at some point. I subscribe to some calendars where I do want to keep the history locally, despite the fact that the feed only shows future events. E.g., I want to be shown the holidays from former years although my feed only shows the current and future years; or I want to keep a list of former talks and meetings in our institute; or I want to keep "verbatim" copies of shared calendars where other parties might delete or change history.
Do you think it's feasible to make the wipe optional?
Additional kudos if only future events could be wiped separately and replaced by the current remote content, with the following rationale: if announcements change or are cancelled entirely (rarely the case for holidays, entirely possible for talks), the future should be updated accordingly; but past events could be kept.
Cheers!
Greetings,
I am glad to see that my php code was useful ;-)
(I posted it on the forum you referred to)
As my script is not good with new calendar app, I wanted to use your script. But I cannot get it running.
I get:
HTTPError: 404 Client Error: Not Found for url: https://cloud.domain.pl/remote.php/caldav/calendars/user/calendar_name?export
When I changed the password to the wrong one in ini file the error message changed to:
HTTPError: 401 Client Error: Unauthorized for url: https:....
so there is a connection to the server.
I checked both with /dav/ and /caldav/ in url, same result.
I am on OC 9.0.2 with Calendar app 1.2.2. OC server in behind the Apache proxy, but it should be transparent.
Any hints?
Thanks for this Script, but i got this error:
SSLError: [Errno 1] _ssl.c:510: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
its an trusted letsencrypt certificate
look here: https://cloud-surfer.eu
I have exported my outlook calendar. One of the events is defined in ics as follows (see UID, bolded part):
BEGIN:VEVENT
UID:https://www.domain.com/webcast/11111/22222
SUMMARY:Zajęty
DTSTART;TZID=Central Europe Standard Time:20160712T140000
DTEND;TZID=Central Europe Standard Time:20160712T150000
CLASS:PUBLIC
PRIORITY:5
DTSTAMP:20160713T171942Z
TRANSP:OPAQUE
STATUS:CONFIRMED
SEQUENCE:1467877786
X-MICROSOFT-CDO-APPT-SEQUENCE:1467877786
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-CDO-INSTTYPE:0
X-MICROSOFT-DISALLOW-COUNTER:FALSE
END:VEVENT
and triggers an error:
HTTPError: 404 Client Error: Not Found for url: https://cloud.mydomain.pl/remote.php/caldav/calendars/user/calendar/https://www.domain.com/webcast/11111/22222.ics
Calendar item in question was an invitation to the webinar, in outlook it looks like all others.
If I store the calendar into ics file and import it via OC GUI it works fine.
Hi,
First, thanks for your tools because I can't use OC Calendar without remote calendars subscriptions.
However, the events which are deleted on the remote calendar stay presents into OC calendars.
Did you think that you can fix it before the version 1.1 (planned for the 12/04 (DD/MM)) update of OC calendar app ? Perhaps it will be nice to delete all events before import then into OC.
Regards
R_K
Hi, i dont know if the problem is with the script, or the dav functionality, but items added by the script, which appear in the calendar gui, are not shared via the caldav endpoint, when items manually added to the same calendar are.
Hi, for two days I get the following error messages:
Traceback (most recent call last): File "./ics2owncloud.py", line 77, in <module> Config.get(key, 'ics_url'), File "./ics2owncloud.py", line 33, in do_import c = Calendar.from_ical(requests.get(ics_url).text) File "/usr/lib64/python2.7/site-packages/icalendar/cal.py", line 367, in from_ical '{st!r}'.format(**locals())) ValueError: Found no components where exactly one is required: u''
What's going wrong?
I exported my outlook calendar (just free/busy status) into ics file. In exported ics file status is in Polish (zajęty for busy). When I import it with your script, the calendar item is stored as busy (translated into English). The same ics file imported via gui gives calendar items in my local language.
This script should probably be converted to support Python3?
Anyone?
If run the script i get the error:
HTTPError: 404 Client Error: Not Found for url: https://<cloud>:<port>/owncloud/remote.php/dav/calendars/<user>/<calendar>?export Traceback (most recent call last): File "./ics2owncloud.py", line 78, in <module> Config.get(key, 'ics_url'), File "./ics2owncloud.py", line 22, in do_import r.raise_for_status() File "/opt/ics2owncloud/venv/local/lib/python2.7/site-packages/requests/models.py", line 840, in raise_for_status raise HTTPError(http_error_msg, response=self)
What went wrong?
Thanks for your script!
I ran into problems, as my certificate is self-signed.
As I don't know how python stores certificates I simply inserted
the option verify=False for all requests. Perhaps you could integrate a config-option?
Best regards,
Thomas
Hi!
In order for your script to work for me I hat to change the URL to owncloud
Before:
CALDAVURL = '%sremote.php/dav/calendars/%s/%s'
After:
CALDAVURL = '%sremote.php/caldav/calendars/%s/%s'
Thanks for your script! I used the same php script as you :-D
Does this script also wipe the calendar before it imports the new events?
This was a feature from Georg's script and would be needed by me.
Thanks for your script. I'm running this to sync a ms outlook calendar with owncloud 9 and I'm getting this error:
File "ics2owncloud.py", line 46 if r.status_code == 500 and 'Sabre\VObject\Recur\NoInstancesException' in r.text: ^ SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 19-20: malformed \N character escape
Any ideas?
I disagree with the "THIS SCRIPT IS DEPRECATED." mention in the project's README.md
, you can indeed now subscribe to an external ICS URL via the OwnCloud calendar and import it regularly, but one feature that is lacking is that this "imported calendar" is not available via CalDAV for syncing with other devices (Smartphone for example).
And this is precisely where your script comes in handy, since the ICS is imported into an existing calendar that can then be synced to other devices, which is exactly what I need :)
Hello,
I use your software together with ownCloud 9.1 and Calendar 1.3.1 . But somehow when I run your script nothing happens, not even an error is shown up. How can I tell what happens, can you please make your script a bit more verbose?
rgds schabi
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.