fantasycalendar / obsidian-fantasy-calendar

MIT License
175 stars 7 forks source link

Feature Request: New Frontmatter option to repeat an event set on specific date. (like UI) #59

Open namtrah opened 2 years ago

namtrah commented 2 years ago

While trying to add Frontmatter to a Obsidian Note, it should update the fantasy calendar with an event. This does not happen. My front Matter is like the following:

fc-calendar: Exandrian Calendar
fc-event: 460-05-26
fc-category: Birthday
fc-display-name: Characters Birthday

I have opened the debug information and it does see the note and does not error, still it does not update the calendar.

bd962393-aeb3-4dbe-ac30-ceed631f7c71:2 Received options message
bd962393-aeb3-4dbe-ac30-ceed631f7c71:2 Adding 1 paths to queue
bd962393-aeb3-4dbe-ac30-ceed631f7c71:2 Parsing 20 Players/Character/Backstory.md for calendar events (0 to go)
bd962393-aeb3-4dbe-ac30-ceed631f7c71:2 Received queue message for 1 paths
bd962393-aeb3-4dbe-ac30-ceed631f7c71:2 Parsing complete
VM263:436 Received save event from file watcher
bd962393-aeb3-4dbe-ac30-ceed631f7c71:2 Received options message
bd962393-aeb3-4dbe-ac30-ceed631f7c71:2 Received calendars message
namtrah commented 2 years ago

With new Obsidian Update I have better debugging:

55d02d6c-83a2-41b8-80d0-d084d705c98f:2 Adding 1 paths to queue
55d02d6c-83a2-41b8-80d0-d084d705c98f:2 Parsing 20 Adventurers/Party/Character/Backstory.md for calendar events (0 to go)
55d02d6c-83a2-41b8-80d0-d084d705c98f:2 Received queue message for 1 paths
55d02d6c-83a2-41b8-80d0-d084d705c98f:2 0/1 (1 from frontmatter, 0 from timelines) event operations completed on Exandrian Calendar for Backstory
55d02d6c-83a2-41b8-80d0-d084d705c98f:2 Parsing complete
**plugin:fantasy-calendar:436 Received save event from file watcher**
55d02d6c-83a2-41b8-80d0-d084d705c98f:2 Received options message
55d02d6c-83a2-41b8-80d0-d084d705c98f:2 Received calendars message

It does find the frontmatter and says it saves it, but it doesn't.

namtrah commented 2 years ago

Have debugged it to realize it was User Error. But I found that what I want just doesn't exist in the frontmatter for FC.

Would like to use this now to reopen as a feature request to add some sort of front matter so that with a fc-date: YYYY-MM-DD and a second option fc-every: nnn meaning the number of days fc-date reocurrs.

I know it is maybe difficult, But just want to expose the functionality in the UI of allowing an event to happen every n days. This could be useful to add then such things as Birthdays of characters (or real live people) in Frontmatter without having to use the UI.

WovenTales commented 1 year ago

+1, and for the same purpose. It doesn't make much sense to be marking birthdays before the character is born (even if I could get the structured-date-object syntax to show up on the calendar).

I'm not sure counting days is the final solution, though; how does that handle years with different numbers of days? Still, an fc-every: 1y seems like it would do really well.

EDIT: Though, I guess that would have its own issues in what to do if you want something to repeat every year on february 29 (or if #51 gets implemented)...