menuinst icon indicating copy to clipboard operation
menuinst copied to clipboard

Refactor file-type and URL protocol associations for better reusability

Open jaimergp opened this issue 1 year ago • 0 comments

Checklist

  • [X] I added a descriptive title
  • [X] I searched open requests and couldn't find a duplicate

What is the idea?

menuinst has multiplatform file-type and URL protocol association, but these routines are embedded in the Shortcut classes. It would be desirable to have at least an external module that offers a menuinst-agnostic API for external reusability. Even a different package altogether? If maintainability is a concern, it could be vendored like we do with apipkg too. It's just Python code after all.

Why is this needed?

Some applications might need to change their file type associations at runtime (e.g. preferences for the user, plugin systems).

What should happen?

A new module or package should provide a unified API to register and deregister file types and URL protocols for all platforms.

Additional Context

Discussed in this week's napari packaging meeting (2023-02-21).

jaimergp avatar Feb 22 '24 16:02 jaimergp