Skip to content

A docker container that will publish Sonarr and Radarr's release calendar to Discord + Slack on a weekly/daily basis

License

Notifications You must be signed in to change notification settings

khw315/calendarr

 
 

Repository files navigation

Docker Pulls GitHub Release GitHub last commit

📆 Calendarr

A simple Docker container that fetches upcoming airings/releases for TV shows and movies from Sonarr and Radarr calendars and posts them to Discord on a schedule.

Note

This repository is a fork of jordanlambrecht/calendarr.

Example Discord post

✨ Features

  • Web UI: Beautiful dashboard to view upcoming events, trigger manual runs, and view configuration.
  • Consolidated Feed: Combines multiple Sonarr and Radarr calendar feeds into one summary.
  • Smart Grouping: Groups shows and movies by day of the week for easy reading.
  • Flexible Scheduling: Runs on a customizable schedule (Daily or Weekly) or Cron expression.
  • Multi-Platform: Supports both Discord and Slack notifications.
  • Localization: Native support for English (EN), Korean (KO), Japanese (JA), and Indonesian (ID).
  • Dynamic Timezones: Automatically adapts to your configured timezone.
  • Highly Customizable: Configure headers, footers, timestamp styles, and more.

🌐 Web UI

Calendarr now includes a modern Web UI for easy management and visualization!

Accessing the Web UI

Once your container is running, access the Web UI at:

http://localhost:5000

Or if running on a remote server:

http://YOUR_SERVER_IP:5000

Web UI Features

  • 📊 Dashboard: View statistics including upcoming events count, next scheduled run, and schedule type
  • 📅 Calendar View: See all upcoming TV shows and movies grouped by day with color-coding
  • ⚡ Manual Trigger: Run the calendar job on-demand with a single click
  • ⚙️ Configuration Viewer: View all current settings and platform configurations
  • 🔄 Auto-Refresh: Events automatically refresh every 60 seconds
  • 🎨 Modern Design: Premium UI with glassmorphism effects and smooth animations

Web UI Screenshot #1 Web UI Screenshot #2

🚀 Getting Started

Available via ghcr.io/khw315/calendarr:latest.

🐳 With Docker Compose (Recommended)

  1. Create a .env file with your configuration (see Configuration below).
  2. Create a docker-compose.yml:
services:
  calendarr:
    image: ghcr.io/khw315/calendarr:latest
    container_name: calendarr
    restart: unless-stopped
    ports:
      - "5000:5000"  # Web UI
    volumes:
      - ./logs:/app/logs:rw
    env_file: .env
    environment:
      - TZ=Asia/Seoul
  1. Run it:
docker compose up -d

⌨️ With Docker CLI

docker run -d \
  --name calendarr \
  -e DISCORD_WEBHOOK_URL="https://discord.com/api/webhooks/..." \
  -e CALENDAR_URLS='[{"url":"https://sonarr.example.com/feed/calendar/api.ics","type":"tv"},{"url":"https://radarr.example.com/feed/calendar/api.ics","type":"movie"}]' \
  -e TZ="Asia/Seoul" \
  ghcr.io/khw315/calendarr:latest

🏃‍➡️ To Run Offschedule

  1. Start the container via the compose file with docker compose up -d
  2. Use the command docker exec -it calendarr python src/main.py

🛠️ Configuration

Configure the application using environment variables in your .env file or Docker compose.

Variable Type Default Description
CALENDAR_URLS * JSON [] JSON array of calendar URLs and types. Example: [{"url":"http://...","type":"tv"}, {"url":"http://...","type":"movie"}]
DISCORD_WEBHOOK_URL ** String "" Discord webhook URL.
SLACK_WEBHOOK_URL *** String "" Slack webhook URL.
TZ String UTC Timezone (e.g., Asia/Seoul).
APP_LANGUAGE String EN Language for generated messages. Options: EN, KO, JA, ID.
SCHEDULE_TYPE String WEEKLY DAILY or WEEKLY.
RUN_TIME Time 09:00 Time to run the job (HH:MM).
DISCORD_TIMESTAMP_STYLE String Relative Time Discord only Style for timestamps. Options: Short Time, Long Time, Short Date, Long Date, Short/Long Date/Time, Relative Time.
CUSTOM_HEADER String New Releases Custom header text for the notification.
DISPLAY_TIME Boolean true Display the release time next to events.
SHOW_DATE_RANGE Boolean true Show the date range in the header.
SHOW_TIMEZONE_IN_SUBHEADER Boolean false Show the configured timezone in the subheader.
USE_24_HOUR Boolean true Use 24-hour time format.
ADD_LEADING_ZERO Boolean true Add leading zero to single-digit hours.
DEDUPLICATE_EVENTS Boolean true Remove duplicate events from multiple sources.
PASSED_EVENT_HANDLING String DISPLAY How to handle past events: DISPLAY, HIDE, STRIKE.
CRON_SCHEDULE Cron None Custom CRON expression (Overrides simple scheduling).
ENABLE_CUSTOM_DISCORD_FOOTER Boolean false Enable custom footer for Discord messages.
ENABLE_CUSTOM_SLACK_FOOTER Boolean false Enable custom footer for Slack messages.
DEBUG Boolean false Enable debug logging.

* Required. ** Required if USE_DISCORD is true (default). *** Required if USE_SLACK is true.

🤝 Obtaining Calendar URLs

Sonarr / Radarr

  1. Go to Settings > General.
  2. Copy your API Key.
  3. Construct your URL:
    • Sonarr: http://YOUR_HOST:8989/feed/v3/calendar/Sonarr.ics?apikey=YOUR_API_KEY
    • Radarr: http://YOUR_HOST:7878/feed/v3/calendar/Radarr.ics?apikey=YOUR_API_KEY

Alternatively, use the "Calendar > iCal Link" button in the UI (ensure no tags/filters are selected).

✍️ Custom Footers

You can inject custom markdown into the footer of your messages.

  1. Set ENABLE_CUSTOM_DISCORD_FOOTER=true (or Slack equivalent).
  2. Mount a volume to /app/custom_footers:
    volumes:
      - ./custom_footers:/app/custom_footers:rw
  3. Edit the generated discord_footer.md or slack_footer.md in that directory.

🚧 Development

To build the container locally:

git clone https://github.com/khw315/calendarr.git
cd calendarr
docker build -t calendarr .

🧑‍💻 Contributing

Contributions are welcome!

  • Localization: Help us translate Calendarr into more languages by adding to src/data/locales.json.
  • Features: Submit PRs for new platform integrations or improvements.

🧑‍⚖️ License

GNU General Public License v3.0

About

A docker container that will publish Sonarr and Radarr's release calendar to Discord + Slack on a weekly/daily basis

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Python 79.7%
  • JavaScript 7.8%
  • CSS 7.2%
  • HTML 4.1%
  • Other 1.2%