Add .piskel extension#541
Merged
Merged
Conversation
wjt
added a commit
to endlessm/threadbare
that referenced
this pull request
Sep 23, 2025
Like SVGs, these are stored as plain text, but are not meant to be hand-edited. The “identify” library doesn't recognise *.piskel files as images. Match them by filename. I submitted pre-commit/identify#541 to teach identify about these files; if that change is accepted and released this could be reverted.
asottile
reviewed
Oct 2, 2025
| 'php4': {'text', 'php'}, | ||
| 'php5': {'text', 'php'}, | ||
| 'phtml': {'text', 'php'}, | ||
| 'piskel': {'text', 'image', 'piskel', 'json'}, |
Member
There was a problem hiding this comment.
the image tag was an idea that didn't really pan out so I'm just going to remove it here
Contributor
Author
There was a problem hiding this comment.
That's a shame, because in this case the image tag is just what we want!
Piskel is a browser-based sprite editor. Its file format is JSON-based (though the JSON contains base64-encoded PNG data). Recognise the .piskel extension and identify it analogously to .svg: it is text, image, json and piskel. https://github.com/piskelapp/piskel http://justsolve.archiveteam.org/wiki/Piskel_canvas
wjt
added a commit
to endlessm/threadbare
that referenced
this pull request
Oct 3, 2025
My upstream pull request was merged: - pre-commit/identify#541 The maintainer chose to edit my contribution to not add the `image` tag to piskel files: > the `image` tag was an idea that didn't really pan out so I'm just > going to remove it here Of course that's their prerogative as maintainer! Unfortunately this means that my plan from commit e92fd6d, to exclude all image files with `exclude_types: [image]`, is not going to work. Instead we have to add the `piskel` type explicitly to the list, and also any further text-based image file formats that we find in future. Add `piskel` to the exclude list. Replace the `image` type with `svg`: `svg` is the only format with that type, and since that tag will not be applied to any new formats, it's clearer to be explicit. Remove the regex branches that match piskel files by name. If you have `pre-commit` set up locally, this change will cause the hook to fail: =====> Type tag 'piskel' is not recognized. Try upgrading identify and pre-commit? If you installed `pre-commit` with `uv tool install` you can run: uv tool upgrade pre-commit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Piskel is a browser-based sprite editor. Its file format is JSON-based (though the JSON contains base64-encoded PNG data).
Recognise the .piskel extension and identify it analogously to .svg: it is text, image, json and piskel.
https://github.com/piskelapp/piskel
http://justsolve.archiveteam.org/wiki/Piskel_canvas