Skip to content

ettomatic/organised-exchange

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Organised Exchange

Import Exchange ics calendars in Org Agenda.

Rationale

In the last year my days have been bombarded with meetings. I wanted to keep track of them on my Org Agenda without the complexities of setting up an account using Davmail or similar solutions.

My check-list was:

  • Simple to setup
  • Meetings should nicely mix up with my normal schedules in Org Agenda
  • Read only, I can put a meeting in the calendar directly on Outlook
  • Show the Zoom link
  • Sync it manually or via cron
  • Running from Docker to ease dependencies

Setup

Set envs vars:

$ env | grep ORGANISED_EXCHANGE
ORGANISED_EXCHANGE_ORIGIN=/location/for/your/calendar.ics
ORGANISED_EXCHANGE_DESTINATION=/target/org/file/exchange.org

with Docker

$ docker pull ettomatic/organised-exchange:latest
$ bin/eto

with Ruby

Setup the Ruby dependencies

$ bundle install

Then you can simply run:

$ ruby bin/exchange_to_org.rb

Usage

You can sync from Emacs using a function like:

(defun organised-exchange ()
  "Sync Outlook Calendar ics with Org Agenda."
  (interactive)
  (if (get-buffer "exchange.org")
      (kill-buffer "exchange.org"))
  (shell-command "~/code/organised-exchange/bin/eto")
  (message "calendar imported!"))

Make sure your org-agenda-files includes the file you set for $ORGANISED_EXCHANGE_DESTINATION and Voila! Your Org Agenda will now show your Exchange meetings!

Screenshot

Publishing your Exchange Calendar

In Order to have an up to date ics calendar from your Office 365 account you can:

  1. Go to Outlook Settings
  2. View all Outlook settings
  3. the select Calendar on the left hand side
  4. Select Shared calendars
  5. Select and publish your calendar

⚠️ This produces a link to your ics file, be careful! your calendar is now just protected by obfuscation, please consider if this is acceptable for your use case.

We are almost there! Just curl the ics file and import it in Emacs:

$ curl https://outlook.office365.com/owa/calendar/[....]/calendar.ics > $ORGANISED_EXCHANGE_ORIGIN

You can add this to a cron job if you like.

Requirements

Docker or Ruby 2.x

TODO

  • Improve Sync from Emacs
  • Timezones!
  • Make the Zoom link optional
  • If there's interest make it more configurable

Limitations & Alternatives

organised-exchange is pretty simple and has been built as a read-only solution to simplify connecting whith complex authentication setups. If you are not limited by this, you'd find Excorporate a much more powerful solution.

organised-exchange also requires having Docker or Ruby on your machine, which could definitely be a limitation for you.

Another option to consider is using ical2org.awk to process you ics files as org files.

Finally, if you are a Gmail user, you'd also consider syncing your Outlook calendar with Google calendar and then using one of the Google calendar sync tools for Emacs.

Contributing

Want to help? Great!

  1. Fork it (https://github.com/ettomatic/organised-exchange/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request