andrewbrereton / obsidian-to-ical-plugin

This is a plugin for Obsidian that searches your vault for tasks that contain dates, and generates a calendar in iCal format that can be imported into your preferred calendar application.
MIT License
61 stars 13 forks source link

Add option to parse Dataview formatted tasks #42

Closed johngarg closed 8 months ago

johngarg commented 8 months ago

Hi,

Thanks for the cool plugin. I might be the only person in the world who uses the Dataview format for tasks rather than the emoji format. That is, [scheduled:: <date>] instead of ⏳<date>, etc. (Changing to the emoji format now prevents the tasks plugin from reading any of the tasks, so that's not a viable option at the moment.)

The iCal plugin still seems to be finding all of the dates correctly. They are being displayed in the calendar with the dates removed, but the surrounding square brackets and marker are still present:

Screenshot 2024-01-30 at 10 24 26 pm

I've never done any Obsidian plugin development, but I may be able to tinker with this myself. I suppose it could be straightforward to replace the emojis with their respective Dataview properties in TaskDate.ts and TaskSummary.ts, and then provide the user with an option in the settings. Is this all that would need to be changed?

Thanks

andrewbrereton commented 8 months ago

Hi @johngarg

I will update the regular expression so that it is able to handle both types of date formats.

andrewbrereton commented 8 months ago

Created a PR. Will merge and make a new version shortly.

Basically the logic will convert any Dataview format dates into Emoji format dates before continuing. Simplest way I could think of doing this change.

https://github.com/andrewbrereton/obsidian-to-ical-plugin/pull/44

andrewbrereton commented 8 months ago

Fixed in release 1.11.0.

In Obsidian, go to Settings > Community Plugins, clickCheck for updates, then click theUpdate` button next to iCal to get the latest version.

johngarg commented 8 months ago

Hey, thanks so much for doing this so quickly. I can confirm that the behaviour is now fixed on my end too. 🥳