Sergei-Korneev / obsidian-local-images-plus

This repo is a reincarnation of obsidian-local-images plugin which main aim was downloading images in md notes to local storage.
MIT License
239 stars 19 forks source link

Re-Distribute attached files according to new rules #6

Open feedhopper opened 1 year ago

feedhopper commented 1 year ago

I would love to see self defined options for having attachments sorted away into folders, ideally with a way to organize it in a subfolder fashion.

I very much hope that this can be realized! In this case I would love to have an option to "sort things according to defined rules", something like a one button solution that moves all files from where they used to go to where they will be from now on.

So, If they used to be in

THANK YOU for your hard work!

Sergei-Korneev commented 1 year ago

Hey. In version 0.14.6 there will be a plethora of options where to save the attachments. You can try it and see if it fits for you. If not , your ideas are always welcome. Also remember, that since 0.14.5 filenames are linked to file contents, and should be pretty unique within the vault, so Obsidian should know where they are anyway. If you would like to support my labor you can do it here https://www.buymeacoffee.com/sergeikorneev Every good comment or donation will helpl me to continue. Best wishes,

feedhopper commented 1 year ago

Hey Sergei,

thanks for the update. I am very curious about the next version.

When comparing the settings of the old plugin with your taake on "local images", I see that you got rid of these 2 things:

There is one more thing but it is something else, so maybe better posted separately.

PS How does the filenames linking you referred to work? I could not find any info on it.

All the best!

Sergei-Korneev commented 1 year ago

Yeah, those two options emerged due to code imperfections in previous repo, and I do not think a user should be adjusting such things.
Filenames are now generated according to MD5 algorithm, so a name reflects its content, so to speak.

ChrisH4711 commented 1 year ago

Hi Sergei,

thank you very much for version 0.14.6, which makes this plugin much more usable, because now you can store the attachments in a much more organized way in subfolders. If I had one wish, I would propose the following change: If you select the options "Save attachments next to note in folder specified below + ${notename}_res", it is impossible to get rid of the "_res" at the end. I would very much prefer to not have this "_res" appended to the folder name. It would be fine, if there is one more option without appending "_res" automatically. The perfect solution would be, if you can define yourself, what is appended (nothing or a user defined text).

Thanks a lot for your plugin, which is a godsend! :-)

Sergei-Korneev commented 1 year ago

@ChrisH4711 Hey. Thank you for your kind words. Version 0.14.7 is already here. So maybe in the future I will do more. It takes time and energy.

ChrisH4711 commented 1 year ago

Hi Sergei,

thanks for your reply and the new version 0.14.7. However, there is no way to remove the appended "_res" in this version. Or am I missing something?

Have a nice day!

Sergei-Korneev commented 1 year ago

@ChrisH4711 Hi. Yeah, this very version was released before your request, so I mean you will have to wait for new version anyway. I agree that adding _res may seem ugly for someone. In 0.14.8 I would like to make some changes in the internal software logic again and add some options. I need to code/test it. Thanks again for you donation!

ChrisH4711 commented 1 year ago

Hi Sergei,

omitting the automatically appended "_res" is not only because of the aesthetics but also for functional reasons. If you use a plugin like https://github.com/RainCat1998/obsidian-custom-attachment-location and have configured it so that the attachments are saved in a subfolder with the file name, then all this no longer works if the images downloaded by your plugin are saved in a subfolder with "_res" at the end of the filename.

And just since you are asking for comments/ideas: An incredibly useful extension of your plugin would be the optional conversion of the downloaded images into WebP format. This could save a big amount of storage space. Concerning this idea please have a look at this discussion: https://forum.obsidian.md/t/compress-images-when-pasted-into-obsidian/11982 In this discussion they talk about automatically converting pasted images to jpeg, but in my opinion WebP would be much better suited, because of the more effective compression (espcially for images with large uniform areas like screenshots).

Thank you very much for your work, which makes life with Obsidian much easier!

Sergei-Korneev commented 1 year ago

Hi, @ChrisH4711 The option you requested was added to 0.14.8. 0.14.8 was tested by me on 10+ websites and now it is pretty usable and slightly faster. And, I will think about your suggestion about webp.

To all: the modification 0.14.7 was not very successful. See release notes and update.

ChrisH4711 commented 1 year ago

Hello Sergei, a thousand thanks for version 0.14.8! I have already tested it and it works wonderfully. It really makes a big difference when you organize your attachments in subdirectories. Best wishes from Austria and have a nice evening!