Skip to main content

Commandline Interface to create shields.io style badges as SVG.

Project description

Copyright (c) 2017 Joakim Uddholm

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Description: badger
======
|version| |coverage|

Commandline Interface to create svg badges.

Install
-------

.. code:: bash

pip install badger

Usage (Commandline)
-------------------

Simplest use case of static label and value:

.. code:: bash

badger version v0.1.2

Percentage mode, with color picked relative to where in the 0-100 range
the value is.

.. code:: bash

badger -p coverage 71.29%


Usage (Package)
---------------

.. code:: python

from badger import Badge, PercentageBadge

badge = Badge("version", "v0.1.2")
badge.save("examples/version.svg")

percentage_badge = PercentageBadge("coverage", 71.29)
badge.save("examples/coverage.svg")

Disclaimer
==========

Code originally heavily copied from https://github.com/dbrgn/coverage-badge . Badge
design originally from https://github.com/badges/shields

.. |version| image:: examples/version.svg
.. |coverage| image:: examples/coverage.svg



Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

badger-0.1.2.tar.gz (387.1 kB view details)

Uploaded Source

Built Distribution

badger-0.1.2-py2.py3-none-any.whl (387.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file badger-0.1.2.tar.gz.

File metadata

  • Download URL: badger-0.1.2.tar.gz
  • Upload date:
  • Size: 387.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for badger-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7b638174ba20c66b2a3ab11a6c9469a0a2746ba031d18beec2d6e157b938d1c9
MD5 c077b1ed4125c8fe9ccb34042a6ddc61
BLAKE2b-256 9ff8aaa69976d847038626a4c849ae161797fd13f0ac67b2fa2d796979ee8586

See more details on using hashes here.

File details

Details for the file badger-0.1.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for badger-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ba2dab10bb9fd9de70cb9f1434f8654b590f6c11e23fdd6a89739ba424ac1525
MD5 64021fa206ee8766876ff63ba510fe7c
BLAKE2b-256 1e7f3008c7a4206c9680da015533df1aee79edcd04d440f91e0545664a42a70c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page