This commit is contained in:
sezanzeb 2020-12-20 18:19:33 +01:00
parent c767d87b74
commit e189ffa04f
3 changed files with 16 additions and 12 deletions

View File

@ -4,18 +4,20 @@
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<mask id="a">
<mask id="anybadge_1">
<rect width="99" height="20" rx="3" fill="#fff"/>
</mask>
<g mask="url(#a)">
<path fill="#555" d="M0 0h63v20H0z"/>
<path fill="#97CA00" d="M63 0h36v20H63z"/>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h65v20H0z"/>
<path fill="#4c1" d="M65 0h34v20H65z"/>
<path fill="url(#b)" d="M0 0h99v20H0z"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="31.5" y="15" fill="#010101" fill-opacity=".3">coverage</text>
<text x="31.5" y="14">coverage</text>
<text x="80" y="15" fill="#010101" fill-opacity=".3">91%</text>
<text x="80" y="14">91%</text>
<text x="33.5" y="15" fill="#010101" fill-opacity=".3">coverage</text>
<text x="32.5" y="14">coverage</text>
</g>
</svg>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="83.0" y="15" fill="#010101" fill-opacity=".3">91%</text>
<text x="82.0" y="14">91%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 904 B

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -56,7 +56,6 @@ depending on the version configured in setup.py
```bash
sudo pip install git+https://github.com/jongracecox/anybadge
sudo pip install git+https://github.com/dbrgn/coverage-badge
./scripts/badges.sh
```

View File

@ -1,12 +1,14 @@
#!/usr/bin/env bash
# sudo pip install git+https://github.com/jongracecox/anybadge
# sudo pip install git+https://github.com/dbrgn/coverage-badge
coverage_badge() {
coverage run tests/test.py
coverage combine
python3 -m coverage_badge > readme/coverage.svg
rating=$(coverage report | tail -n 1 | ack "\d+%" -o | ack "\d+" -o)
rm readme/coverage.svg
anybadge -l coverage -v $rating -f readme/coverage.svg coverage
coverage report -m
echo "coverage badge created"
}
@ -16,6 +18,7 @@ pylint_badge() {
rating=$(echo $pylint_output | grep -Po "rated at .+?/" | grep -Po "\d+.\d+")
rm readme/pylint.svg
anybadge -l pylint -v $rating -f readme/pylint.svg pylint
echo $rating
echo "pylint badge created"
}