Analyzer for devicon.json and icon directories#1623
Analyzer for devicon.json and icon directories#1623ConX wants to merge 6 commits intodevicons:developfrom ConX:feat-devicon_json-analyzer
Conversation
| # TODO: Ask the team if theses versions should be removed. | ||
| # icon["versions"]["font"].remove(version) |
There was a problem hiding this comment.
Should the icons listed under ["versions"]["font"] but aren't monochromatic be removed, or is it ok since the Icomoon build can remove them?
There was a problem hiding this comment.
imo they should ideally be removed if they aren't monochromatic. But note that any version can be monochromatic, so you'll have to check the file content to find out.
There was a problem hiding this comment.
The function does that; I just have commented out the line that removes it from the devicon.json. The function simply checks how many fill colors there are, and if it's more than one, it marks it as "non-monochromatic." Moreover, it also checks if there is the word "gradient" in the file.
There was a problem hiding this comment.
As a data point, looking at the output from the current develop branch 30 icons will be removed from the font version references.
|
Seriously @ConX, you made a really great job here. |
- Implemented bounding box check using Selenium, since I couldn't find a good python implementation. Due to this it's slow, taking about 15 minutes for the whole `icons/` directory in develop. This check is disabled by default and requires the `-b` flag. - Improved code organization. Later we might need to split into multiple files. Extracted a few more utility functions.
This will need to be moved or merged depending on how we plan to use the script and organize the `.github/` directory.
|
Thanks a lot for the kind words @lunatic-fox! 🚀 I just pushed a couple of commits, the major change them being the following:
The good news is that the view box must be correct for all icons in {
"apl": ["plain"],
"bash": ["plain"],
"blender": ["original-wordmark"],
"capacitor": ["original", "plain", "plain-wordmark"],
"cassandra": ["plain-wordmark"],
"clarity": ["original-wordmark", "plain-wordmark"],
"codepen": ["plain"],
"composer": ["original"],
"cplusplus": ["line"],
"crystal": ["original-wordmark"],
"discordjs": ["original", "original-wordmark", "plain", "plain-wordmark"],
"embeddedc": ["plain"],
"fastapi": ["original", "plain"],
"faunadb": ["line", "line-wordmark", "original", "original-wordmark"],
"figma": ["original", "plain"],
"fortran": ["original"],
"hadoop": ["original-wordmark", "plain-wordmark"],
"hardhat": ["original-wordmark", "plain-wordmark"],
"jeet": ["original", "original-wordmark"],
"julia": ["original-wordmark", "plain-wordmark"],
"kaggle": ["original"],
"labview": ["original", "original-wordmark"],
"laravel": ["original"],
"materializecss": ["original", "plain"],
"mobx": ["original", "plain"],
"nestjs": ["plain"],
"nuxtjs": ["original-wordmark", "plain-wordmark"],
"packer": ["original"],
"perl": ["original", "plain"],
"pfsense": ["original"],
"phoenix": ["original-wordmark"],
"photonengine": ["original", "plain"],
"processing": ["original", "original-wordmark"],
"qodana": ["original", "plain"],
"qt": ["original"],
"rails": ["plain-wordmark"],
"rspec": ["original"],
"socketio": ["original-wordmark"],
"solidity": ["original"],
"spring": ["original", "plain"],
"spss": ["plain"],
"sqlalchemy": ["original-wordmark"],
"sqlite": ["original-wordmark", "plain", "plain-wordmark"],
"stata": ["original-wordmark"],
"svelte": ["original"],
"tauri": ["original"],
"tensorflow": ["line-wordmark", "original-wordmark"],
"twitter": ["original"],
"vercel": ["original-wordmark"],
"vertx": ["original"],
"vscode": ["original", "original-wordmark", "plain", "plain-wordmark"],
"vuejs": ["line-wordmark", "original-wordmark", "plain", "plain-wordmark"],
"weblate": ["original", "plain"],
"woocommerce": ["original", "plain"],
"yii": ["original-wordmark", "plain-wordmark"],
"yunohost": ["original"]
} |
This is a much faster implementation than the previous with Selenium.
Panquesito7
left a comment
There was a problem hiding this comment.
I'm no Python expert, but from what can I see, this is looking great!
Thank you so much for your contributions. 🚀
|
@ConX great work on this! I've started reviewing it a bit, but I don't have much time for devicons lately, so it might take some time before the full review comes out. Also thank you for providing the list of icons that extend past the viewbox. I'm looking forward to checking out how you check it :D |
This script is based on https://gist.github.com/lunatic-fox/60e5eb541b299812b3c123fdc0cf4668 by @lunatic-fox
Double-check these details before you open a PR
Features
This is a modified version of the
analyzer.pyscript by @lunatic-fox with the following improvements:devicon.jsonbased on all the changesicons/directory for fixing the current state or per technology later during PRsHelp
Example report when ran in the current
developbranchCorresponding
devicon.jsondiffThis PR closes NONE
Notes
This is an early PR to get feedback if this is useful and if it fits with all other scripts and plans of the dev team. The script likely needs more testing before being used for repo changes.