Skip to content
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

Host list of supported file type icons online #68

Open
FichteFoll opened this issue Mar 29, 2021 · 3 comments
Open

Host list of supported file type icons online #68

FichteFoll opened this issue Mar 29, 2021 · 3 comments

Comments

@FichteFoll
Copy link
Collaborator

FichteFoll commented Mar 29, 2021

Instead of bundling the list of supported file type icons, I believe it would be more convenient to modify the list of supported icons from a remote place, have the plugin fetch the mapping as a JSON file from some static URL, cache that locally, and base icon name resolution on that. With this, it wouldn't be required to package a new release simply for an added icon.

A suitable location would be a JSON file in the default branch, where it would double-serve as an automatically semi-up-to-date fallback for packaged releases (readable via sublime.load_resource).

@Snazzah
Copy link
Owner

Snazzah commented Apr 1, 2021

Sounds like a great idea. Not sure how to get a remote resource (since I haven't done much with sublime packages) but this would work better than making a patch release on every update. Feel free to PR if you want since I might be too busy to focus on this.

@FichteFoll
Copy link
Collaborator Author

FichteFoll commented Apr 1, 2021

You could easily use urllib.request.urlopen, i.e.

with urllib.reques.urlopen(ICON_MAP_URL) as response:
    if response.status != 200:
        raise RuntimeError("whatever")
    data = json.load(response)

Alternatively, requests as a dependency.

I don't have a personal interest in this as I don't use the package and have much higher priority issues, so don't count on me for a PR. I just noticed through my notifications that the last couple releases were only icon additions.

@Snazzah
Copy link
Owner

Snazzah commented Apr 12, 2021

I'll look into doing this later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants