Skip to main content

Convert ICAL/ICS files into Emacs org-mode format.

Project description

ical2orgpy

This script converts an ical calendar (for instance, as exported from google calendar) into an org-mode document. It is conceived as a replacement of the awk script located here:

http://orgmode.org/worg/org-tutorials/org-google-sync.html

The main difference is that ical2orgpy correctly manages recurring events of “yearly”, “daily” and “weekly” types. ical2orgpy duplicates all recurring events falling into a specified time-frame into the exported org-document.

Installation

The command ical2orgpy is provided by means of python package ical2orgpy.

You can install with pip (preferably into its own into virtualenv):

$ pip install ical2orgpy

Installation with pipx is recommended because this will manage the virtualenv for you.

Installing from source code

You can install the package directly from git source like this:

$ cd <to project folder>
$ pip install --user .

To use the script, just call:

$ ~/.local/bin/ical2orgpy

Usage

Simply use the ical2orgpy command:

$ ical2orgpy --help

or, if installed locally from the git repo:

$ ~/.local/bin/ical2orgpy --help

The script requires two files, the input ics and the output org document. Usually, ical2orgpy is called within a script that grabs the ical file from some source (i.e. Google Calendar), and generates the appropriate org document. Such an script would have the following shape:

#!/bin/bash

# customize these
WGET=<path to wget>
ICS2ORG=<path to ical2org>
ICSFILE=$(mktemp)
ORGFILE=<path to orgfile>
URL=<url to your private Google calendar>

# no customization needed below

$WGET -O $ICSFILE $URL
$ICS2ORG $ICSFILE $ORGFILE
rm -f $ICSFILE

See further instructions here:

http://orgmode.org/worg/org-tutorials/org-google-sync.html

Development

Clone the repository and cd into it.

Create a virtualenv and install dependencies:

$ pip install .
$ pip install -r test_requirements.txt

Run tests to check everything is working:

$ pytest

You can also use tox to create the virtualenv e.g.:

$ tox -e py39

Then activate the virtualenv:

$ source .tox/py39/bin/activate
(py39)$

And use the package.

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

ical2orgpy-0.5.tar.gz (26.9 kB view details)

Uploaded Source

Built Distribution

ical2orgpy-0.5-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file ical2orgpy-0.5.tar.gz.

File metadata

  • Download URL: ical2orgpy-0.5.tar.gz
  • Upload date:
  • Size: 26.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5

File hashes

Hashes for ical2orgpy-0.5.tar.gz
Algorithm Hash digest
SHA256 57cd27d0aa07ea475b47402e956d10a40c60aed3356ada820645d82fd1894a28
MD5 9c743d9be06ba0257c83b212d57101bb
BLAKE2b-256 d99d35b6c9fe4beb45ae558273871dc59f4d7cf460df58b0b1cf1c314f5bfad6

See more details on using hashes here.

File details

Details for the file ical2orgpy-0.5-py3-none-any.whl.

File metadata

  • Download URL: ical2orgpy-0.5-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5

File hashes

Hashes for ical2orgpy-0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 240b9b82920a73e2448c4e6512025803a8f0c2d52a4c3a1907362e464e02fe5a
MD5 b0dd9802eabdde1b19a7a60b5512c3aa
BLAKE2b-256 c3eea34106301f0a889a31c2ba3ea3b16091828084b8e558de9cb7ca997f9380

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page