New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Images still stays in images folder after been removed from boostnote #740
Comments
It's not unnatural because there's no relation between the note itself and the image. Take GitHub for example, you can upload an image on an issue comment and it won't delete even though you delete the line of an image in the comment.
As same as the above, take GitHub for example. You can upload the same image in 1 comment with no warning.
That's true. But what's the matter? That does not matter of the speed of loading notes. |
No speed loading is great. The app works awesome. just thinking about the image folder that can grow very fast into a big mess that will be hard to know what images you are using and what are safe to remove. |
I didn't notice the necessity of image deletion. I'll consider it. |
Especially with the history function it will be buggy when going back, saving, and going forward. |
Good idea |
It don't have to be in the info modal |
It would be nice if we could easily search for images not used in any notes and delete them manually/automatically. |
I use a one-liner to remove files no longer used. If you want to use it, run it in your storage. (Please don't forget backup just in case) find . -type f -name "*.cson" | xargs grep -E ':storage(.+?).png|Boostnote/images/(.+?).png' -n | sed -e 's/^.*\///g' | sed -e 's/).*//g' > images.txt && ls images | while read line ; do if [ ! $(cat images.txt | grep $line) ]; then rm images/$line ;fi ; done && rm images.txt |
yes, it's a good feature! |
@asmsuechan thx for the code. |
Any changes so far for the native app without script? |
This is a good idea, I had an issue today where I was trying to drop in an image and placed it in the wrong spot so I deleted the image and dropped it in a different (correct) spot. Later I noticed that the image was in my image folder twice because of this method of moving it. |
@ehhc has started working. Visit this issue on Issuehunt |
@ehhc has submitted output. Visit this issue on Issuehunt |
@kazup01 has rewarded. Visit this issue on Issuehunt |
Please paste some screenshots with opening the developer tool if you report a bug.
Dropping image into boostnote will add it to images folder with a random name up to here all works great.
I think with this kind of behavior the images folder will be getting big very fast with some duplicated images all over it.
would love to hear your thoughts on it.
boostnote
boostnote markdown
images folder
The text was updated successfully, but these errors were encountered: