-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add Functionality to API #323
Comments
I fully agree with your first two points. The exif handler function should be very straightforward as you point out. The different utility methods in Everything in Getting a logger directly from utils should be safe, I don't see that infrastructure changing (anytime soon). Do you think it makes sense to have a dedicated I would not expose the styles in their current state as I am not 100 % happy with the string-based usage all over the place, so there are quite some chances that this could change at some point 😆 |
I do not really have a strong opinion about the Do you want me to make a proposition for the first two point in a PR or do you want to look into it yourself? |
If you don't mind, I would take a further look at this over the week-end. I feel like some mistakes were made in the mark module, e.g. |
While working with the api for some plugins I noticed some missing functionality:
api.mark
: Additionally, it should expose:api.mark.is_marked(name: str)
to check if a image is marked. Currently this required accessing the privateapi.mark._marked
list.api.mark.mark2(name: str)
which marks the image no matter is it is already marked or not. Currently this required checking if the image is already marked and useapi.mark.mark
only when it is not.api.mark.unmark(name: str)
which unmarks the image no matter if it is marked or not. This and the previous functionality could also be added toapi.mark.mark
using certain flags.api.mark._markdone
signal has to be emitted manually it may be a good idea to provide the above mentioned functionality also for a list of paths. Currently one has to add/remove all images to/fromapi.mark._marked
and then manually emit the signal.imutils.exif.ExifHandler
: We should add something likeapi.get_exifhander(path: str) -> ExifHandler
which returns the exif handler for a certain path. Currently this is done usingimutils.exif.ExifHandler(path)
.Besides that, one has to use
utils.log.module_logger
to get a logger, and to access the vimiv colors one has to useconfig.styles
. For the status bar module I have also come across usingutils.wrap_style_span
.I am not sure where we have to draw the line between what to expose to the API and what is acceptable to access directly. 😊 I think my first two points would be acceptable to add. But let me know what you think.
The text was updated successfully, but these errors were encountered: