GithubHelp home page GithubHelp logo

erpel / barby Goto Github PK

View Code? Open in Web Editor NEW

This project forked from toretore/barby

2.0 2.0 0.0 790 KB

The Ruby barcode generator

Home Page: http://toretore.github.com/barby/

License: MIT License

Ruby 100.00%

barby's Introduction

*** NEW REQUIRE POLICY ***

Barcode symbologies are no longer requires automatically, so you'll have to
require the ones you need. If you need EAN-13, require 'barby/barcode/ean_13'.
Full list of symbologies and filenames below.

***

For more information, check out the Barby wiki at https://github.com/toretore/barby/wiki

Barby is a Ruby library that generates barcodes in a variety of symbologies.
Its functionality is split into barcode and "outputter" objects. Barcode
objects turn data into a binary representation for a given symbology.
Outputters then take this representation and turns it into images, PDF, etc.

You can easily add a symbology without having to worry about graphical
representation. If it can be represented as the usual 1D or 2D matrix of
lines or squares, outputters will do that for you.

Likewise, you can easily add an outputter for a format that doesn't have one
yet, and it will work with all existing symbologies.

See Barby::Barcode and Barby::Outputter for more information.

 require 'barby'
 require 'barby/barcode/code_128'
 require 'barby/outputter/ascii_outputter'

 barcode = Barby::Code128B.new('BARBY')
 
 puts barcode.to_ascii #Implicitly uses the AsciiOutputter

 ## #    #  #   # ##   # #   ##   ##   # ### #   # ##   ### ## #   ## ### ### ##   ### # ##
 ## #    #  #   # ##   # #   ##   ##   # ### #   # ##   ### ## #   ## ### ### ##   ### # ##
 ## #    #  #   # ##   # #   ##   ##   # ### #   # ##   ### ## #   ## ### ### ##   ### # ##
 ## #    #  #   # ##   # #   ##   ##   # ### #   # ##   ### ## #   ## ### ### ##   ### # ##
 ## #    #  #   # ##   # #   ##   ##   # ### #   # ##   ### ## #   ## ### ### ##   ### # ##
 ## #    #  #   # ##   # #   ##   ##   # ### #   # ##   ### ## #   ## ### ### ##   ### # ##
 ## #    #  #   # ##   # #   ##   ##   # ### #   # ##   ### ## #   ## ### ### ##   ### # ##
 ## #    #  #   # ##   # #   ##   ##   # ### #   # ##   ### ## #   ## ### ### ##   ### # ##
 ## #    #  #   # ##   # #   ##   ##   # ### #   # ##   ### ## #   ## ### ### ##   ### # ##
 ## #    #  #   # ##   # #   ##   ##   # ### #   # ##   ### ## #   ## ### ### ##   ### # ##
            B          A          R          B          Y


Supported symbologies:

Name - filename - dependencies

require 'barby/barcode/<filename>'

* Code 25 - code_25
  * Interleaved - code_25_interleaved
  * IATA - code_25_iata
* Code 39 - code_39
* Code 93 - code_93
* Code 128 - code_128
  * GS1 128 - gs1_128
* EAN-13 - ean_13
  * Bookland - bookland
  * UPC-A - ean_13
* EAN-8 - ean_8
* UPC/EAN supplemental, 2 & 5 digits - upc_supplemental

* QR Code - qr_code - rqrcode
* DataMatrix (Semacode) - data_matrix - semacode
* PDF417 - pdf_417 - java (JRuby)


Formats supported by outputters:

* Text (mostly for testing)
* PNG, JPEG, GIF
* PS, EPS
* SVG
* PDF
* HTML


Outputters:

filename (dependencies)

require 'barby/outputter/<filename>_outputter'

* ascii
* cairo (cairo)
* html
* pdfwriter
* png (chunky_png)
* prawn (prawn)
* rmagick (RMagick)
* svg

barby's People

Contributors

aslakhellesoy avatar benbruscella avatar chinasaur avatar domribaut avatar erpel avatar metaskills avatar philayres avatar toretore avatar troessner avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.