Site icon naschenweng.eu

๐Ÿ“… Sync ICS Feeds to Your CalDAV Calendar with Emojis, Deduplication, and Docker

If youโ€™re like me and obsessively track everything โ€” from Austrian public holidays to Formula 1 races and even trash pickup days โ€” you know how painful it can be managing all of that across calendars.

So I built a simple solution: a Python-based tool that syncs ICS feeds directly into a CalDAV calendar (like mailbox.org), complete with:

๐ŸŽฅ Check out the console output in action


๐Ÿ’ก Why I Built This

There are lots of calendar tools, but none let me do exactly what I wanted:

It started as a quick utility for my own use. Now itโ€™s open source and available for anyone to use!


๐Ÿ› ๏ธ Features at a Glance


๐Ÿ”ง How It Works

  1. Loads your config.json with ICS feeds and emoji mappings
  2. Connects to your CalDAV calendar (e.g., mailbox.org)
  3. Checks for duplicate events using a unique hash-based UID
  4. Applies emoji mappings to the event title
  5. Filters events based on date range and, if set, import_locations
  6. Imports events, replacing duplicates if needed

You can even preview everything with:

docker-compose run --rm calendar-sync --import --dry-run

โœ๏ธ Example Config

{
  "caldav_url": "https://dav-sso.mailbox.org/caldav/...",
  "username": "you@mailbox.org",
  "password": "your-app-password",
  "timezone": "Europe/Vienna",
  "uid_prefix": "ICS-",
  "future_event_limit_days": 365,
  "ics_feeds": [
    {
      "url": "https://example.com/feiertage.ics",
      "import_locations": "K,St",
      "emoji_mapping": {
        "ยง": "๐Ÿ‡ฆ๐Ÿ‡น",
        "default": "๐Ÿ—“๏ธ"
      }
    }
  ]
}

If you set "import_locations": "K,St", the log output will show you which events are skipped due to unmatched regions like this:

INFO: โญ๏ธ Skipping 'St. Florian' (2025-05-04) due to unmatched location: Oร–

๐Ÿงช Use on Synology or Server

I run this on my Synology via a scheduled task:

cd /volume2/docker/appdata/calendar-sync
docker-compose run --rm calendar-sync --cleanup
docker-compose run --rm calendar-sync --import

Runs every day at 01:00 ๐Ÿ• โ€” and my calendar is always up to date.


๐Ÿ“ฆ Where to Get It

Youโ€™ll find the source, Dockerfile, instructions and everything here:
๐Ÿ‘‰ GitHub โ€“ magicdude4eva/calendar-sync


๐Ÿค Support & Contributions

This project is MIT-licensed and open to PRs, ideas, or feedback.
If you found this useful, consider supporting my work:


๐Ÿบ Pay it forward:ย If any of my content helped you in any way, send me some coins:
(CRO)    0xBAdB43af444055c4031B79a76F74895469BA0CD7 (Cronos)
(USDC)   0xBAdB43af444055c4031B79a76F74895469BA0CD7
(ETH)    0xfc316ba7d8dc325250f1adfafafc320ad75d87c0
(BTC)    1Mhq9SY6DzPhs7PNDx7idXFDWsGtyn7GWM
(BNB)    0xfc316ba7d8dc325250f1adfafafc320ad75d87c0
Crypto.com PayString: magicdude$paystring.crypto.com	

๐Ÿš€ Use my referral link https://crypto.com/app/ref6ayzqvp to sign up for Crypto.com and we both get $25 USD ๐Ÿ˜ธ

๐Ÿงจ During signup use my referral code ref6ayzqvp to claim your reward ๐Ÿงจ
Go to Curve.com to add your Crypto.com card to ApplePay (get 1% cashback)


Exit mobile version