I’m writing a plugin that takes all blocks with a scheduled or deadline time and writes them to an ICS file (iCalendar/Google Calendar compatible events format). (GitHub for the interested)
Currently, I have a proof of concept for writing the raw text of what would be an
.ics file into the developer console. I’m able to copy this into a
.ics file and successfully view events in the calendar.
What I’d like to accomplish
I’d like to have the ICS file automatically created or automatically imported into my calendar. The easiest way I see to accomplish this is to write the ICS string into a file or directory on a webserver that my calendar program can point to.
My first thought was to use
fs, but because plugins are run from Logseq we don’t have access to the filesystem API directly. I get this when trying to write a file:
TypeError: Hc.writeFile is not a function
Is there a way to write to a file with the current plugin API? Is this the correct approach?
Thanks for reading.