You might want to:
- Try it out
- Donate using Open Collective
- Fund specific issues with Polar
- Donate using GitHub Sponsors
- See other ways of contributing
Python: 3.8, 3.9, 3.10, 3.11, 3.12
There are several commercial solutions which allow embedding of calendars into my website. I only have a link to an ICS file and want to show a nice-looking calendar on my site. Browser-only calendars usually have the problem that many ICS files can not be accessed (such as ownCloud/nextCloud in my case). I also want to be in control over who knows the people who visit the site and not pass everything to Google. This is a solution in my case which I share with the world. You are free to use it or deploy your own, modify or share it. It works offline and in company networks, too.
Features
- Embedded calendar
- Choice of time zone
- ICS link, best multiple
- month/week as a view
- name, time of event, link?
- showing the time span
- styling of choice (icon, color, font, ...)
There are several ways in which you can help this project:
- Use it and report errors
- Donate using Open Collective
- Fund specific issues with Polar
- Donate using GitHub Sponsors
- Translate this project
- Have a look at open issues e.g. those especially to get started, labelled good first issue, leave a note and work on it.
You can help us by translating the project to your language. If your language is not listed, please request to add it!
Here, you can see the current translation status:
There are several ways to deploy the open-web-calendar.
These environment variables can be used to configure the service:
APP_DEBUG
defaulttrue
, valuestrue
orfalse
, alwaysfalse
in the Docker container
Set the debug flag for the app.PORT
default5000
, default80
in the Docker container
The port that the service is running on.WORKERS
default4
only for the Docker container
The number of parallel workers to handle requests.CACHE_REQUESTED_URLS_FOR_SECONDS
default600
Seconds to cache the calendar files that get downloaded to reduce bandwidth and delay.
The Open Web Calendar can be used to access the local network behind a firewall,
see Issue 250.
This free access is intended to show calendars from everywhere.
Since requests
is used by the Open Web Calender,
it can use a proxy as described in the
requests
documentation.
The proxy can then handle the filtering.
export HTTP_PROXY="http://10.10.1.10:3128"
export HTTPS_PROXY="http://10.10.1.10:1080"
export ALL_PROXY="socks5://10.10.1.10:3434"
See also:
To build the container yourself type the command
docker build --tag niccokunzmann/open-web-calendar .
You can also use the existing image: niccokunzmann/open-web-calendar.
docker run -d --rm -p 5000:80 niccokunzmann/open-web-calendar
Then, you should see your service running at http://localhost:5000.
The container niccokunzmann/open-web-calendar:latest
contains the latest release.
Containers are also tagged with the version from the changelog, e.g.
niccokunzmann/open-web-calendar:v1.10
.
If you wish to run the latest development version, use niccokunzmann/open-web-calendar:master
.
This includes unchecked translations.
Using pre-build Dockerhub image with docker-compose
version: '3'
services:
open-web-calendar:
image: niccokunzmann/open-web-calendar
ports:
- '80:80'
environment:
- WORKERS=4
restart: unless-stopped
To deploy the open-web-calendar with docker-compose, do the following steps:
- Copy the
docker-compose.yml
file to the directory from where you want to run the container. - If needed change port mapping and environment variables.
- Type
docker-compose up -d
to start the container. - The container will be pulled automatically from dockerhub and then starts.
Important Note: If you use this service, consider setting up log rotation as it is very talkative.
If you want to update your image with the latest version from Dockerhub type docker-compose pull
.
Note: You need to start the container after pulling again in order for the update to apply (docker-compose up -d
)
The Open Web Calendar can be configured to use a proxy to request .ics
and other files. The following example shows the usage of a Tor proxy.
You can try it out at
tor.open-web-calendar.hosted.quelltext.eu.
version: '3'
services:
tor-open-web-calendar:
image: niccokunzmann/open-web-calendar:master
restart: unless-stopped
environment:
# use socks5h for *.onion
# see https://stackoverflow.com/a/42972942/1320237
- HTTP_PROXY=socks5h://tor-socks-proxy:9150
- HTTPS_PROXY=socks5h://tor-socks-proxy:9150
- ALL_PROXY=socks5h://tor-socks-proxy:9150
# optional: create a private network so OWC cannot access the Internet directly
networks:
- no-internet-only-tor
# from https://hub.docker.com/r/peterdavehello/tor-socks-proxy/
tor-socks-proxy:
image: peterdavehello/tor-socks-proxy # use :test for arm64
restart: unless-stopped
# optional: allow access to OWC and the Internet
networks:
- default
- no-internet-only-tor
networks:
default:
ipam:
driver: default
no-internet-only-tor: # see https://stackoverflow.com/a/51964169/1320237
driver: bridge
internal: true
The configuration above prevents access to the internal network as the
requests are sent over the Tor network.
A bonus feature is that calendars can be accessed and hosted as a
Tor Hidden Service using an .onion
address.
E.g. a calendar file can be served from a Raspberry Pi behind a home
network's firewall.
This example calendar uses this onion address.
You can create a fork of this repository which automatically deploys to Vercel:
Alternatively you can create a one off deploy by cloning this repository and running npx vercel
at the root.
You can deploy the app using Heroku.
Heroku uses gunicorn to run the server, see the Procfile.
The Open Web Calendar has been integrated into Cloudron.
- https://serverfault.com/questions/142598/open-source-web-application-for-viewing-ics-calendars
- https://stackoverflow.com/questions/300849/html-viewer-for-ics-ical-files
- https://phpicalendar.net
- https://icalendar.readthedocs.io/
- https://github.com/rianjs/ical.net
- https://web.archive.org/web/20210201222328/https://stackoverflow.com/questions/4671764/is-there-a-javascript-calendar-that-takes-an-ical-link-as-input-to-display-event
- https://www.webgui.org/content-managers-guide-wiki/calendar
- https://www.quora.com/What-calendars-can-I-embed-in-my-website-that-arent-Google-Calendar
Hosts
- https://www.chronoflocalendar.com/
- with API: http://www.instantcal.com/api.html
- Wordpress: https://de.wordpress.org/plugins/all-in-one-event-calendar/
Sources/Libs
calendar ics service, ics calendar to html, open source calendar view ical, python Ical, calendar viewer website for ics, open source calendar website, embed calendar into website
- Python3 and the packages in requirements.txt
- DHTMLX scheduler
- python-recurring-ical-events
- Optional: Install virtualenv and Python3 and create a virtual environment.
virtualenv -p python3 ENV source ENV/bin/activate
- Install the packages.
pip install -r requirements.txt
- Start the app.
python3 app.py
For the configuration of the app through environment variables, see the app.json file.
To run the tests, we use tox
.
tox
tests all different Python versions which we want to
be compatible to.
pip install tox
Run all tests:
tox
Run a specific Python version:
tox -e py39
We use selenium to test the app in different browsers. By default, Firefox is used. You can test the features like this:
tox -e web
If you like to change the browser, use
tox -e web -- -D browser=firefox
tox -e web -- -D browser=chrome
You can also change the layout of the window to test the responsive design:
tox -e web -- -D window=375x812 # iPhone11 size
- v1.27
- v1.26
- Use HTML color chooser for custom CSS
- Add a red bar at the current time in the week view and the day view, see PR 265.
- Expose the
hour_format
parameter and add choices for the 12h format, see PR 266. - Update Turkish by oersen, Spanish by gallegonovato and German
- Update dependencies
- Update GitHub Actions with Dependabot
- v1.25
- Update dependencies
- Implement work week view, see Issue 258
- Update translations
- v1.24
- Test and support Python 3.12
- Fix rendering error for unknown/malformed time zones (use DHTMLX's timeshift)
- Improve Indonesian translation by Reza Almanda
- v1.23
- v1.22
- Update dependencies
- v1.21
- v1.20
- Turkish translation by Oğuz Ersen
- Spanish translation by gallegonovato
- Indonesian translation by Reza Almanda
- Update dependencies
- Correct links
- v1.19
- Update dependencies
- v1.18
- Update dependencies
- Update Finnish by Teemu
- Update Slovak by Milan Šalka
- Update Polish by Piotr Strebski
- Update Japanese by onokatio
- v1.17
- Add User-Agent header, see Issue #225.
- Close security vulnerability, Pull Request #223
- Update German, Welsh, Croatian
- v1.16
- Add a dropdown to choose another time zone to view the calendar in the about screen, see Issue #213.
- v1.15
- Update dependencies
- v1.14
- Improve Indonesian translation by Reza Almanda
- Improve Spanish translation by zyloj
- Improve Polish translation by Eryk Michalak
- Update dependencies
- Do not test Python 3.7 any more
- Test Python 3.11
- v1.13
- Improve French translation
- Update dependencies
- v1.12
- Add Croatian UI by Milo Ivir
- v1.11
- Add German UI
- Improve calendar in Polish
- Add Welsh calendar
- v1.10
- Add translations for nb_NO.
- Translate the user interface.
- Use weblate to translate files.
- v1.9
- Speed up loading with start and stop date range. Pull Request #177.
- v1.8
- Add start of day, end of day and time step (hour be default) in Pull Request #158 thanks to @TheoLeCalvar.
- v1.7
- Add timezone functionality. See Issue #171.
- v1.6
- v1.5
- add link to Contributing Section in about page
- make event clickable even if there is a tool tip window
- @MrKoga donated to the project! Thanks!
- v1.4
- add event categories when you click an event, see PR 159.
- v1.3
- update translation mistake
- fix encoding problem for languages other than en/de
- add ability to remove all controls
- test with GitHub actions
- test user interface
- v1.2
- Use Gunicorn in Docker image
- change deployment to https://open-web-calendar.hosted.quelltext.eu/
- v1.1
- Add Coatian Language by Tomislav Gomerčić
- v1.0
- Create the changelog.
- Add support for colors from ICS calendars, see Issue #52 and Pull Request 88.
- Enter your virtual environment. E.g.
source .tox/py39/bin/activate
- Install all dependencies:
pip install --upgrade -r requirements.in -r test-requirements.in pip-tools
- Fix the dependencies:
rm *requirements.txt pip-compile --output-file=requirements.txt requirements.in pip-compile --output-file=test-requirements.txt test-requirements.in
- Create a branch, commit:
git branch -d update git checkout -b update git add *requirements.txt git commit -m"Update dependencies" git push -u origin update
- Create a Pull Request and see if the tests run.
To release a new version:
- Edit the
README.md
file in the Changelog Section and add the changes.git add README.md git commit -m"Modify changelog for release" git push
- Create a tag for the version.
git tag v1.6 git push origin v1.6
- Notify solved issues about the release.
- docker-ics-view and its Docker image - a fork of this project with further improvements
- calender_merger for merging several ICAL files into one
- ical-filter for filtering events in an ICAL file and providing the selection as file
- Wordpress all in one event calendar
- My Mailbox Calendar