Calendar sync application that will:
- Copy Outlook calendar events to a local SQLite3 database
- Create markdown files for the events for use in note taking app Obsidian
- Delete markdown files that are old and never had any notes taken
- Allows for transient event notes, by keeping the ==DELETABLE== tag in the note I can set a reminder for the purpose of the event, and then remove ==DELETABLE== if any notes are worth keeping after the event
- Potential starting point for a custom built Calendarly
- This is not built as a product
- It is a "living" system where I change the code based on my needs (e.g. changing date ranges or filters)
- Think of it as a template
- This is NOT an example of Clean Code
- Just a quick one-off that may evolve into something better in the future
- I put personal events in my work calendar, but I need to retain them in the case that my current work calendar is no longer available to me
- I do not want to have to use multiple calendar systems for work/personal
- I use Obsidian for note taking throughout my day as a "2nd brain", and this allows me to stay productive in the context of meetings I have
- Setup Obsidian
- Add the Full Calendar community plugin
- In Obsidian I have structured my folders so that I have an
Events/Personal
andEvents/Work
(among others)
- Setup the project:
git clone https://github.com/craigstjean/ObsidianCalendarSync.git cd ObsidianCalendarSync dotnet restore dotnet ef database update
- Configure the project:
- Create an application in your work's Azure portal (or create one in your personal portal and have your work whitelist the AppId)
- Copy appsettings.template.json to appsettings.json
- Set
AppClientId
andAppTenantId
in appsettings.json - Set
ObsidianWorkPath
andObsidianPersonalPath
in appsettings.json
- Sync your calendar and generate your Obsidian markdown files
- Potentially change the
startDateTime
andendDateTime
variables inSync
if you want a different date range- Default is -30 days <=> +365 days
- Run the sync:
dotnet run
- Potentially change the
- Sync Calendar and Export to Obsidian
dotnet run
- Sync Calendar ONLY
dotnet run -- --sync
- Export the current database to Obsidian ONLY
dotnet run -- --export
- Purge all Obsidian markdown files that still contain ==DELETABLE==
dotnet run -- --purge
- Q: Why do I have to authenticate each time I run it?
- A: Because storing access tokens that grant access to your work data is insecure
- Extended A: Feel free to change the program to store your access tokens (depending on their TTL), or to use a different flow other than
AcquireTokenInteractive
intoDelegateAuthenticationProvider