Giter Club home page Giter Club logo

buckler's Introduction

⛨ 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

buckler's People

Contributors

jbowes avatar kevinli avatar nathany avatar peterdavehello avatar philoserf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

buckler's Issues

revise URLs

Reticketed from badges/shields#84.

I believe @olivierlacan has asked for /first/second.png?color. I like the idea of prefixing the path with /v1, though that breaks backcompat (not too worried about that yet?).

implement status resolution w/ caching

Reticketed from badges/shields#84.

Currently we hit an HTTP backend to resolve a token such as (travis-ci, rails/rails) into (build, passing). This will need to be a well-documented API as it will be how we on-board third-party services.

Should escape < and > and /

I'm trying to create a badge that says "<script>" and "</script>" and the site yields 503s whenever I include < or > or / -- even if I url-encode and/or http-encode the parameter. I suspect many non-[a-zA-Z0-9] have a similar concern.

Shields are so fuzzy on retina screens they are basically unreadable

I don't think this is just due to the images being 1x — lots of 1x images are at least still as readable as they were before on a 2x screen. For some reason, the particular antialiasing and shadows on these badges are super hard to read on a 2x screen. Fuzzy and illegible and make my eyes hurt.

Scale

Thanks for this project! It's awesome!

I'd like to know if it's possible to get the shields in different scale, like the "retina" version of shields. Something like "@2x" after the shield name or some other param to assign the size of the required image.

Problem with slash "/"

I'm having trouble to get shields with a slash, both on the vendor and on the status.

I've also tried the URI code for slash %2F but there's no change.

Standalone binary

package up all assets into a single binary that can be attached to github releases

Shippable build not working for branches except master

I've noticed that images for Shippable builds are not working for branches except master.

Thus the following three images always yield the same result (from master):

https://img.shields.io/shippable/54d119db5ab6cc13528ab183/master.svg
https://img.shields.io/shippable/54d119db5ab6cc13528ab183/staging.svg
https://img.shields.io/shippable/54d119db5ab6cc13528ab183/production.svg

As soon as we trigger a build on master, all three badges change to build | pending and return to build | passing after it completes. A build on staging and production do not yield any change.

Add stability badge

[![deprecated](http://badges.github.io/stability-badges/dist/deprecated.svg)](http://github.com/badges/stability-badges)

Caching headers

Set proper headers for caching and stuff. That will make stuff go faster!

CLI

generate shields from the cli

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.