Skip to content

KingOfKalk/icsmerger

Repository files navigation

ICS Merger

A script to download and merge multiple online ICS resources into one ICS.

CI-QA-Pipeline Docker Image CI CodeQL

Run

There are threw ways to run this script. Call the console script, via Python or using Docker.

Requirements

  • Python >= 3.10

Console script

icsmerger

Python

python -m icsmerger

Docker

docker pull ghcr.io/kingofkalk/icsmerger:latest
docker run ghcr.io/kingofkalk/icsmerger:latest

Usage

Show help message

icsmerger -h

Ignore HTTP errors

With this option HTTP status codes equals or greater 400 are ignored. Otherwise script will exit with error code 1.

icsmerger --ignore-http-errors https://returns-500.com/one.ics https://returns-401.com/one.ics

Output to stdout

icsmerger https://url.to/one.ics https://url.to/second.ics

Save to a file

icsmerger https://url.to/one.ics https://url.to/second.ics --out new.ics

Docker

Entrypoint

The entprypoint for the Docker version of icsmerger is the script itself.

Just running the container will show the help message.

docker run ghcr.io/kingofkalk/icsmerger:latest

Example

The following example command will run the icsmerger directly and the result will be show via stdout.

docker run ghcr.io/kingofkalk/icsmerger:latest https://example.com/demo1.ics https://example.com/demo2.ics

Direcotry structure

/app/output is the working directory of the iamge. With this you do not rely on stdout when merging ICS in a Docker setup.

Example

The following example will create a merged ics file called demo.ics in the current working directory.

docker run -v ./demo:/app/output icsmerger:latest -o demo.ics https://example.com/demo1.ics https://example.com/demo2.ics

Development

Install required packages.

pip install -r requirements.txt
pip install -r requirements_dev.txt

In directory tests you will find the unit tests.

Run tests

This project uses pytest. Everything is already setup. See pyproject.toml. Also code coverage reports a generated by default.

pytest

About

A script to download and merge multiple online ICS resources into one ICS.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 2

  •  
  •