Create your original badges
You can create badges widely used by your own!
You can also create original badges!
import scala.xml.Elem
import io.github.nwtgck.svg_badge.SvgBadgeMaker
val 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)
import scala.xml.Elem
import io.github.nwtgck.svg_badge.SvgBadgeMaker
val svg: Elem = SvgBadgeMaker.smartGenerate(subjectText = "build", statusText = "passing", badgeColor = "#6c3")
// Then you can use `svg` variable, for example, `println(svg)` or something.
$ cd <this repo>
$ sbt "runMain io.github.nwtgck.svg_badge.Main" <subject:String> <status:String> <color:String>
$ sbt "runMain io.github.nwtgck.svg_badge.Main build passing #6c3"
Then you can get './build-passing.svg'