organised-exchange
organised-exchange copied to clipboard
A script to import Exchange ics calendars into Emacs Org Mode
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:
- [x] Simple to setup
- [x] Meetings should nicely mix up with my normal schedules in Org Agenda
- [x] Read only, I can put a meeting in the calendar directly on Outlook
- [x] Show the Zoom link
- [x] Sync it manually or via cron
- [x] 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!
Publishing your Exchange Calendar
In Order to have an up to date ics calendar from your Office 365 account you can:
- Go to Outlook Settings
- View all Outlook settings
- the select Calendar on the left hand side
- Select Shared calendars
- Select and publish your calendar
:warning: 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!
- Fork it (https://github.com/ettomatic/organised-exchange/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request