lucaorio / obsidian-image-gallery

A zero setup masonry image gallery for Obsidian
MIT License
186 stars 14 forks source link

(deleted) A universal way to add images from folders or individual files to gallery - `targets` #22

Closed Steindvart closed 1 year ago

Steindvart commented 1 year ago

What does this PR?

When I started using the plugin, adding only directories with images seemed inconvenient to me. Because I required the ability to add individual files also. In my revision, I added this feature, made this method universal (you can specify both directories and individual files) and slightly improved other points.

Change list

For example:

```img-gallery
targets:
- Science\Bio\_img\plants\
- Science\Physics\_img\light\
- urban\_img\landscaping0.jpg
- urban\_img\landscaping1.jpg
type: horizontal


- Backward compatibility with the `path` field has been preserved. But now it is not “required” and marked as “deprecated” because `targets` is the preferred method because of its versatility. Field `path` can be used together with the field `targets`, images from these sources will be merged in the gallery.
- Improved warnings and error messages. If `path` or any target from `targets` is incorrect, a warning about it will be entered in the console. If the resulting list of files turns out to be empty, a corresponding error will be output to the container.
- Update README according to the relevant changes.
- Bump version to `1.2.0`.

## Conclusion
If you have any feedback: code additions, suggestions, comments, questions. I will be glad! :)