GithubHelp home page GithubHelp logo

dipankardipu123 / poser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from badges/poser

0.0 0.0 0.0 502 KB

PHP badges library

Home Page: https://poser.pugx.org

License: MIT License

PHP 94.22% Gherkin 3.00% Dockerfile 2.77%

poser's Introduction

PHP badges poser CircleCI

This is a php library that creates badges like Badge Poser and I'm a badge and dark, according to Shields specification.

This library is used by https://poser.pugx.org

Latest Stable Version Latest Unstable Version Total Downloads CircleCI Build

Dependencies

  • PHP 7.4 or higher
  • GD extension

to use the library with lower php version use the tag v1.4

Use as command

1. Create a project

$ composer create-project badges/poser
$ ln -s poser/bin/poser /usr/local/bin/poser

2. Launch the command

Create an image

$ poser license MIT blue -p "license.svg"

Flush an image

$ poser license MIT blue

Usage as library

1. Add to composer dependencies

$ composer require badges/poser

2. Use in your project as lib

use PUGX\Poser\Render\SvgPlasticRender;
use PUGX\Poser\Poser;

$render = new SvgPlasticRender();
$poser = new Poser($render);

echo $poser->generate('license', 'MIT', '428F7E', 'plastic');
// or
echo $poser->generateFromURI('license-MIT-428F7E.svg?style=plastic');
// or
echo $poser->generateFromURI('license-MIT-428F7E?style=plastic');
// or
$image = $poser->generate('license', 'MIT', '428F7E', 'plastic');

echo $image->getStyle();

The allowed styles are: plastic, flat and flat-square.

Encoding

Dashes --- Dash

Underscores ___ Underscore

_ or Space → Space

More

For more info please see the behat features and the examples in the php-spec folder

Why a composer badge?

Not only because all the other languages already have it, but having the latest stable release in the readme could save time.

Contributing

Active contribution and patches are very welcome.
Please refer to CONTRIBUTING

License

License

poser's People

Contributors

alessandrominoccheri avatar antonkomarev avatar fefas avatar garak avatar gregoriol avatar haehnchen avatar jean85 avatar jellybellydev avatar jmleroux avatar liuggio avatar maximkott avatar peterdavehello avatar

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.