Praxxian / lava-flow

A Foundry VTT module that allows you to import your notes from Obsidian MD into Foundry journal entries.
MIT License
58 stars 9 forks source link

Running Import periodically? #41

Closed orangebutblue closed 5 months ago

orangebutblue commented 10 months ago

Is it possibly to automate the import process and having it run periodically (maybe with a cronjob)?

Ideally, I just want to add notes to my obsidian vault and then simply open up foundry at some point and have my newest notes there already waiting for me (without having to go through the manual user interaction of importing the notes by hand)

Praxxian commented 10 months ago

I certainly sympathize with the desire for automation, but I think this is outside the scope of a Foundry module. I am not sure if there are server-side modules. If you happen to know of any modules that work this way, I would be interested to know.

Modules are client-side, and for very good reasons, can't just directly access your file system on their own. It interacts with server data through Foundry's API. For this to work, you would need your vault on the same computer as your foundry instance, which is not the case for everyone, and the API would need to provide a way to specify a folder and retrieve all files recursively. I know there is a FilePicker class, so maybe that's possible. I will do a little research.

orangebutblue commented 10 months ago

Do you think it's not possible/dangerous to just load the journal.db json file and update it with the new notes?

Praxxian commented 5 months ago

I would not advise editing journal.db directly. This should be done through the API to avoid corrupting the file.