buckler

Go library and CLI for making Shields-style badges (PNG)

  • 所有者: badges/buckler
  • 平台:
  • 许可证: Other
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

⛨ Buckler ⛨

deprecated
Build Status
Buckler Shield
Get Hype
MIT License
CLI interface

Buckler is Shields as a Service (ShaaS, or alternatively, Badges as a Service)
for use in GitHub READMEs, or anywhere else. Use buckler with your favorite continuous integration tool, performance
monitoring service API, or ridiculous in-joke to surface information.

Buckler is available hosted at b.repl.ca. You may use the API to generate shields at runtime,
pregenerate them and host them on your own service, or run your own copy of Buckler to protect important company secrets.

API

Buckler tries to make creating shields easy. Each shield request is a url that has three parts:

  • subject
  • status
  • colour

Parts are separated by a hyphen. The request is suffixed by .png and prefixed with the Buckler host and API version, likely
b.repl.ca/v1/. Requests will take the form: http://b.repl.ca/v1/$SUBJECT-$STATUS-$COLOR.png

Examples

Valid Colours

  • brightgreen
  • green
  • yellowgreen
  • yellow
  • orange
  • red
  • grey
  • lightgrey
  • blue

Six digit RGB hexidecimal colour values work as well:

  • 804000 -

Grey?

Don't worry; gray and lightgray work too.

Escaping Underscores and Hyphens

Hyphens (-) are used to delimit individual fields in your shield request. To include a literal hyphen, use two hyphens (--):

http://b.repl.ca/v1/really--cool-status-yellow.png

Similarly, underscores (_) are used to indicated spaces. To include a literal underscore, use two underscores (__):

http://b.repl.ca/v1/__private-method_name-lightgrey.png

URL Safe

Buckler API requests are just HTTP GETs, so remember to URL encode!

http://b.repl.ca/v1/uptime-99.99%25-yellowgreen.png

Try It Out

Play around with the simple form on b.repl.ca

Installing

go get github.com/badges/buckler

Alternatively, git clone and go build to run from source.

Command Line

Buckler also provides a command line interface:

# writes to build-passing-brightgreen.png
buckler -v build -s passing -c brightgreen

# writes to my-custom-filename.png
buckler -v build -s passing -c green my-custom-filename.png

# writes to standard out
buckler -v license -s MIT -c blue -

# writes 2 shields
buckler build-passing-brightgreen.png license-MIT-blue.png

Thanks

主要指标

概览
名称与所有者badges/buckler
主编程语言Go
编程语言Go (语言数: 2)
平台
许可证Other
所有者活动
创建于2013-06-29 11:43:48
推送于2016-11-05 20:36:22
最后一次提交2016-11-04 16:15:46
发布数2
最新版本名称v1.1.0 (发布于 )
第一版名称v1.0.0 (发布于 )
用户参与
星数300
关注者数12
派生数28
提交数97
已启用问题?
问题数23
打开的问题数13
拉请求数7
打开的拉请求数1
关闭的拉请求数2
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?