Giter Site home page Giter Site logo

stupidsimplevoucherstamper's Introduction

Stupid Simple Voucher Stamper

Use Case

The purpose of this tool is to create a list of codes generated from an initial string and stamp these codes onto an image. After that, you can aggregate the stamped images into a bigger image and print these images.

Installation

git clone;
cd StupidSimpleVoucherStamper;
pip install -r requirements.txt;

Usage

Generate Codes

Edit run.py and change the following variables:

    # The string that will be used to generate the codes
    initial_string = "ABC123"
    # The number of codes that will be generated
    count = 100
    # The name of the input image
    initial_image = "sample.jpg"
    # The lebgth of the code
    code_length = 8

Stamp Codes

Replace input/sample.jgp with your image

Edit run.py and change the following arguments of the stamp_codes function:

    # The name of the input image
    initial_image = "sample.jpg"
    # The font size of the code
    font_size = 20
    # The font color (R,G,B) of the code
    font_color = (0, 0, 0)
    # The font of the code
    font = "arial.ttf"
    # The position of the code (pixels) in the image
    x = 0
    y = 0

Aggregate Images

Edit run.py and change the following arguments of the aggregate_images function:

    # The offset (pixels) between the images
    padding = 10 
    # The number of images per row
    rows = 5
    # Tthe number of images per column
    columns = 5

Running the script

#After you have installed the requirements and edited run.py to your needs you can run the script with the following command:
python3 run.py

stupidsimplevoucherstamper's People

Contributors

luisrx7 avatar

Watchers

 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.