Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/giterlizzi/perl-mojolicious-plugin-badge
Badge plugin for Mojolicious
https://github.com/giterlizzi/perl-mojolicious-plugin-badge
badge mojolicious perl shields shieldsio
Last synced: about 2 months ago
JSON representation
Badge plugin for Mojolicious
- Host: GitHub
- URL: https://github.com/giterlizzi/perl-mojolicious-plugin-badge
- Owner: giterlizzi
- License: artistic-2.0
- Created: 2024-09-19T09:58:09.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-05T13:34:00.000Z (3 months ago)
- Last Synced: 2024-10-13T11:22:31.590Z (3 months ago)
- Topics: badge, mojolicious, perl, shields, shieldsio
- Language: Perl
- Homepage: https://metacpan.org/release/Mojolicious-Plugin-Badge
- Size: 57.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
[![Release](https://img.shields.io/github/release/giterlizzi/perl-Mojolicious-Plugin-Badge.svg)](https://github.com/giterlizzi/perl-Mojolicious-Plugin-Badge/releases) [![License](https://img.shields.io/github/license/giterlizzi/perl-Mojolicious-Plugin-Badge.svg)](https://github.com/giterlizzi/perl-Mojolicious-Plugin-Badge) [![Starts](https://img.shields.io/github/stars/giterlizzi/perl-Mojolicious-Plugin-Badge.svg)](https://github.com/giterlizzi/perl-Mojolicious-Plugin-Badge) [![Forks](https://img.shields.io/github/forks/giterlizzi/perl-Mojolicious-Plugin-Badge.svg)](https://github.com/giterlizzi/perl-Mojolicious-Plugin-Badge) [![Issues](https://img.shields.io/github/issues/giterlizzi/perl-Mojolicious-Plugin-Badge.svg)](https://github.com/giterlizzi/perl-Mojolicious-Plugin-Badge/issues) [![Coverage Status](https://coveralls.io/repos/github/giterlizzi/perl-Mojolicious-Plugin-Badge/badge.svg)](https://coveralls.io/github/giterlizzi/perl-Mojolicious-Plugin-Badge)
# Mojolicious::Plugin::Badge - Badge plugin for Mojolicious
Mojolicious::Plugin::Badge is a Mojolicious plugin that generate "Shields.io"
like badge from `badge` helper or via API URL (e.g. `/badge/Hello-Mojo!-orange`).## Usage
Create your badge ...
... in `Mojolicious` or `Mojolicious::Lite` application:
```.pl
# Mojolicious
$self->plugin('Badge');# Mojolicious::Lite
plugin 'Badge';get '/my-cool-badge' => sub ($c) {
my $badge = $c->app->badge(
label => 'Hello',
message => 'Mojo!',
color => 'orange'
logo => 'https://docs.mojolicious.org/mojo/logo.png'
badge_format => 'png',
);$c->render(data => $badge, format => 'png');
};
```... via "Shields.io"-like Badge API:
```
GET /badge/Hello-Mojo!-orange.png
```... from CLI using "badge" command:
```console
./myapp.pl badge --label "Hello" --message "Mojo!" --color "orange" --format png --file my-cool-badge.png
```Output:
![Hello Mojo](https://raw.github.com/giterlizzi/perl-Mojolicious-Plugin-Badge/main/examples/hello-mojo.png)
## Styles
* ![flat](https://raw.github.com/giterlizzi/perl-Mojolicious-Plugin-Badge/main/examples/style-flat.png)
* ![flat-square](https://raw.github.com/giterlizzi/perl-Mojolicious-Plugin-Badge/main/examples/style-flat-square.png)
* ![plastic](https://raw.github.com/giterlizzi/perl-Mojolicious-Plugin-Badge/main/examples/style-plastic.png)
* ![for-the-badge](https://raw.github.com/giterlizzi/perl-Mojolicious-Plugin-Badge/main/examples/style-for-the-badge.png)## Colors
![blue](https://raw.github.com/giterlizzi/perl-Mojolicious-Plugin-Badge/main/examples/color-blue.png)
![brightgreen](https://raw.github.com/giterlizzi/perl-Mojolicious-Plugin-Badge/main/examples/color-brightgreen.png)
![green](https://raw.github.com/giterlizzi/perl-Mojolicious-Plugin-Badge/main/examples/color-green.png)
![grey](https://raw.github.com/giterlizzi/perl-Mojolicious-Plugin-Badge/main/examples/color-grey.png)
![lightgrey](https://raw.github.com/giterlizzi/perl-Mojolicious-Plugin-Badge/main/examples/color-lightgrey.png)
![orange](https://raw.github.com/giterlizzi/perl-Mojolicious-Plugin-Badge/main/examples/color-orange.png)
![red](https://raw.github.com/giterlizzi/perl-Mojolicious-Plugin-Badge/main/examples/color-red.png)
![yellow](https://raw.github.com/giterlizzi/perl-Mojolicious-Plugin-Badge/main/examples/color-yellow.png)
![yellowgreen](https://raw.github.com/giterlizzi/perl-Mojolicious-Plugin-Badge/main/examples/color-yellowgreen.png)## Installation
To install this module type the following:
perl Makefile.PL
make
make test
make installUsing App::cpanminus:
cpanm Mojolicious::Plugin::Badge
## Documentation
- `perldoc Mojolicious::Plugin::Badge`
- https://metacpan.org/release/Mojolicious-Plugin-Badge## Copyright
Copyright (C) 2024 by Giuseppe Di Terlizzi