Using the Microsoft Graph API to retrieve Calendar and convert to Orgmode compatible plain text.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.3 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. #+title: README
  2. * Installation
  3. #+begin_src shell
  4. git clone https://gitea.l3vi.co/leviolson/msgraph2orgmode
  5. cd msgraph2orgmode/
  6. cp config-example.cfg config.cfg
  7. #+end_src
  8. Then install the python dependencies:
  9. Note: Consider optionally using a =Virtual Environment=. This ensures the installed packages are kept separate.
  10. #+begin_src shell
  11. python -m venv venv
  12. source venv/bin/activate
  13. #+end_src
  14. Finally, install actual packages:
  15. #+begin_src shell
  16. pip install -r requirements.txt
  17. #+end_src
  18. * Usage
  19. After installation, you're ready to get your =client_id= and =client_secret= from Azure.
  20. Follow the steps here -> https://github.com/microsoftgraph/python-sample-console-app#application-registration
  21. Then:
  22. 1. Update =config.cfg= to contain your =client_id= as well as the ~machine~ name and ~login~ you choose.
  23. 1. Update =.authinfo.gpg= to include something like:
  24. #+begin_src authinfo
  25. machine azure.api login email@example.com^client_secret password CLIENT_SECRET_GOES_HERE
  26. #+end_src
  27. Given the above authinfo entry, you would set the following in =config.cfg=:
  28. #+begin_src conf
  29. #...
  30. client_id=CLIENT_ID_GOES_HERE
  31. machine=azure.api
  32. login=email@example.com
  33. #...
  34. #+end_src
  35. And finally, you can run the tool with:
  36. #+begin_src shell
  37. python msgraph-orgmode.py
  38. #+end_src