Import Exchange ics
calendars in Org Agenda.
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
Set envs vars:
$ env | grep ORGANISED_EXCHANGE
ORGANISED_EXCHANGE_ORIGIN=/location/for/your/calendar.ics
ORGANISED_EXCHANGE_DESTINATION=/target/org/file/exchange.org
$ docker pull ettomatic/organised-exchange:latest
$ bin/eto
Setup the Ruby dependencies
$ bundle install
Then you can simply run:
$ ruby bin/exchange_to_org.rb
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!
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
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.
Docker or Ruby 2.x
- Improve Sync from Emacs
- Timezones!
- Make the Zoom link optional
- If there's interest make it more configurable
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.
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