exchange2org
exchange2org copied to clipboard
Connects to your Exchange server and extracts data in Org-mode format
- exchange2org
This is how it looks on my agenda:
[[file:screenshot_emacs.png]]
The "⦿"-characters are links to the corresponding Outlook items. Read [[https://github.com/novoid/dot-emacs/blob/master/config.org#links-to-outlook-entities][my configuration on how to open outlook links]].
Those are the source appointments from my Outlook 2016 (dark theme):
[[file:screenshot_outlook.png]]
Here is how I get the appointments from Outlook to [[http://karl-voit.at/orgmode/][Org-mode]]:
#+BEGIN_SRC sh :results output :wrap src ./exchange2org/init.py --help #+END_SRC
#+BEGIN_src usage: /usr/bin/exchange2org [-h] [--calendar] [--startday date-or-days] [--endday date-or-days] [--ignore-category CATEGORY] [-s] [-v] [-q] FILE
This tool connects to your Exchange server and extracts data in Org-mode format.
Please do note that this is a TEMPORARY stand-alone tool which will be added to Memacs as an module as soon as Memacs got migrated to Python 3: https://github.com/novoid/memacs/
You can configure the behavior and output via a configuration file.
Example usages: exchange2org --calendar some/subfolder/my_exchange_calendar.org … writes your calendar events into the Org-mode file.
positional arguments: FILE The filename of the output file
optional arguments: -h, --help show this help message and exit --calendar Extract the calendar as Org-mode events. --startday date-or-days Starting date for fetching data. Default: 60 days in past. "date-or-days" is either of form "YYYY-MM-DD" or a number. --endday date-or-days End date for fetching data. Default: 60 days in future. "date-or-days" is either of form "YYYY-MM-DD" or a number. --ignore-category CATEGORY Category whose events will be omitted. -s, --dryrun enable dryrun mode: simulate what would happen, do not modify anything -v, --verbose enable verbose mode -q, --quiet enable quiet mode
:copyright: (c) by Karl Voit [email protected] :license: GPL v3 or any later version :URL: https://github.com/novoid/exchange2org :bugreports: via github or [email protected] :version: 2018-02-03 · #+END_src
- Hosted on github: https://github.com/novoid/exchange2org
- Will be discontinued and merged into https://github.com/novoid/memacs/ as soon as Memacs got migrated to Python 3.
** Installation
Clone it via [[https://github.com/novoid/filetags][GitHub]] or install =pip exchange2org=
You're going to need a configuration file. On GNU/Linux, this is: =$HOME/.config/exchange2org/exchange2orgconfig.py=
This repository (as well as the pip package) comes with [[file:exchange2org/exchange2orgconfig-TEMPLATE.py][a template file]] named =exchange2orgconfig-TEMPLATE.py= you can modify to meet your requirements.
** Automatization
I personally run following command via cron Monday to Friday during office hours:
: $HOME/src/exchange2org/exchange2org/init.py --calendar --startday 7
: --endday 45 $HOME/org/exported-company-calendar.org -q --ignore-category 'Org-mode'
On Sunday, I archive my calendar with the following script:
#+BEGIN_SRC sh #!/bin/sh
TMPFILE=mktemp
ARCHIVEFILE='$HOME/org/memacs/company-calendar-archive.org_archive'
It gets the previous 7 days of events, greps out the header (take
only lines starting with two asterisks) and appends them to the
archive file:
$HOME/src/exchange2org/exchange2org/init.py --calendar --quiet
--startday 7 --endday 0 --ignore-category 'Org-mode' "${TMPFILE}" &&
egrep '** <' "${TMPFILE}" >> "${ARCHIVEFILE}" &&
rm "${TMPFILE}"
#end
#+END_SRC
When I categorize an Outlook-appointment with "Org-mode", the commands above ignore the appointment. This is quite handy when you have created (or copied) a manual event for that very same appointment and you don't want to have it twice in your agenda. Please note that you can right-click any appointment in your calendar to assign categories without sending updates or similar annoyances.
- How to Thank Me
I'm glad you like my tools. If you want to support me:
- Send old-fashioned postcard per snailmail - I love personal feedback!
- see [[http://tinyurl.com/j6w8hyo][my address]]
- Send feature wishes or improvements as an issue on GitHub
- Create issues on GitHub for bugs
- Contribute merge requests for bug fixes
- Check out my other cool [[https://github.com/novoid][projects on GitHub]]
- Local Variables :noexport: