EQRcode

Simple QR Code Generator written in Elixir with no other dependencies.

To generate the SVG QR code:

qr_code_content = "your_qr_code_content"

qr_code_content
|> EQRCode.encode()
|> EQRCode.svg()

Options

You can also pass in options into EQRCode.svg():

qr_code_content
|> EQRCode.encode()
|> EQRCode.svg(%{color: "#cc6600", shape: "circle", width: 300})

You can specify the following attributes of the QR code:

Default options are %{color: "#000", shape: "square"}.

Installation

def deps do
  [
    {:eqrcode, "~> 0.1.1"}
  ]
end

Credits

We reused most of the code from sunboshan/qrcode to generate the matrix required to render the QR Code. We also reference rqrcode on how to generate SVG from the QR Code matrix.

License

This project is Licensed under the MIT License.