This application serves as a relay between an ics provider (through HTTP) and an application, it remove blacklisted elements from the calendar before sending it back.
Currently, it's hard configured to cache for 60 seconds a fetch from source ics for performance reason and to prevent source of DDoS.
SOURCE_ICS: HTTP/HTTPS url to your ics provider (e.g.
https://chronosvenger.me/?classe=GISTRE.ics)ICS_BLACKLIST_FILE: Path where the blacklist file will be
read or saved.You can test it by invoking ics_filter/ics_filter.py serve which will deploy
an http.server bind to 0.0.0.0:8000 (hardcoded values).
Warning: This must not be used in production.
You can get an wsgi application with create_app() function or the module
variable wsgi, the easiest way to use production WSGI server such as for
example
Waitress
or Gunicorn.
Examples:
gunicorn \
--env 'SOURCE_ICS=https://chronosvenger.me/?classe=GISTRE.ics' \
--env 'ICS_BLACKLIST_FILE=.calendar-blacklist' \
--access-logfile - -b 0.0.0.0:8000 'ics_filter:wsgi'
https://hub.docker.com/r/synapzee/ics-filter
By default, the blacklist file will be stored at
/opt/ics_filter/ics-events-blacklist.
Example on how to use:
Create in your host /opt/ics_filter which will be used to make the blacklist persistent. To start ics-filter, will be served inside with Gunicorn and exposed by the port 8000:
docker run -d --name ics-filter \
-v /opt/ics_filter:/opt/ics_filter \
-p 8000:8000 \
-e SOURCE_ICS='<your_ics_source>' \
synapzee/ics-filter
Note: Please avoid binding it to 0.0.0.0, but prefer something like -p 127.0.0.1:8000:8000.
Add or remove events in blacklist:
docker run -it \
-v /opt/ics_filter:/opt/ics_filter \
-e 'SOURCE_ICS=<your_ics_source>' \
synapzee/ics-filter \
ics-filter manage-blacklist
Note: You must restart your docker instance for changes to take effects.
Content type
Image
Digest
Size
47 MB
Last updated
over 5 years ago
docker pull synapzee/ics-filter