Giter Site home page Giter Site logo

jaywcjlove_generated-badges's Introduction

Generated Badges

Build & Deploy npm version

Create a badge using GitHub Actions and GitHub Workflow CPU time (no 3rd parties servers)

Install

$ npm i generated-badges -g

Command Help

Usage: generated-badges [options] [--help|h]

Options:

  --version, -v   Show version number.
  --help, -h      Displays help information.
  --output, -o    Output svg image path.
  --label, -l     The left label of the badge, usually static.
  --labelColor    <Color RGB> or <Color Name> (default: '555')
  --style         Badges style: flat, classic.
  --status, -s    Override default status text.
  --scale         Set badge scale (default: 1).
  --color, -c     <Color RGB> or <Color Name> (default: 'blue').'
  --gradient, -g  Adding a gradient to a badge.'

Example:

  generated-badges --output coverage/badges.svg
  generated-badges --style classic
  generated-badges --color red
  generated-badges --gradient c05cff --gradient fa5b37

Github Actions

- run: mkdir -p build

- name: Generate Badges
  uses: jaywcjlove/generated-badges@main
  with:
    label: color
    status: cyan
    output: build/cyan.svg

- name: Deploy
  uses: peaceiris/actions-gh-pages@v3
  with:
    github_token: xxxxxxx
    publish_dir: ./build

Available color names:

blue badges cyan badges green badges yellow badges red badges pink badges purple badges grey badges black badges gradient badges

Input Parameters

  • label - The left label of the badge, usually static. (default :label)
  • status - The right status as the badge, usually based on results. (default :status)
  • style - Badges style: flat, classic. (default classic)
  • color - An array (comma separated) with hex or named colors of the badge value background. (default blue)
  • labelColor - Hex or named color for the label. (default 555)
  • output - Output image path. (default BADGES.svg)
  • scale - Set badge scale. (default 1)
  • gradient - Adding a gradient to a badge. (example c05cff,fa5b37)

Output Parameters

  • svg svg image string: <svg xmlns.....

Related

Contributors

As always, thanks to our amazing contributors!

Made with github-action-contributors.

License

Licensed under the MIT License.

jaywcjlove_generated-badges's People

Contributors

jaywcjlove avatar renovate[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.