Coder Social home page Coder Social logo

org2ical's Introduction

org2ical

pypi python Downloads license

tests build codecov

Generate an iCalendar (.ics) file based on a OrgMode (.org) file.

This package is especially useful if your OrgMode file is too large to be exported with OrgMode iCalendar Export.

Installation:

pip install -U org2ical

Usage:

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

  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.

org2ical's People

Contributors

j3soon avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

stefan2904

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.