Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nwtgck/svg-badge-scala
SVG Badge maker in Scala
https://github.com/nwtgck/svg-badge-scala
badge generator scala sheild sheild-badge status-badge svg
Last synced: about 1 month ago
JSON representation
SVG Badge maker in Scala
- Host: GitHub
- URL: https://github.com/nwtgck/svg-badge-scala
- Owner: nwtgck
- Created: 2017-09-18T23:15:40.000Z (over 7 years ago)
- Default Branch: develop
- Last Pushed: 2018-12-16T01:26:33.000Z (about 6 years ago)
- Last Synced: 2024-10-26T17:49:35.874Z (3 months ago)
- Topics: badge, generator, scala, sheild, sheild-badge, status-badge, svg
- Language: Scala
- Size: 12.7 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# svg-badge
[![CircleCI](https://circleci.com/gh/nwtgck/svg-badge-scala.svg?style=shield)](https://circleci.com/gh/nwtgck/svg-badge-scala)Create your original badges
## Usual badges
You can create badges widely used by your own!
![build|passing](./output-svg/build-passing.svg)
![build|failing](./output-svg/build-failing.svg)
![converage|91%](./output-svg/coverage-91%25.svg)
![license|MIT](./output-svg/license-mit.svg)
## Original badges
You can also create original badges!
![developer|Pythonista](./output-svg/developer-pythonista.svg)
![developer|Rubyist](./output-svg/developer-rubyist.svg)
![developer|Haskeller](./output-svg/developer-haskeller.svg)
![creator|YouTuber](./output-svg/creator-youtuber.svg)
etc...## How to use as a library
```scala
import scala.xml.Elem
import io.github.nwtgck.svg_badge.SvgBadgeMakerval svg: Elem = SvgBadgeMaker.generate(width = 90, subjectWidth = 40, subjectText = "build", statusText = "passing", badgeColor = "#6c3")
// Then you can use `svg` variable, for example, `println(svg)` or something.
```or (use `smartGenerate` which allows you not to specify widths)
```scala
import scala.xml.Elem
import io.github.nwtgck.svg_badge.SvgBadgeMakerval svg: Elem = SvgBadgeMaker.smartGenerate(subjectText = "build", statusText = "passing", badgeColor = "#6c3")
// Then you can use `svg` variable, for example, `println(svg)` or something.
```## How to use this as an executable program
```sh
$ cd
$ sbt "runMain io.github.nwtgck.svg_badge.Main"
```### Example - [build | passing]
```sh
$ sbt "runMain io.github.nwtgck.svg_badge.Main build passing #6c3"
```Then you can get `'./build-passing.svg'`