zsviczian / obsidian-excalidraw-plugin

A plugin to edit and view Excalidraw drawings in Obsidian
4.07k stars 219 forks source link

FR: Hide Auto-Exported Images #1802

Open Eroxl opened 4 months ago

Eroxl commented 4 months ago

Is your feature request related to a problem? Please describe. I want to have my Excalidraw drawings auto-exported to SVGs so that I can easily display them when I publish my notes, but I dislike how cluttered my workspace gets when I toggle the auto-export setting on because of all the duplicate files.

Describe the solution you'd like A setting could be added to hide the exported image files from the file explorer. This could be done using a similar code to this plugin.

Describe alternatives you've considered The images could be auto-exported to a custom directory but I think structuring the folder structure of this custom directory might be a bit more challenging than just hiding the files.

zsviczian commented 4 months ago

File hider is an interesting idea. I will take a look. The issue is, changing the folder for exported SVGs is not as simple as it looks. The location of the SVGs runs deep in the plugin logic. Placing all images in one folder can introduce file naming conflicts, plus I have many other features as well that work based on the assumption that the svg is next to the file. The approach I've been considering is that you can set an export directory for images. Excalidraw then mimics the folder structure of your main vault within that sub-folder, thus if you have a file in /input/books/Atomic Habits/this is my illustration.md, the auto exported SVG would be placed in /my-svg-folder/input/books/Atomic Habits/this is my illustration.svg - but this introduces lots of questions and issues. So in short,