Skip to content

Commit

Permalink
readme: add badges
Browse files Browse the repository at this point in the history
crates.io used to show some automatically per badge configuration in the
crate toml files, however then they dropped this ([1]). crates now show
badges via embedding them in readme.md files.

shields.io is a popular service for constructing and serving badges, with
a lot of available customisation.

here i have selected the 'for-the-badge' style, which is similar to the
nice 'flat-square' style, but uses capital letters and a default later
height of 28px instead of 20px. I have used HTML for embedding them to
allow control over the size, which I have forced to 24px since 28px is just
too large. (there is a query-param available to control width but not
height for some reason).

notes:
 - for the min-rust-version badge, there were two different URL formats
   available for custom badges, I went with the 'static' form which makes
   use of a lot of query params.
 - for the min-rust-version badge, I had to use capitals for the service
   text to get it consistent with the rest, since it was not automatically
   capitalising it.
 - for the docs.rs one i had to use the crates.io one with a custom colour
   and service text specified, since shields.io has a mechanism in place
   for automatically building the latest crates.io version number into the
   crates.io badge, but does not have a similar specific badge-builder
   available for docs.rs badges. (and the badge you can get from docs.rs
   itself is a different style of course).
 - the message for the min-rust-version is '1.40%2B' which is '1.40+'!

i was inspired by the badges of the 'quote' crate.

[1]: rust-lang/crates.io#2436
  • Loading branch information
jnqnfe committed Nov 24, 2020
1 parent c47b4fc commit a6c805e
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Overview
========

