/aztec_code_generator

Aztec code generator in Python

Primary LanguagePythonMIT LicenseMIT

Aztec Code generator

PyPI License: MIT Build Status

Aztec Code generator in Python

Dependencies:

PIL - Python Imaging Library (or Pillow)

Usage:

data = 'Aztec Code 2D :)'
aztec_code = AztecCode(data)
aztec_code.save('aztec_code.png', module_size=4)

This code will generate an image file aztec_code.png of an Aztec Code containing the text "Aztec Code 2D :)".

Aztec Code

data = 'Aztec Code 2D :)'
aztec_code = AztecCode(data)
aztec_code.print_out()

This code will print out the resulting 19×19 (compact) Aztec Code to standard output as text.

      ##  # ## ####
 #   ## #####  ### 
 #  ##  # #   # ###
## #  #    ## ##   
    ## # #    # #  
## ############ # #
 ### #       ###  #
##   # ##### # ## #
 #   # #   # ##    
 # # # # # # ###   
    ## #   # ## ## 
#### # ##### ## #  
  # ##       ## ## 
 ##  ########### # 
  ##    # ##   ## #
     ## # ### #  ##
      ############ 
##   #     # ##   #
##  #    ## ###   #

Authors:

Written by Dmitry Alimov (delimtry) and packaged by Daniel Lenski (dlenski).

License:

Released under The MIT License.