Giter VIP home page Giter VIP logo

ics2owncloud.py's Introduction

ics2owncloud.py

This script downloads iCal files and imports them to ownCloud using CalDAV.

Pull requests welcome!

Important note

The calendar app supports calendar subscriptions for some time now. However these calendars can't be sync'd to your devices. If you need this you can still use this script to import events to "normal" calendars that are available for sync'ing.

Requirements

Just make sure the virtualenv command is in $PATH when running ics2owncloud.sh. icalendar and Requests are installed automatically.

Installation

$ git clone https://github.com/buzz/ics2owncloud.py.git

Configuration

Configuration file

Create and edit config file:

cp ics2owncloud.ini.example ~/.ics2owncloud.ini

A config file with two entries looks like this:

[DEFAULT]
username: tom
password: 123456
server: https://cloud.example.com/

[import_a]
calendar: calendar_xy
ics_url: https://USER1:[email protected]/index.php/apps/calendar/export.php?calid=6

[import_b]
calendar: facebook
ics_url: https://www.facebook.com/ical/u.php?uid=10000123456789&key=ABCDEFGHIJKL
  • username - ownCloud user
  • password - ownCloud password
  • server - ownCloud server URL
  • calender - ownCloud calendar name
  • ics_url - URL to the ICS file to download (can have username:password format)

Don't forget to protect your config file:

$ chmod 600 ~/.ics2owncloud.ini

Cron job

A cron job comes in handy to periodically import calendars:

$ crontab -e

This runs the script every 30 minutes:

*/30 * * * * /PATH/TO/ics2owncloud.sh >/dev/null

ics2owncloud.py's People

Contributors

buzz avatar canoine avatar lasse-it avatar maxqia avatar mossroy avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.