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

(idea) add description in event #50

Open bepolymathe opened 8 months ago

bepolymathe commented 8 months ago

Hi @andrewbrereton

Since you suggested it... 😃

Another idea came to me recently, so I'm writing it down here. I sometimes put context to a task (an address, a clarification, etc.) in an indented line below the task line.

- [ ] Task test ⏳ 2024-02-06 📅 2024-02-11 🛫 2024-02-07 
      A short description

It might be interesting to retrieve the content of this line and integrate it into the event description in the ical or ics file 🤔

andrewbrereton commented 8 months ago

I understand the reason behind this ... However ... There are two pieces of complexity here:

  1. This plugin works by processing line-by-line. This would need to change if was to consider groups of lines together, and
  2. The plugin would need to consider "Is this next line part of this task OR is it a new line with indentation?". There's no way to know the intent of the user. Perhaps I could add some settings to let the user decide how things are processed.

I have a suggestion that may be silly, so I will write it out, and you let me know.

Here is a screenshot from Obsidian showing the same thing that you shared:

image

However, if we go to View > Source Mode the you will see that I have achieved this by using a HTML line break tag <br>:

image

So my suggestion is:

The first line stays as the summary. If a <br> tag is encountered, then the summary is everything left of the first <br> tag, and the description is everything to the right of the first <br> tag.

Example with many <br> tags to demonstrate:

Source Mode:

image

What you see:

image

Event Summary: Do something

Event Description:

This would appear in the description. This would also appear in the description.

There are two line breaks which makes this a paragraph"

Please let me know your thoughts. Have a play around with typing <br> into Obsidian so you can see how Obsidian behaves when you do this.

bepolymathe commented 8 months ago

Hi @andrewbrereton

I understand the technical constraints and the need to work on a line...

Thanks for sharing your suggestions. I think the main problem arises if you insert dates in the line without grouping them in the same place.

image

Tasks and Dataview have more trouble interpreting it.

image

What if you used lightweight markup specific to the description... for example

- [ ] Test |d Some description here. Why not with two line <br> it could be cool ! d|

I don't know if it's a good solution... I'll have to think about it some more ;-)

bepolymathe commented 5 months ago

Hi, @andrewbrereton

I hope you are well. I have not always had a miraculous idea for this problem. Could we try the proposal you made with
?