Code Monkey home page Code Monkey logo

open-web-calendar's Introduction

Open Web Calendar

Build Status Support on Open Collective Try it out build and publish the Docker image

Python: 3.7, 3.8, 3.9, 3.10

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, ...)

Deployment

You can deploy the app using Heroku. There is a free plan.

Deploy

Heroku uses gunicorn to run the server, see the Procfile.

Environment Variables - Configuration

These environment variables can be used to configure the service:

  • APP_DEBUG default true, values true or false, always false in the Docker container Set the debug flag for the app.
  • PORT default 5000, default 80 in the Docker container
    The port that the service is running on.
  • WORKERS default 4 only for the Docker container
    The number of parallel workers to handle requests.
  • CACHE_REQUESTED_URLS_FOR_SECONDS default 600
    Seconds to cache the calendar files that get downloaded to reduce bandwidth and delay.

Docker

To build the container yourself type the command

docker build --tag niccokunzmann/open-web-calendar .

You can also use the existing image.

docker run -d --rm -p 5000:80 niccokunzmann/open-web-calendar

Then, you should see your service running at http://localhost:5000.

Docker Compose

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:

  1. Copy the docker-compose.yml file to the directory from where you want to run the container.
  2. If needed change port mapping and environment variables.
  3. Type docker-compose up -d to start the container.
  4. The container will be pulled automatically from dockerhub and then starts.

Update prebuild image with Docker Compose

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)

Vercel

You can create a fork of this repository which automatically deploys to Vercel:

Deploy

Alternatively you can create a one off deploy by cloning this repository and running npx vercel at the root.

Research

Hosts

Sources/Libs

Search Terms

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

Software Components

Development

  1. Optional: Install virtualenv and Python3 and create a virtual environment.
    virtualenv -p python3 ENV
    source ENV/bin/activate
    
  2. Install the packages.
    pip install -r requirements.txt
    
  3. Start the app.
    python3 app.py
    

For the configuration of the app through environment variables, see the app.json file.

Running Tests

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

Updating Dependencies

We use pip-compile to guarantee a tested deployment by fixing all the dependencies to a specific version.

You can update the packages to the latest version:

rm requirements.txt test-requirements.txt
pip install --upgrade pip-tools -r requirements.in -r test-requirements.in
pip-compile -o requirements.txt requirements.in
pip-compile -o test-requirements.txt test-requirements.in

And run the tests:

tox

Changelog

  • 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
  • v1.1
    • Add Coatian Language by Tomislav Gomerčić
  • v1.0

Related Work

open-web-calendar's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.