badge-gen

command module
v1.17.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2023 License: Apache-2.0 Imports: 30 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Go Report Card

Luzifer / badge-gen

Ever ran into this scenario? You wanted to add a link to something to your GitHub project using a nice button like the Godoc or the Travis-CI button but you was not able to find a button for this having the text you wanted? I did. I wanted to add a button "API Documentation" to one of my projects and did not find any button with that caption. So I wrote it myself.

And I wasn't myself if I would allow me to do the same work twice or more often so I wrote a small webserver able to generate those buttons with a customizable text in SVG (I did not care about older browser since long ago)…

Usage

Using my version

Simple use the raw-API URL below or one of the URLs listed on the demo page:

https://badges.fyi/static/API/Documentation/4c1

Parameters title and text are free-text strings while color has to be 3- or 6-letter hex notation for colors like that one you use in CSS.

To embed them into Markdown pages like this README.md:

![YourTitle](https://badges.fyi/static/API/Documentation/4c1)
Using your own hosted version

For configuration options see config.md. These need to be supplied in a YAML file:

---

key: value

...

Hint: To get the source just look into the source of this README.md

godoc reference API Documentation gratipay support gitter chat achievement

Yeah, sure you even could fake your Travis-CI build status but seriously: Why should you do that? Shame on you if you do!

Documentation

Overview

Some of this code (namely the code for computing the width of a string in a given font) was copied from code.google.com/p/freetype-go/freetype/ which includes the following copyright notice: Copyright 2010 The Freetype-Go Authors. All rights reserved.

Directories

Path Synopsis
Package cache contains caching implementation for retrieved data
Package cache contains caching implementation for retrieved data

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址