org2ical


Nameorg2ical JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://github.com/j3soon/org2ical
SummaryGenerate a iCalendar (.ics) file based on a OrgMode (.org) file.
upload_time2023-01-22 12:38:38
maintainer
docs_urlNone
authorJohnson
requires_python
license
keywords package parser converter python orgmode icalendar
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # org2ical

[![pypi](https://img.shields.io/pypi/v/org2ical)](https://pypi.org/project/org2ical/)
[![python](https://img.shields.io/pypi/pyversions/org2ical)](https://pypi.org/project/org2ical/)
[![Downloads](https://pepy.tech/badge/org2ical)](https://pepy.tech/project/org2ical)
[![license](https://img.shields.io/pypi/l/org2ical)](https://github.com/j3soon/org2ical/blob/master/LICENSE)

[![tests](https://img.shields.io/github/actions/workflow/status/j3soon/org2ical/test-with-tox.yaml?label=tests)](https://github.com/j3soon/org2ical/actions/workflows/test-with-tox.yaml)
[![build](https://img.shields.io/github/actions/workflow/status/j3soon/org2ical/publish-to-pypi.yaml)](https://github.com/j3soon/org2ical/actions/workflows/publish-to-pypi.yaml)
[![codecov](https://codecov.io/gh/j3soon/org2ical/branch/master/graph/badge.svg?token=xNbUgClfdP)](https://codecov.io/gh/j3soon/org2ical)

Generate an [iCalendar](https://icalendar.org/) (.ics) file based on a [OrgMode](https://orgmode.org/) (.org) file.

This package is especially useful if your OrgMode file is too large to be exported with [OrgMode iCalendar Export](https://orgmode.org/manual/iCalendar-Export.html).

Installation:

```sh
pip install -U org2ical
```

Usage:

```py
import org2ical
# Ref: https://orgmode.org/manual/Timestamps.html
org_str = """
* Meet Peter at the movies
  <2006-11-01 Wed 19:15>
* Discussion on climate change
  <2006-11-02 Thu 20:00-22:00>
"""
ical_str, warnings = org2ical.loads(org_str)
assert warnings == []
print(ical_str)
```

Results:

```
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//j3soon//org2ical//EN
BEGIN:VEVENT
DTSTAMP:20221114T153849Z
UID:2f8059beaf05751acc703c2a12eee7e8
DTSTART:20061101T191500Z
DTEND:20061101T191500Z
SUMMARY:Meet Peter at the movies
DESCRIPTION:  <2006-11-01 Wed 19:15>\n\nOrg Path: Meet Peter at the movies
CATEGORIES:TIMESTAMP
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20221114T153849Z
UID:72b76db7dacae0489b50bb9c9b3b3c34
DTSTART:20061102T200000Z
DTEND:20061102T220000Z
SUMMARY:Discussion on climate change
DESCRIPTION:  <2006-11-02 Thu 20:00-22:00>\n\nOrg Path: Discussion on climate change
CATEGORIES:TIMESTAMP
END:VEVENT
END:VCALENDAR

```

Please note that the `DTSTAMP` here depends on your current time.

## Import to Thunderbird's Lightning Calendar

![](docs/images/preview-thunderbird.png)

1. Export a Org (.org) file to an iCal (.ics) file using org2ical.
2. In Thunderbird, select `Events and Tasks > Import...` and follow the steps to import the iCal file.
3. (Optional) Set category colors:
   ```
   DEADLINE : rgb(255, 128, 128)
   SCHEDULED: rgb(128, 192, 128)
   TIMESTAMP: rgb(128, 128, 255)
   CLOCK    : rgb(255, 192, 128)
   ```
4. (Optional) Fill events with category color by following [this Stack Overflow answer](https://stackoverflow.com/a/74842106).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/j3soon/org2ical",
    "name": "org2ical",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "package,parser,converter,python,orgmode,icalendar",
    "author": "Johnson",
    "author_email": "j3.soon777@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/02/11/ef8a6c6a403309c22d76c94cb4f6f40d60e91997d39208294dac70b52172/org2ical-0.0.3.tar.gz",
    "platform": null,
    "description": "# org2ical\n\n[![pypi](https://img.shields.io/pypi/v/org2ical)](https://pypi.org/project/org2ical/)\n[![python](https://img.shields.io/pypi/pyversions/org2ical)](https://pypi.org/project/org2ical/)\n[![Downloads](https://pepy.tech/badge/org2ical)](https://pepy.tech/project/org2ical)\n[![license](https://img.shields.io/pypi/l/org2ical)](https://github.com/j3soon/org2ical/blob/master/LICENSE)\n\n[![tests](https://img.shields.io/github/actions/workflow/status/j3soon/org2ical/test-with-tox.yaml?label=tests)](https://github.com/j3soon/org2ical/actions/workflows/test-with-tox.yaml)\n[![build](https://img.shields.io/github/actions/workflow/status/j3soon/org2ical/publish-to-pypi.yaml)](https://github.com/j3soon/org2ical/actions/workflows/publish-to-pypi.yaml)\n[![codecov](https://codecov.io/gh/j3soon/org2ical/branch/master/graph/badge.svg?token=xNbUgClfdP)](https://codecov.io/gh/j3soon/org2ical)\n\nGenerate an [iCalendar](https://icalendar.org/) (.ics) file based on a [OrgMode](https://orgmode.org/) (.org) file.\n\nThis package is especially useful if your OrgMode file is too large to be exported with [OrgMode iCalendar Export](https://orgmode.org/manual/iCalendar-Export.html).\n\nInstallation:\n\n```sh\npip install -U org2ical\n```\n\nUsage:\n\n```py\nimport org2ical\n# Ref: https://orgmode.org/manual/Timestamps.html\norg_str = \"\"\"\n* Meet Peter at the movies\n  <2006-11-01 Wed 19:15>\n* Discussion on climate change\n  <2006-11-02 Thu 20:00-22:00>\n\"\"\"\nical_str, warnings = org2ical.loads(org_str)\nassert warnings == []\nprint(ical_str)\n```\n\nResults:\n\n```\nBEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//j3soon//org2ical//EN\nBEGIN:VEVENT\nDTSTAMP:20221114T153849Z\nUID:2f8059beaf05751acc703c2a12eee7e8\nDTSTART:20061101T191500Z\nDTEND:20061101T191500Z\nSUMMARY:Meet Peter at the movies\nDESCRIPTION:  <2006-11-01 Wed 19:15>\\n\\nOrg Path: Meet Peter at the movies\nCATEGORIES:TIMESTAMP\nEND:VEVENT\nBEGIN:VEVENT\nDTSTAMP:20221114T153849Z\nUID:72b76db7dacae0489b50bb9c9b3b3c34\nDTSTART:20061102T200000Z\nDTEND:20061102T220000Z\nSUMMARY:Discussion on climate change\nDESCRIPTION:  <2006-11-02 Thu 20:00-22:00>\\n\\nOrg Path: Discussion on climate change\nCATEGORIES:TIMESTAMP\nEND:VEVENT\nEND:VCALENDAR\n\n```\n\nPlease note that the `DTSTAMP` here depends on your current time.\n\n## Import to Thunderbird's Lightning Calendar\n\n![](docs/images/preview-thunderbird.png)\n\n1. Export a Org (.org) file to an iCal (.ics) file using org2ical.\n2. In Thunderbird, select `Events and Tasks > Import...` and follow the steps to import the iCal file.\n3. (Optional) Set category colors:\n   ```\n   DEADLINE : rgb(255, 128, 128)\n   SCHEDULED: rgb(128, 192, 128)\n   TIMESTAMP: rgb(128, 128, 255)\n   CLOCK    : rgb(255, 192, 128)\n   ```\n4. (Optional) Fill events with category color by following [this Stack Overflow answer](https://stackoverflow.com/a/74842106).\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Generate a iCalendar (.ics) file based on a OrgMode (.org) file.",
    "version": "0.0.3",
    "split_keywords": [
        "package",
        "parser",
        "converter",
        "python",
        "orgmode",
        "icalendar"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0b26b95be48b5f83834b57e0b51425c011142ae00b0bbfa22b578036eb20f823",
                "md5": "c432ac89d94bdbc7a1bd858f438c2dbe",
                "sha256": "fb3986141382c7ad7d8dbc05e285fadeb5a42245f46afd980e722cff6ba956b2"
            },
            "downloads": -1,
            "filename": "org2ical-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c432ac89d94bdbc7a1bd858f438c2dbe",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5985,
            "upload_time": "2023-01-22T12:38:36",
            "upload_time_iso_8601": "2023-01-22T12:38:36.932671Z",
            "url": "https://files.pythonhosted.org/packages/0b/26/b95be48b5f83834b57e0b51425c011142ae00b0bbfa22b578036eb20f823/org2ical-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0211ef8a6c6a403309c22d76c94cb4f6f40d60e91997d39208294dac70b52172",
                "md5": "89055af22ba282fc35b23b333283419c",
                "sha256": "4d0cde040f145c8537048c722f662b3ff9511e2bc46abe19553a0c7b0553eb2f"
            },
            "downloads": -1,
            "filename": "org2ical-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "89055af22ba282fc35b23b333283419c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5992,
            "upload_time": "2023-01-22T12:38:38",
            "upload_time_iso_8601": "2023-01-22T12:38:38.533873Z",
            "url": "https://files.pythonhosted.org/packages/02/11/ef8a6c6a403309c22d76c94cb4f6f40d60e91997d39208294dac70b52172/org2ical-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-22 12:38:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "j3soon",
    "github_project": "org2ical",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "org2ical"
}
        
Elapsed time: 0.59376s