This is a plugin for Obsidian that searches your Obsidian vault for tasks that contain dates, and generates a calendar in iCal format that can be imported into your preferred calendar application.
Periodically, the plugin will:
- Find all tasks in your vault (A valid task is a Markdown checkbox (either checked or not) that contains a date in the format YYYY-MM-DD or YYYY-MM-D),
- Generate an iCal calendar file that contains all of these tasks,
- Tasks are appended with an emoji to quickly see their status (✅ completed, 🔲 to do, 🏃 in progress, 🚫 canceled),
- Optionally, calendar can be saved to your filesystem, and/or
- Optionally, calendar can be stored on GitHub Gist.
If you choose to store your calendar on Gist, you can then use the URL to your Gist in your preferred calendar application.
Your vault will be scanned every now and then for changes to tasks to keep your calendar up-to-date.
This plugin has rudimentary support for Obsidian Tasks emoji format and Obsidian Tasks dataview format. However it is not mandatory.
This plugin supports Day Planner format tasks. If you enable this in the settings, then the date of the task will be taken from the tasks heading, and the start time and end time will be taken from the task. If there is no end time, the default end time will be 30 minutes from the start time.
iCal has various settings which I will try to explain.
Obsidian supports two types of internal link: wikilinks and markdown.
Wikilinks can look like: [[Link to document]]
or [[Link to document|Link title]]
. Markdown links look like [Link title](Link to document)
.
This option will keep the links in your event just as they appear.
This option will keep just the Link title
and remove the link. If the wikilink does not have a title then it will be removed.
This option will take the Link title
however if that does not exist, then it will use Link to document
.
This option will remove them entirely from your event summary.
This is to allow you to exclude completed tasks from being added to your calendar. It will also remove tasks from your calendar once they are marked as completed.
Enabling this will append all of your tasks as TODO items to the end of your calendar file. Some iCalendar clients are able to render these tasks separate to the calendar events. Some clients that support this include Google Tasks, Microsoft Outlook, Microsoft To Do, Mozilla Thunderbird with Lightning Calendar, Android CalDAV-Sync, Calendars by Readdle, Todoist and OmniFocus.
Enabling this will mean that only tasks that do not have dates will be created as TODO items. If you disable this, then every task (tasks with or without a date) will be added to your calendar as a TODO item.
Toggles on or off the functionality where you are able to exclude tasks whose dates are older than the value you specify.
If Ignore old tasks?
is true then you will be asked to set the age in days. Minimum value is 1 day. Maximum value is 3650 days (10 years).
Tasks can have one or more dates. From either a single raw date in YYYY-MM-DD format, to dates for when a task starts, is scheduled or is due. This setting is to customise which date is chosen when building your iCalendar.
Prefer due date means the following sequence will be followed:
- If the task has a due date and a start date, they will be the start and end date
- If the task only has a due date, that will be used
- If the task only has a start date, that will be used
- If neither are found, just find any date related to that task
Prefer start date means the following sequence will be followed:
- If the task only has a start date, that will be used
- If the task only has a due date, that will be used
- If neither are found, just find any date related to that task
Create an event for each start date, scheduled date and due date associated with a task. This means if your task has all three dates, then three separate events will be created in your calendar.
- If there is a start date, an event will be created using that date. The summary will be appended with a 🛫.
- If there is a scheduled date, an event will be created using that date. The summary will be appended with a ⏳.
- If there is a due date, an event will be created using that date. The summary will be appended with a 📅.
- If none of the above dates were found, then take any old date that we can find
Enabling this will tell the plugin to consider Day Planner plugin format if tasks are discovered with times in them.
Enabling this will unlock the Save calendar to GitHub Gist settings.
Enabling this will unlock the Save calendar to disk settings.
Enabling this will tell iCal that it should periodically scan your vault for tasks within Markdown files and generate a calendar. It also unlocks the How often should we parse and save your calendar? (minutes) setting.
The number of minutes between each scan to generate and save your calendar. Must be a number between 1 and 1,440 (24 hours).
Enabling this will unlock the Only include tasks that contain these tags setting.
You can enter one or more tags. Only tasks that contains one or more of these tasks will be included in your calendar. Multiple tags should be separated by a space.
Enabling this will unlock the Exclude tasks that contain these tags setting.
You can enter one or more tags. If a task contains any of these tags, then it will be excluded from your calendar. Multiple tags should be separated by a space.
If you have include tags and exclude tags, then exclude tags take priority.
Saving to GitHub Gist means you will be given a URL that you can import into your calendar applications.
To be able to write the calendar file to GitHub Gist, you need to generate a personal access token.
For further information please see How to generate a GitHub Personal Access Token.
The Gist ID is the Gist that you want to write your calendar to.
For further information please see How to generate a GitHub Gist ID.
This is used only to generate the URL to your GitHub Gist.
This should match the filename that you used when you created the GitHub Gist.
For further information please see How to generate a GitHub Gist ID.
This is the URL that you need to copy and paste into your preferred calendar application.
Saving your calendar to disk means you can import it into a desktop application (like Thunderbird) or do further processing if you're that way inclined. For example, maybe you want to email the calendar to someone. I don't know.
This is the path, relative to the root directory of your vault, in which the calendar file will be written. An empty string means the root directory of your vault.
Give the calendar file a name.
Choose the extension of the filename.
This is just a way to copy the path and filename and extension so it's easy to find on your filesystem.
This turns on logging so that you can see what the extension is doing. It can be helpful to diagnose what is happening if there are any issues.
In the Obsidian menu, go to View and select Toggle Developer Tools. The log messages will appear in the Console tab.
A GitHub Personal Access Token is a long random string that allows iCal to write to your GitHub Gist on your behalf.
To generate one, do the following:
- Go to https://github.com/settings/tokens/new
Note
: Enter something like "Obsidian iCal".Expiration
: Best practice is to expire tokens periodically but that would be frustrating. Chooseno expiration
if you want to.Select scopes
: Choosegist
only.- Click
Generate token
- Copy the personal access token (It starts in
ghp_
) - Paste it into the GitHub personal access token setting.
If your personal access token is leaked, go to the GitHub tokens page and click Delete
. Then follow these steps again to generate a new one.
- Go to here to create a new Gist: https://gist.github.com/
Gist description
: Enter anything you like. Eg: My calendar that is generated from my Obsidian vaultFilename including extension
: You could useobsidian.ics
or your vault name. Whatever you enter here, you will need to enter it in the iCal settings so it knows which file to write to.- For the contents of the Gist, just put anything in there. The iCal plugin will overwrite it.
- Click
Create secret gist
After you create the Gist, you will see the URL is something like:
https://gist.github.com/andrewbrereton/11c399ce6c0d89c5f8101edb9a2b76d6
|------------| |------------------------------|
Username Gist ID
-
Take the
Username
part and enter it in GitHub username setting. -
Take the
Gist ID
part and enter it in GitHub Gist ID setting.
- Google Calendar
- Apple Calendar
- Microsoft Outlook
- Lightning extension for Mozilla Thunderbird and SeaMonkey
- Yahoo! Calendar
- GNU Emacs
- HCL Domino (formerly IBM Notes and Lotus Notes)
- GNOME Evolution
- eM Client
- Novell GroupWise