Giter VIP home page Giter VIP logo

contactsbdaycalendar's Introduction

ContactsBDayCalendar

This is a simple script to add birthday events of your carddav contacts to your caldav calendar.

Usage

Command Line

Nextcloud

python birthday_calendar.py --contacts_url https://HOST/remote.php/dav/addressbooks/users/USER/contacts/ --calendar_url https://HOST/remote.php/dav/calendars/USER/CALENDAR/ --user USER --password PASSWORD

Radicale

python birthday_calendar.py --contacts_url https://HOST/USER/ADDRESSBOOK-UID/ --calendar_url https://HOST/USER/CALENDAR-UID/ --user USER --password PASSWORD

Docker

You can also run this script in a Docker container

docker run ghcr.io/adi146/contacts_bday_calendar:latest --contacts_url https://HOST/remote.php/dav/addressbooks/users/USER/contacts/ --calendar_url https://HOST/remote.php/dav/calendars/USER/CALENDAR/ --user USER --password PASSWORD

Or with environment variables

docker run --env WEBDAV_CONTACTS_URL=https://HOST/remote.php/dav/addressbooks/users/USER/contacts/ --env WEBDAV_CALENDAR_URL=https://HOST/remote.php/dav/calendars/USER/CALENDAR/ --env WEBDAV_USER=USER --env WEBDAV_PASSWORD=PASSWORD ghcr.io/adi146/contacts_bday_calendar:latest

contactsbdaycalendar's People

Contributors

adi146 avatar

Watchers

 avatar

Forkers

imochoa

contactsbdaycalendar's Issues

Not working with Baikal server

Hello, I tried to use this script but got an error. The server configuration was tested with davx5, and the credentials are working. Is it work with Baikal server?

My command:

docker run --env WEBDAV_CONTACTS_URL=https://baikal.example.com/dav.php/addressbooks/alex/default/ --env WEBDAV_CALENDAR_URL=https://baikal.example.com/dav.php/calendars/alex/contact-bdays/ --env WEBDAV_USER=alex --env WEBDAV_PASSWORD=mypassword ghcr.io/adi146/contacts_bday_calendar:latest

Logs:

Traceback (most recent call last):
  File "//birthday_calendar.py", line 40, in <module>
    for vcf_file in contacts_client.list('/'):
  File "/usr/local/lib/python3.10/site-packages/webdav3/client.py", line 67, in _wrapper
    res = fn(self, *args, **kw)
  File "/usr/local/lib/python3.10/site-packages/webdav3/client.py", line 264, in list
    response = self.execute_request(action='list', path=directory_urn.quote())
  File "/usr/local/lib/python3.10/site-packages/webdav3/client.py", line 230, in execute_request
    raise ResponseErrorCode(url=self.get_url(path), code=response.status_code, message=response.content)
webdav3.exceptions.ResponseErrorCode: Request to https://baikal.example.com/dav.php/addressbooks/alex/default/ failed with code 401 and message: b'<?xml version="1.0" encoding="utf-8"?>\n<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">\n  <s:sabredav-version>4.6.0</s:sabredav-version>\n  <s:exception>Sabre\\DAV\\Exception\\NotAuthenticated</s:exception>\n  <s:message>No \'Authorization: Digest\' header found. Either the client didn\'t send one, or the server is misconfigured. Login was needed for privilege: {DAV:}read on addressbooks/alex/default</s:message>\n</d:error>\n'

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.