Sign inSign up

phoen1qz/ftcaldav

By phoen1qz

•Updated about 1 year ago

Sync subscribed events on 42intra to your caldav calendar.

Image
0

299

phoen1qz/ftcaldav repository overview

⁠ftcaldav

Docker Pulls License: MPL 2.0

This service regularly grabs the events you subscribed to on 42⁠'s intra and puts them into the CalDAV endpoint specified. It is intended as a self-hosted service, is configured via environment variables and has a docker image⁠.

⁠Prerequisites

ftcaldav needs an API key, as well as an API secret in order to access intra.

To get API credentials, from the intra dashboard go to Settings > API > Register a new app.

Set all the properties as you wish. ftcaldav does not need any additional scopes besides Access the user public data

⁠Installation

Installation works through docker. You can get the image here⁠. I suggest using docker compose. The configuration below shows the minimum amount of environment variables you need to set in order to get this thing running. Additional configuration options will be discussed in the "configuration" section

services:
  ftcaldav:
    image: phoen1qz/ftcaldav:latest
    restart: unless-stopped
    container_name: "ftcaldav"
    network_mode: host
    read_only: true
    security_opt:
      - no-new-privileges:true
    cap_drop:
      - ALL
    environment:
      - FT_CLIENT_ID=XXXX
      - FT_CLIENT_SECRET=XXXX
      - FT_USER_NAME=lemon
      - UPDATE_INTERVAL_MINUTES=42
      - CALDAV_ENDPOINT_URL=https://mydoma.in/user/calendar
      - CALDAV_USERNAME=lemon
      - CALDAV_PASSWORD=diesel

⁠Configuration

All the environment variables available to configure ftcaldav.

⁠Mandatory

⁠FT_CLIENT_ID

The API client id used to access intra


⁠FT_CLIENT_SECRET

The API client secret used to access intra


⁠FT_USERNAME

Your intra username (The username you use to login)


⁠CALDAV_USERNAME

The username of your CalDAV account. Only basic authentication⁠ is supported.


⁠CALDAV_PASSWORD

The password of your CalDAV account. Only basic authentication⁠ is supported.


⁠CALDAV_ENDPOINT_URL

The endpoint of your calendar. This depends on the CalDAV server you use. On Radicale, it might besomething like this: https://yourdomain.com/yourusername/13b1e762-d5f1-7317-3ac4-f229f8f4e835/⁠


⁠UPDATE_INTERVAL_MINUTES

The amount of time that should pass in between synchronizations, in minutes. Beware of 42's rate limit⁠!

⁠Optional

⁠EVENT_DEFAULT_STATUS (optional) [RFC]⁠

Default: CONFIRMED

The participation status ftcaldav should apply by default. Although this can technically be any string of text, I'd suggest one of the following:

  • CONFIRMED
  • TENTATIVE
  • CANCELLED

⁠EVENT_DEFAULT_TIME_TRANSPARENCY (optional) [RFC]⁠

Default: OPAQUE

Default time transparency ftcaldav should apply. Opaque means you're busy, transparent means you're available. Although this can technically be any string of text, I'd suggest one of the following:

  • OPAQUE
  • TRANSPARENT

⁠EVENT_DEFAULT_COLORS (optional) [RFC]⁠

Default: Events will not be colored by default.

String of key-value pairs. The format is event_kind:color; , where event_kind is one of the event types listed below and color is a given CSS3 color name⁠.

Event types (or more correctly, kinds):

  • association
  • challenge
  • conference
  • event
  • exam
  • extern
  • hackathon
  • meet
  • meet_up
  • other
  • partnership
  • pedago
  • piscine
  • rush
  • speed_working
  • workshop

Important

You **DO NOT** have to specify a color for *every* event type. When a certain event type does not have a corresponding

color in the config, events of that type will be left uncolored.

Tip

[This great tool](https://wismuth.com/webcolors.html) can come in handy if you want to find the closest named color to a given HEX/RGB value.

Tip

Here is a preset that mimics the colors used in the calendar on the intra dashboard: ``` EVENT_DEFAULT_COLORS="association:Teal;event:Indigo;exam:Black;extern:YellowGreen;hackathon:YellowGreen;meet_up:IndianRed;piscine:SeaGreen;>workshop:OliveDrab" ```

⁠LOGGER_OUTPUT (optional)

Default: ftcaldav logs to stdout.

Has to be a valid path to a file.


⁠LOGGER_USE_COLOR (optional)

Default: true.

Sets if the logger should produce colored output. Can be true or false.

Tag summary

Content type

Image

Digest

sha256:f961398e0…

Size

319.4 MB

Last updated

about 1 year ago

docker pull phoen1qz/ftcaldav