Bloque Bolloré et les médias d’extrême droite

On se bouge, on signe la pétition en masse :
— Non c’est Non, Monsieur Duplomb !
— Pour la santé, la sécurité, l’intelligence collective.

👨‍💻 about me home CV/Resume News 🖊️ Contact Codeberg Github LinkedIn 🏆 Best of LuaX (tools) pub bang ypp panda lsvg ldc req yreq Fizzbuzz Calculadoira TPG picfg Belenos (intro) dnsfilter badges 🔀 Git Repos

Made in Europe

Badges

Badges

Badges Installation Usage Examples License Version


Lots of GitHub repositories use badges. They are visually nice, but they are also images dynamically built and loaded from third-party servers.

badges generates actually static badges as SVG images hosted on the same server.

It simply scans files, searches for things that look like a badge filename and generates badges as SVG images.

A badge file is a file in a directory named badges (or a subdirectory). The filename describes the badge content, color and size.

Badges with a single text
text-width-color.svg
Badges with two texts
text1-text2-width1-width2-color.svg The default color of the first text is white on grey.

badges makes some substitutions in the text fields:

Special characters in text fields can be escaped:

To insert characters that are invalid in a filename, you must use variables.

Installation

badges requires LuaX.

# install badges in ~/.local/bin and ~/.local/lib
$ git clone https://codeberg.org/cdsoft/badges
$ cd badges
$ bang && ninja install

or set $PREFIX to install badges to a custom directory ($PREFIX/bin and $PREFIX/lib):

$ export PREFIX=/path # install badges to /path/bin and /path/lib
$ git clone https://codeberg.org/cdsoft/badges
$ cd badges
$ bang && ninja install

This will install 2 files in $PREFIX/bin:

  1. $PREFIX/bin/badges: badges command line utility compiled with LuaX. It can be run without any dependency.
  2. $PREFIX/bin/badges.lua: badges.lua command line utility bundled with LuaX as a standalone Lua script. It requires a Lua 5.4 or 5.5 interpreter (e.g.: lua).

In case precompiled binaries are needed (GNU/Linux, MacOS, Windows), some can be found at cdelord.fr/pub. These archives contain badges as well as some other softwares more or less related to LuaX.

Usage

Usage: .build/badges [-h] [-v] [-c file.toml] [--init] [-D NAME=VALUE]
       [<input>] ...

Arguments:
   input                 files or directories to scan

Options:
   -h, --help            Show this help message and exit.
   -v, --version         Show badges version
   -c file.toml          Configuration file (default: badges.toml)
   --init                Print the default configuration
   -D NAME=VALUE         Define a variable
badges
Scans for files in the current directory and generates badges.
badges file.md dir1 dir2
Generate badges found in file1.md and in all files in dir1 and dir2.
badges -c file.toml ...
Overloads the default configuration with a user configuration file.
badges -D V=42 ...
Defines a variable that can be used in textual fields (e.g.: @V is replaced with 42).
badges --init
Prints the default configuration.

The default configuration is badges.toml.

Examples

Filename Badge
badges/License-GPL3-75-45-blue.svg
badges/License-GPL3-75-45-057.svg
badges/Linux-🐧-75-45-771077.svg
badges/3_..._2_..._1-GO-75-45-003500.svg
badges/Badges-75-blue.svg Badges
badges/✅-45-grey.svg
badges/Version-@VERSION-75-45-green.svg
badges/text--with--dashes-and_@@arobases-150-120-28c.svg
badges/__and__underscores__-150-gold.svg

License

badges is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

badges is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with badges.  If not, see <https://www.gnu.org/licenses/>.

For further information about badges you can visit
https://codeberg.org/cdsoft/badges

This site is powered by LuaX, bang, ypp, cdsoft.css and Pandoc.

Mirrors: cdelord.frchristophe.delord.free.frcdsoft.codeberg.page