Coder Social home page Coder Social logo

svg-meme's Introduction

SVG Meme generator

Synopsis

The main src/meme.fcgi is a rather simple Perl script to generate image macros (from common memes —not included— as well as from any ‘base’ image you would care about). The script can be used from the command-line as well as a CGI or FastCGI script (note: FastCGI untested for the time being).

The script needs an index of ‘allowed’ base images (and their dimensions, in pixel). The list can be generated with the attached gen-sizes.sh shell script (relies on identify from ImageMagick).

CGI parameters are m for the base image name, t for the text, sep for the separator and fs for the font size.

The default base image is taken to be the first in the hash of known base images (and is therefore random for each script execution). The default text is TOP TEST//BOTTOM TEST, the default separator is / and the default font size is computed automatically based on a few image and text properties.

The separator is used to split the text into multiple lines. Empty lines act as ‘fillers’, so that the default sample text results in TOP TEST on the first line and BOTTOM TEST at the bottom of the image.

The default font size can be overridden by specifying a single numerical value in fs. The font size in individual lines can be overridden by using an fs pattern that follows the line structure. E.g., fs=90/ will print the top line in size 90 and all other lines in the default font size. Non-numeric (according to Perl) font sizes are ignored.

Copyright

Copyright (C) 2013 Giuseppe Bilotta

License

Distributed under the terms of the Artistic License, see Artistic in the repository root.

svg-meme's People

Contributors

oblomov avatar

Stargazers

Rafael de Lima Franco avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

inakiabt

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.