Open ms3056 opened 1 month ago
Having a lot of empty drawings feels counter-intuitive to me, however I can also see why one would need it. I'll add an option to the settings to toggle it later today.
Sorry, I kinda misread your initial isuse. The notes in in the picture, you're saying these file have content and one of which is a link / embed to an Excalidraw file, or are these files actual Excalidraw files?
Could you provide a working example so that I can try to replicate it on my end? Thanks.
Just a heads up that I've pushed a patch to disable cleanup of Excalidraw file for now (v1.1.1).
Hi! I'm here to track the advancement of this feature and the one to handle excalidraw files like attachments :)
I have attached a typical note. This has embedded Excalidraw drawings that are 'blank' to start. In case someone is like "why?" - I have a hotkey to "swap" between the Obsidian text entry view and the Excalidraw "drawing" view - its kinda like Obsidian is one side of the "paper" where I type notes, and Excalidraw is the back side of the paper where you can draw images. Then hot-key back and forth at will.
I hope this helps. This attached files is one of the files and the content that the previous version tried to delete.
Aha that is actually a really nice way of using it :)
I will spend some more time looking into the implementation for cleaning up Excalidraw files. It will take a bit longer to implement but the end result will be so that Excalidraw files are handled more like pictures etc in that if they are ignored if in use by any other file.
Hi, I've now made a pre-release version with a fixed version of the original implementation (v1.1.2-0).
It now does a pre-check to see if it has any backlinks / references (this was the part that was missing from the original implementation) and if so, skips the cleanup for that particular Excalidraw file.
On my end it seem to work as intended, but I would like for you to give it a shot to if possible, either in a test vault or your main. The pre-release can be tested by using the BRAT plugin.
Once BRAT has been installed and enabled, go to the settings tab for the plugin and click Add Beta plugin with frozen version
, then fill in the following:
Repository: https://github.com/husjon/obsidian-file-cleaner-redux
Release Version: 1.1.2-0
(notice the lack of v
prefix)
You'll see it in BRAT shortly after adding it, like this.
You can confim the version in the community plugin tab
Once installed, see if it works as you expect. If it works as expected I will make it public otherwise I'll make a few adjustments according you what you find. :)
Finally: To remove the beta version, disable / uninstall BRAT, then re-install File Cleaner Redux through the community plugin listing.
Thanks in advance
I found a bug which cause a rather big slowdown since it was trying to parse markdown files twice, this has now been pushed to 1.1.2-1, the procedure above is still correct except for the version to test is now 1.1.2-1
I have a lot of empty Excalidraw drawings embedded in my notes. I do this in case I want to draw a picture in a note, so every meeting note contains an empty Excalidraw drawing.
When I ran this plugin today, ANY file - even if it has other content like text or images - was flagged for deletion because they contain empty Excalidraw files.
REQUEST: please allow a setting to TURN THIS OFF!!!!
Here is an example - all of these were flagged for deletion - but - they all have content (and have empty Excalidraw content).