Skip to content

mearns/python-markdown-qrcode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QRCODE Markdown Extension

Installation

  1. You need to have python-setuptools installed sudo apt-get install python-setuptools
  2. python ./setup.py install

Format

Traditional Syntax

This is the "traditional" short syntax:

[-[str data to encode]-]

Domain Syntax

A second, more verbose but more general and powerful syntax, is called the "domain" syntax. It looks like this:

:qr:4:bg=#FF0000:fg=#0000FF:ec=Q:[Encode this as well.]

The domain syntax has the general form:

:qr:<OPTS>:[<DATA>]

Where OPTS can be used to specify the pixel-size, the foreground and background size, and the QR Error Correcting Level to use (L, M, H, or Q). (Note that the foreground color doesn't work real well). All OPTS are optional.

Config Options

intPixelSize : Pixel Size of each dark and light bit. Default is 2

useShortSyntax : Enable the use of the original short syntax. Default is True

bgColor : The color to use for background ("light colored") bits. Default is #FFFFFF (white)

fgColor : The color to use for foreground ("dark colored") bits. Default is #000000 (black)

ecLevel : The error correcting level to use. One of L, M, H, or Q. Default is L

Notes

You can try including square brackets in DATA by escaping them with front slashes, but markdown seems to be replacing them with some strange escape code.

Legal

extension.py

QrCodeLib.py

Ported from Javascript to Python by Sam Curren

Original Project :

Trademarks

The word "QR Code" is registered trademark of DENSO WAVE INCORPORATED

About

A markdown extension to insert qrcode datauri images based on supplied data.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%