[<img alt="travis.com" src="https://img.shields.io/travis/com/jnqnfe/pulse-binding-rust?style=for-the-badge" height="24">](https://travis-ci.com/jnqnfe/pulse-binding-rust)
<img alt="license" src="https://img.shields.io/crates/l/libpulse-binding.svg?style=for-the-badge" height="24">

This repository contains *sys* and *binding* libraries (crates) for connecting to PulseAudio (PA)
from the Rust programming language.

Expand Down
6 changes: 6 additions & 0 deletions pulse-binding-mainloop-glib/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
libpulse_glib_binding
=====================

[<img alt="travis.com" src="https://img.shields.io/travis/com/jnqnfe/pulse-binding-rust?style=for-the-badge" height="24">](https://travis-ci.com/jnqnfe/pulse-binding-rust)
[<img alt="crates.io" src="https://img.shields.io/crates/v/libpulse-glib-binding?style=for-the-badge" height="24">](https://crates.io/crates/libpulse-glib-binding)
[<img alt="docs.rs" src="https://img.shields.io/crates/v/libpulse-glib-binding?color=5479ab&label=docs.rs&style=for-the-badge" height="24">](https://docs.rs/libpulse-glib-binding)
<img alt="min-rust-version" src="https://img.shields.io/static/v1?label=RUST&message=1.40%2B&color=informational&style=for-the-badge" height="24">
<img alt="license" src="https://img.shields.io/crates/l/libpulse-glib-binding.svg?style=for-the-badge" height="24">

A Rust language binding for the PulseAudio libpulse-mainloop-glib library.

## Usage
Expand Down
6 changes: 6 additions & 0 deletions pulse-binding-simple/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
libpulse_simple_binding
=======================

[<img alt="travis.com" src="https://img.shields.io/travis/com/jnqnfe/pulse-binding-rust?style=for-the-badge" height="24">](https://travis-ci.com/jnqnfe/pulse-binding-rust)
[<img alt="crates.io" src="https://img.shields.io/crates/v/libpulse-simple-binding?style=for-the-badge" height="24">](https://crates.io/crates/libpulse-simple-binding)
[<img alt="docs.rs" src="https://img.shields.io/crates/v/libpulse-simple-binding?color=5479ab&label=docs.rs&style=for-the-badge" height="24">](https://docs.rs/libpulse-simple-binding)
<img alt="min-rust-version" src="https://img.shields.io/static/v1?label=RUST&message=1.40%2B&color=informational&style=for-the-badge" height="24">
<img alt="license" src="https://img.shields.io/crates/l/libpulse-simple-binding.svg?style=for-the-badge" height="24">

A Rust language binding for the PulseAudio libpulse-simple library.

## Usage
Expand Down
6 changes: 6 additions & 0 deletions pulse-binding/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
libpulse_binding
================

[<img alt="travis.com" src="https://img.shields.io/travis/com/jnqnfe/pulse-binding-rust?style=for-the-badge" height="24">](https://travis-ci.com/jnqnfe/pulse-binding-rust)
[<img alt="crates.io" src="https://img.shields.io/crates/v/libpulse-binding?style=for-the-badge" height="24">](https://crates.io/crates/libpulse-binding)
[<img alt="docs.rs" src="https://img.shields.io/crates/v/libpulse-binding?color=5479ab&label=docs.rs&style=for-the-badge" height="24">](https://docs.rs/libpulse-binding)
<img alt="min-rust-version" src="https://img.shields.io/static/v1?label=RUST&message=1.40%2B&color=informational&style=for-the-badge" height="24">
<img alt="license" src="https://img.shields.io/crates/l/libpulse-binding.svg?style=for-the-badge" height="24">

A Rust language binding for the PulseAudio libpulse library.

## Usage
Expand Down
6 changes: 6 additions & 0 deletions pulse-sys-mainloop-glib/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
libpulse_mainloop_glib_sys
==========================

[<img alt="travis.com" src="https://img.shields.io/travis/com/jnqnfe/pulse-binding-rust?style=for-the-badge" height="24">](https://travis-ci.com/jnqnfe/pulse-binding-rust)
[<img alt="crates.io" src="https://img.shields.io/crates/v/libpulse-mainloop-glib-sys?style=for-the-badge" height="24">](https://crates.io/crates/libpulse-mainloop-glib-sys)
[<img alt="docs.rs" src="https://img.shields.io/crates/v/libpulse-mainloop-glib-sys?color=5479ab&label=docs.rs&style=for-the-badge" height="24">](https://docs.rs/libpulse-mainloop-glib-sys)
<img alt="min-rust-version" src="https://img.shields.io/static/v1?label=RUST&message=1.40%2B&color=informational&style=for-the-badge" height="24">
<img alt="license" src="https://img.shields.io/crates/l/libpulse-mainloop-glib-sys.svg?style=for-the-badge" height="24">

A Rust language linking library for the PulseAudio libpulse-mainloop-glib library. See also the
higher-level `libpulse_glib_binding` crate.

Expand Down
6 changes: 6 additions & 0 deletions pulse-sys-simple/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
libpulse_simple_sys
===================

[<img alt="travis.com" src="https://img.shields.io/travis/com/jnqnfe/pulse-binding-rust?style=for-the-badge" height="24">](https://travis-ci.com/jnqnfe/pulse-binding-rust)
[<img alt="crates.io" src="https://img.shields.io/crates/v/libpulse-simple-sys?style=for-the-badge" height="24">](https://crates.io/crates/libpulse-simple-sys)
[<img alt="docs.rs" src="https://img.shields.io/crates/v/libpulse-simple-sys?color=5479ab&label=docs.rs&style=for-the-badge" height="24">](https://docs.rs/libpulse-simple-sys)
<img alt="min-rust-version" src="https://img.shields.io/static/v1?label=RUST&message=1.40%2B&color=informational&style=for-the-badge" height="24">
<img alt="license" src="https://img.shields.io/crates/l/libpulse-simple-sys.svg?style=for-the-badge" height="24">

A Rust language linking library for the PulseAudio libpulse-simple library. See also the
higher-level `libpulse_simple_binding` crate.

Expand Down
6 changes: 6 additions & 0 deletions pulse-sys/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
libpulse_sys
============

[<img alt="travis.com" src="https://img.shields.io/travis/com/jnqnfe/pulse-binding-rust?style=for-the-badge" height="24">](https://travis-ci.com/jnqnfe/pulse-binding-rust)
[<img alt="crates.io" src="https://img.shields.io/crates/v/libpulse-sys?style=for-the-badge" height="24">](https://crates.io/crates/libpulse-sys)
[<img alt="docs.rs" src="https://img.shields.io/crates/v/libpulse-sys?color=5479ab&label=docs.rs&style=for-the-badge" height="24">](https://docs.rs/libpulse-sys)
<img alt="min-rust-version" src="https://img.shields.io/static/v1?label=RUST&message=1.40%2B&color=informational&style=for-the-badge" height="24">
<img alt="license" src="https://img.shields.io/crates/l/libpulse-sys.svg?style=for-the-badge" height="24">

A Rust language linking library for the PulseAudio libpulse library. See also the higher-level
`libpulse_binding` crate.

Expand Down

0 comments on commit a6c805e

Please sign in to comment.