Skip to content

Commit

Permalink
Release 14 new icons and 92 updated icons (v4.3.0)
Browse files Browse the repository at this point in the history
# New Icons

- Abbvie (#3645)
- AI Dungeon (#3662)
- AWS Amplify (#3612)
- BigCommerce (#4387)
- Dacia (#4338)
- Dialogflow (#3460)
- Fastlane (#3906)
- Fing (#4339)
- Fozzy (#4301)
- Katacoda (#3790)
- ProtonDB (#3670)
- SteamDB (#3665)
- STMicroelectronics (#4140)
- Tasmota (#4349)
- Zenn (#4372)

# Updated Icons

- Adobe Premiere Pro (#3384)
- Apache Ant (#4406)
- Apache Cassandra (#3968)
- Apache Flink (#4375, #4343)
- Apache Groovy (#4375)
- Apache Kafka (#4344)
- Apache RocketMQ (#4345)
- Apache Solr (#4375)
- Apple (#3970)
- Apple Music (#3971)
- Bath ASU (#3993)
- Beatport (#3994)
- Bitrise (#4143)
- BMC Software (#3999)
- Boost (#4001)
- Bootstrap (#4388)
- Buddy (#4003)
- Clyp (#4008)
- Composer (#4014)
- Coursera (#4016)
- Dash (#4018)
- Dependabot (#4022)
- Drupal (#4260)
- Dunked (#4028)
- Dynatrace (#4029)
- Elastic (#4030)
- Elastic Stack (#4033)
- Elasticsearch (#4032)
- Empire Kred (#4037)
- F-Secure (#4041)
- FACEIT (#4145)
- Fandom (#4043)
- Favro (#4044)
- FeatHub (#4045)
- Figma (#4376)
- Fiverr (#4377)
- GIMP (#4051)
- GNU (#3866)
- Godot Engine (#4055)
- Google Podcasts (#3902)
- Google Tag Manager (#3903)
- Gradle (#4061)
- HappyCow (#3905)
- HP (#4146)
- Iata (#4072)
- Itch.io (#4374)
- Kaspersky (#3910)
- LaTeX (#3865)
- LineageOS (#4086)
- Linode (#4087)
- Logstash (#4147)
- Magisk (#4096)
- MailChimp (#3914)
- Mastodon (#4098)
- Mathworks (#4099)
- Medium (#4337)
- Meetup (#4101)
- Micro.blog (#4148)
- Microsoft Office (#4103)
- Mixcloud (#3161)
- Netflix (#4367)
- Netlify (#4108)
- OCaml (#4155)
- Octave (#4157)
- Odnoklassniki (#4158)
- Open Access (#4159)
- Open Source Initiative (#3925)
- Origin (#4161)
- Pantheon (#4164)
- Parse.ly (#4165)
- Patreon (#4166)
- PeerTube (#4149)
- Piwigo (#4168)
- Plurk (#4170)
- Qi (#3927)
- Qiita (#3928)
- Quasar (#3929)
- Read the Docs (#4179)
- Scaleway (#3934)
- SemVer (#4414)
- SonicWall (#4192)
- Source Engine (#4193)
- Stitcher (#3116)
- TELE5 (#3941)
- Terraform (#4223)
- Travis CI (#4330)
- Trove (#3943)
- TypeScript (#4370)
- Unilever (#4380)
- Vauxhall (#3944)
- Vultr (#3870)
- WebAuthn (#3945)
- YouTube Music (#4404)
- ZDF (#3948)
  • Loading branch information
ericcornelissen committed Dec 20, 2020
2 parents 2514621 + bcfcab9 commit 09fa8aa
Show file tree
Hide file tree
Showing 124 changed files with 565 additions and 260 deletions.
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ insert_final_newline=false
trim_trailing_whitespace=false # Templates with trailing whitespace are more usable

[_data/simple-icons.json]
indent_style=space
indent_size=4
trim_trailing_whitespace=true
File renamed without changes.
13 changes: 13 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Automated releases
on:
schedule:
# "At 00:00 on Sunday" (https://crontab.guru/once-a-week)
- cron: "0 0 * * 0"

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: simple-icons/release-action@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
13 changes: 13 additions & 0 deletions .github/workflows/merge-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Automated releases
on:
pull_request_review:
types: [submitted]

jobs:
release:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'release')
steps:
- uses: simple-icons/release-action@master
with:
repo-token: ${{ secrets.RELEASE_TOKEN }}
16 changes: 0 additions & 16 deletions .github/workflows/release.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/remove-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Remove outdated labels
on:
pull_request_target:
types:
- closed
issues:
types:
- closed

jobs:
remove-merged-pr-labels:
name: Remove merged pull request labels
if: github.event.pull_request.merged
runs-on: ubuntu-latest
steps:
- uses: mondeja/remove-labels-gh-action@v1.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: |
awaiting reply
changes requested
duplicate
in discussion
invalid
out of scope
pending
won't add
remove-closed-pr-labels:
name: Remove closed pull request labels
if: github.event_name == 'pull_request_target' && (! github.event.pull_request.merged)
runs-on: ubuntu-latest
steps:
- uses: mondeja/remove-labels-gh-action@v1.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: |
in discussion
pending
remove-closed-issue-labels:
name: Remove closed issue labels
if: github.event.issue.state == 'closed'
runs-on: ubuntu-latest
steps:
- uses: mondeja/remove-labels-gh-action@v1.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: |
in discussion
pending
tracking
133 changes: 36 additions & 97 deletions .svglint-ignored.json

Large diffs are not rendered by default.

166 changes: 164 additions & 2 deletions .svglintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ const fs = require('fs');

const data = require("./_data/simple-icons.json");
const { htmlFriendlyToTitle } = require("./scripts/utils.js");
const svgPath = require("svgpath");
const parsePath = require("svgpath/lib/path_parse");
const { svgPathBbox } = require("svg-path-bbox");

const titleRegexp = /(.+) icon$/;
const svgRegexp = /^<svg( [^\s]*=".*"){3}><title>.*<\/title><path d=".*"\/><\/svg>\r?\n?$/;
const negativeZerosRegexp = /-0(?=[^\.]|[\s\d\w]|$)/g;

const iconSize = 24;
const iconFloatPrecision = 3;
Expand All @@ -32,6 +34,11 @@ function sortObjectByValue(obj) {
.reduce((r, k) => Object.assign(r, { [k]: obj[k] }), {});
}

function removeLeadingZeros(number) {
// convert 0.03 to '.03'
return number.toString().replace(/^(-?)(0)(\.?.+)/, '$1$3');
}

if (updateIgnoreFile) {
process.on('exit', () => {
// ensure object output order is consistent due to async svglint processing
Expand All @@ -49,7 +56,7 @@ if (updateIgnoreFile) {
}

function isIgnored(linterName, path) {
return iconIgnored[linterName].hasOwnProperty(path);
return iconIgnored[linterName] && iconIgnored[linterName].hasOwnProperty(path);
}

function ignoreIcon(linterName, path, $) {
Expand Down Expand Up @@ -138,7 +145,7 @@ module.exports = {
if (!updateIgnoreFile && isIgnored(reporter.name, iconPath)) {
return;
}

const { segments } = parsePath(iconPath);
const segmentParts = segments.flat().filter((num) => (typeof num === 'number'));

Expand All @@ -163,6 +170,137 @@ module.exports = {
}
}
},
function(reporter, $, ast) {
reporter.name = "ineffective-segments";

const iconPath = $.find("path").attr("d");
if (!updateIgnoreFile && isIgnored(reporter.name, iconPath)) {
return;
}

const { segments } = parsePath(iconPath);
const { segments: absSegments } = svgPath(iconPath).abs().unshort();

const lowerMovementCommands = ['m', 'l'];
const lowerDirectionCommands = ['h', 'v'];
const lowerCurveCommand = 'c';
const lowerShorthandCurveCommand = 's';
const lowerCurveCommands = [lowerCurveCommand, lowerShorthandCurveCommand];
const upperMovementCommands = ['M', 'L'];
const upperHorDirectionCommand = 'H';
const upperVerDirectionCommand = 'V';
const upperDirectionCommands = [upperHorDirectionCommand, upperVerDirectionCommand];
const upperCurveCommand = 'C';
const upperShorthandCurveCommand = 'S';
const upperCurveCommands = [upperCurveCommand, upperShorthandCurveCommand];
const curveCommands = [...lowerCurveCommands, ...upperCurveCommands];
const commands = [...lowerMovementCommands, ...lowerDirectionCommands, ...upperMovementCommands, ...upperDirectionCommands, ...curveCommands];
const getInvalidSegments = ([command, x1Coord, y1Coord, ...rest], index) => {
if (commands.includes(command)) {
// Relative directions (h or v) having a length of 0
if (lowerDirectionCommands.includes(command) && x1Coord === 0) {
return true;
}
// Relative movement (m or l) having a distance of 0
if (lowerMovementCommands.includes(command) && x1Coord === 0 && y1Coord === 0) {
return true;
}
if (lowerCurveCommands.includes(command) && x1Coord === 0 && y1Coord === 0) {
const [x2Coord, y2Coord] = rest;
if (
// Relative shorthand curve (s) having a control point of 0
command === lowerShorthandCurveCommand ||
// Relative bézier curve (c) having control points of 0
(command === lowerCurveCommand && x2Coord === 0 && y2Coord === 0)
) {
return true;
}
}
if (index > 0) {
let [yPrevCoord, xPrevCoord, ...prevRest] = [...absSegments[index - 1]].reverse();
// If the previous command was a direction one, we need to iterate back until we find the missing coordinates
if (upperDirectionCommands.includes(xPrevCoord)) {
xPrevCoord = undefined;
yPrevCoord = undefined;
let idx = index;
while (--idx > 0 && (xPrevCoord === undefined || yPrevCoord === undefined)) {
let [yPrevCoordDeep, xPrevCoordDeep, ...rest] = [...absSegments[idx]].reverse();
// If the previous command was a horizontal movement, we need to consider the single coordinate as x
if (upperHorDirectionCommand === xPrevCoordDeep) {
xPrevCoordDeep = yPrevCoordDeep;
yPrevCoordDeep = undefined;
}
// If the previous command was a vertical movement, we need to consider the single coordinate as y
if (upperVerDirectionCommand === xPrevCoordDeep) {
xPrevCoordDeep = undefined;
}
if (xPrevCoord === undefined && xPrevCoordDeep !== undefined) {
xPrevCoord = xPrevCoordDeep;
}
if (yPrevCoord === undefined && yPrevCoordDeep !== undefined) {
yPrevCoord = yPrevCoordDeep;
}
}
}

if (upperCurveCommands.includes(command)) {
const [x2Coord, y2Coord, xCoord, yCoord] = rest;
// Absolute shorthand curve (S) having the same coordinate as the previous segment and a control point equal to the ending point
if (upperShorthandCurveCommand === command && x1Coord === xPrevCoord && y1Coord === yPrevCoord && x1Coord === x2Coord && y1Coord === y2Coord) {
return true;
}
// Absolute bézier curve (C) having the same coordinate as the previous segment and last control point equal to the ending point
if (upperCurveCommand === command && x1Coord === xPrevCoord && y1Coord === yPrevCoord && x2Coord === xCoord && y2Coord === yCoord) {
return true;
}
}

return (
// Absolute horizontal direction (H) having the same x coordinate as the previous segment
(upperHorDirectionCommand === command && x1Coord === xPrevCoord) ||
// Absolute vertical direction (V) having the same y coordinate as the previous segment
(upperVerDirectionCommand === command && x1Coord === yPrevCoord) ||
// Absolute movement (M or L) having the same coordinate as the previous segment
(upperMovementCommands.includes(command) && x1Coord === xPrevCoord && y1Coord === yPrevCoord)
);
}
}
};
const invalidSegments = segments.filter(getInvalidSegments);

if (invalidSegments.length) {
invalidSegments.forEach(([command, x1Coord, y1Coord, ...rest]) => {
let readableSegment = `${command}${x1Coord}`,
resolutionTip = 'should be removed';
if (y1Coord !== undefined) {
readableSegment += ` ${y1Coord}`;
}
if (curveCommands.includes(command)) {
const [x2Coord, y2Coord, xCoord, yCoord] = rest;
readableSegment += `, ${x2Coord} ${y2Coord}`;
if (yCoord !== undefined) {
readableSegment += `, ${xCoord} ${yCoord}`;
}
if (command === lowerShorthandCurveCommand && (x2Coord !== 0 || y2Coord !== 0)) {
resolutionTip = `should be "l${removeLeadingZeros(x2Coord)} ${removeLeadingZeros(y2Coord)}" or removed`;
}
if (command === upperShorthandCurveCommand) {
resolutionTip = `should be "L${removeLeadingZeros(x2Coord)} ${removeLeadingZeros(y2Coord)}" or removed`;
}
if (command === lowerCurveCommand && (xCoord !== 0 || yCoord !== 0)) {
resolutionTip = `should be "l${removeLeadingZeros(xCoord)} ${removeLeadingZeros(yCoord)}" or removed`;
}
if (command === upperCurveCommand) {
resolutionTip = `should be "L${removeLeadingZeros(xCoord)} ${removeLeadingZeros(yCoord)}" or removed`;
}
}
reporter.error(`Ineffective segment "${readableSegment}" in path (${resolutionTip}).`);
});
if (updateIgnoreFile) {
ignoreIcon(reporter.name, iconPath, $);
}
}
},
function(reporter, $, ast) {
reporter.name = "extraneous";

Expand All @@ -171,6 +309,30 @@ module.exports = {
reporter.error("Unexpected character(s), most likely extraneous whitespace, detected in SVG markup");
}
},
function(reporter, $, ast) {
reporter.name = "negative-zeros";

const iconPath = $.find("path").attr("d");
if (!updateIgnoreFile && isIgnored(reporter.name, iconPath)) {
return;
}

// Find negative zeros inside path
const negativeZeroMatches = Array.from(iconPath.matchAll(negativeZerosRegexp));
if (negativeZeroMatches.length) {
// Calculate the index for each match in the file
const pathDStart = '<path d="';
const svgFileHtml = $.html();
const pathDIndex = svgFileHtml.indexOf(pathDStart) + pathDStart.length;

negativeZeroMatches.forEach((match) => {
const negativeZeroFileIndex = match.index + pathDIndex;
const previousChar = svgFileHtml[negativeZeroFileIndex - 1];
const replacement = "0123456789".includes(previousChar) ? " 0" : "0";
reporter.error(`Found "-0" at index ${negativeZeroFileIndex} (should be "${replacement}")`);
})
}
},
function(reporter, $, ast) {
reporter.name = "icon-centered";

Expand Down
21 changes: 17 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,22 @@ Simple Icons welcomes contributions and corrections. Before contributing, please
We welcome icon requests. Before you submit a new issue please make sure the icon:

* Has not already been requested. If you find an existing issue or pull request for the brand you're looking for then please add a reaction or comment to show your support.
* Is of a _popular_ brand. For websites, the [Alexa rank](https://www.alexa.com/siteinfo) should be less than 500k. For anything else, popularity will be judged on a case-by-case basis.
* Isn't related to anything that provides an illegal service (e.g. piracy, malware, threatening material, spam, etc.).

* Is of a _popular_ brand:
- For websites, the [Alexa rank](https://www.alexa.com/siteinfo) should be less than 500k.
- For GitHub projects, the amount of "stars" should be above 5k.
- For anything else, popularity will be judged on a case-by-case basis.
* Doesn't fall into one of the following categories:
- Illegal service (e.g. piracy, malware, threatening material, spam etc.)
- Governmental agencies, programs, departments
- Allowed: International organizations and NGOs with supranational interests
- Allowed: Space agencies
- Symbols, including flags and banners
- Sport clubs
- Allowed: Sport organizations
- Yearly releases
- Universities or other educational institutions
- Any brands representing individuals rather than an organization, company or product. This includes musicians, bands, and social media personalities.

If you are in doubt, feel free to submit it and we'll have a look.

When submitting a request for a new or updated icon include helpful information such as:
Expand Down Expand Up @@ -237,7 +250,7 @@ If you have an affiliation to the brand you contributing that allows you to spea

## Testing Package Locally

* Make sure you have [NodeJS](https://nodejs.org/en/download/) installed. At least version 11.15.0 is required.
* Make sure you have [NodeJS](https://nodejs.org/en/download/) installed. At least version 12.4.0 is required.
* Install the dependencies using `$ npm install`.
* Build and test the package using `$ npm test`.
* Run the project linting process using `$ npm run lint`.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,6 @@ Icons are also available as a [WordPress plugin](https://wordpress.org/plugins/s

## Status

[![Build status](https://github.com/simple-icons/simple-icons/workflows/Verify/badge.svg)](https://github.com/simple-icons/simple-icons/actions?query=workflow%3AVerify+branch%3Adevelop)
[![npm version](https://img.shields.io/npm/v/simple-icons.svg)](https://www.npmjs.com/package/simple-icons)
[![Build status](https://img.shields.io/github/workflow/status/simple-icons/simple-icons/Verify/develop?logo=github)](https://github.com/simple-icons/simple-icons/actions?query=workflow%3AVerify+branch%3Adevelop)
[![npm version](https://img.shields.io/npm/v/simple-icons.svg?logo=npm)](https://www.npmjs.com/package/simple-icons)
[![Packagist version](https://img.shields.io/packagist/v/simple-icons/simple-icons)](https://packagist.org/packages/simple-icons/simple-icons)

0 comments on commit 09fa8aa

Please sign in to comment.