Tool that synchronizes Jekyll event collection with remote calendar
Project description
Calendar synchronization
This is a small tool that can be used to synchronize a Jekyll event collection with a remote calendar.
Installation
Use Python package manager
pip install twomartens.calendarsync
Afterwards you can use tm-calendarsync
to access the CLI interface. If you installed
the package into a virtual environment, this environment needs to be activated. Otherwise
the tm-calendarsync
command will not be known.
Usage
tm-calendarsync calendar_url event_collection_path
The CLI interface validates the input and guarantees that the URL is valid and the directory of the event collection exists. It however does not make logical checks. So you need to make sure that the directory is actually the correct one. The URL for the calendar must be readable without authentication and point to an ICS file.
If the input is correct the tool will go through ALL events of the calendar and create files in the event collection directory. The filename of these is as follows:
YYYY-MM-DD-title.markdown
where all spaces in the title are replaced by underscores (_
).
The content of these files follows this structure:
# preamble for Jekyll event (this line is not actually written)
---
layout: event
title: <name>
date: <created>
start_date: <begin>
end_date: <end>
location: <location>
---
The full usage of this tool becomes obvious if you create a cronjob or something similar that executes this code every x amount of time.
Note: Even if you run this as a cronjob it will not yet result in any visible changes to the Jekyll-powered website. You will need to trigger the build yourself in whatever way makes sense to you.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file twomartens.calendarsync-1.1.0.tar.gz
.
File metadata
- Download URL: twomartens.calendarsync-1.1.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 778c77b2ad26d8db7371624d7c8cb1050031a59e5f9be92721990ada04615e51 |
|
MD5 | f76b91a49c16ffcd50ead107982d9048 |
|
BLAKE2b-256 | 368990e9a0a1bb05a67d38f6650ad74c4a6e4330497a3431c7cf4d6e724a35e2 |
File details
Details for the file twomartens.calendarsync-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: twomartens.calendarsync-1.1.0-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f128227f32ab585e8f081ab4e3a22401f6d03581934d267da49d2f7f97ef831c |
|
MD5 | 910cbce3601839e20405d73013dfd777 |
|
BLAKE2b-256 | 739291ec996bfcfbc013051047ccf912ebdfda893eac4c1cb32a563b916105a4 |