Skip to content

crusso/motoko-qr

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The QR Package

Build Status

This package implements a QR-code generator for the Motoko programming language.

Prerequisites

Usage

Generate a QR-code.

public func encode(
  version : { #Version : Nat },
  level : { #L; #M; #Q; #H },
  mode : { #Alphanumeric; #EightBit; #Kanji; #Numeric },
  text : Text
) : ?{ #Matrix : [[Bool]] }

Demo

Start a local internet computer.

dfx start

Execute the following commands in another tab.

dfx canister create --all
dfx build
dfx canister install --all
dfx canister call demo encode '(variant{Version = 1}, variant{Q}, variant{Alphanumeric}, "HELLO WORLD")' | sed 's/#/█/g'

About

The Motoko QR Package

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Modelica 99.2%
  • Shell 0.8%