((section 2 "Outdated egg!" (p "This is an egg for CHICKEN 4, the unsupported old release.  You're almost certainly looking for " (int-link "/eggref/5/qrencode" "the CHICKEN 5 version of this egg") ", if it exists.") (p "If it does not exist, there may be equivalent functionality provided by another egg; have a look at the " (link "https://wiki.call-cc.org/chicken-projects/egg-index-5.html" "egg index") ". Otherwise, please consider porting this egg to the current version of CHICKEN.")) (section 2 "qrencode" (toc) (p "Self-contained high-level bindings to " (link "http://fukuchi.org/works/qrencode/" "libqrencode") ". Does not support structured appending at the moment.") (section 3 "Requirements" (p "None")) (section 3 "Documentation" (def (sig (procedure " (QR-encode-string string [version] [level] [encoding] [case-sensitive?])" (id QR-encode-string)) (procedure " (MQR-encode-string string [version] [level] [encoding] [case-sensitive?])" (id MQR-encode-string))) (p "Encodes the given string into a QR code. Returns two values: a u8vector containing the pixel values of the QR code (255 for white and 0 for black) and the number of pixels per row/column of the code. " (tt "version") " is the desired QR version (between 0 and 40 or 0 and 4 for Micro QR, with 0 being automatic, defaults to 0). " (tt "level") " is the level of error correction (between 0 and 3, defaults to 2). " (tt "encoding") " is the encoding type and should be one of " (tt "#:numeric") ", " (tt "#:alpha-numeric") ", " (tt "#:8-bit") ", " (tt "#:kanji") ", " (tt "#:eci") ", " (tt "#:fnc-first") ", or " (tt "#:fnc-second") " (defaults to " (tt "#:8-bit") "). " (tt "case-sensitive?") " is a boolean, defaulting to " (tt "#t") ".") (p "The " (tt "string") " must be short enough to be encoded using the given " (tt "version") ", " (tt "level") ", " (tt "encoding") ", and " (tt "case-sensitive?") ". Otherwise an error will be thrown.") (p (tt "MQR-encode-string") " is the Micro QR version of " (tt "QR-encode-string") ".")) (def (sig (procedure " (MQR-encode-string-8bit string [version] [level])" (id MQR-encode-string-8bit)) (procedure " (QR-encode-string-8bit string [version] [level])" (id QR-encode-string-8bit))) (p "Encodes the given string into a QR code in 8 bit mode. Returns two values: a u8vector containing the pixel values of the QR code (255 for white and 0 for black) and the number of pixels per row/column of the code. " (tt "version") " is the desired QR version (between 0 and 40 or 0 and 4 for Micro QR, with 0 being automatic, defaults to 0). " (tt "level") " is the level of error correction (between 0 and 3, defaults to 2).") (p "The " (tt "string") " must be short enough to be encoded using the given " (tt "version") " and " (tt "level") ". Otherwise an error will be thrown.") (p (tt "MQR-encode-string-8bit") " is the Micro QR version of " (tt "QR-encode-string-8bit") ".")) (def (sig (procedure " (QR-encode-data u8vector [version] [level])" (id QR-encode-data)) (procedure " (MQR-encode-data u8vector [version] [level])" (id MQR-encode-data))) (p "Encodes the given u8vector into a QR code. Returns two values: a u8vector containing the pixel values of the QR code (255 for white and 0 for black) and the number of pixels per row/column of the code. " (tt "version") " is the desired QR version (between 0 and 40 or 0 and 4 for Micro QR, with 0 being automatic, defaults to 0). " (tt "level") " is the level of error correction (between 0 and 3, defaults to 2).") (p "The " (tt "data") " must be short enough to be encoded using the given " (tt "version") " and " (tt "level") ". Otherwise an error will be thrown.") (p (tt "MQR-encode-data") " is the Micro QR version of " (tt "QR-encode-data") "."))) (section 3 "Examples" (highlight scheme "    \n(QR-encode-string \"hello world!\")") (p "You can also try running " (tt "./examples/encode-ascii.scm \"STRING TO ENCODE\"") " to create an ASCII QR code, like so:") (highlight text "    \n        ##############    ##      ########  ##############\n        ##          ##  ##    ##  ####      ##          ##\n        ##  ######  ##    ##  ########      ##  ######  ##\n        ##  ######  ##  ##  ##  ##    ####  ##  ######  ##\n        ##  ######  ##  ####      ########  ##  ######  ##\n        ##          ##  ##            ####  ##          ##\n        ##############  ##  ##  ##  ##  ##  ##############\n                          ####    ########                \n          ##  ####  ######  ######  ##  ####  ######  ##  \n                  ##  ##      ####  ##  ##  ##            \n          ##        ########  ####    ##########  ####    \n        ##  ######    ##  ##    ######    ##        ####  \n        ##        ####    ##  ##  ##  ######              \n        ##  ##  ####    ##      ##  ####  ##    ########  \n        ##  ######################  ##  ########  ##  ####\n                      ##  ######  ########    ########    \n            ##  ##  ######      ##    ############      ##\n                        ##    ##    ##  ##      ##  ##    \n        ##############  ##    ####    ####  ##  ####    ##\n        ##          ##    ####  ##      ##      ##  ####  \n        ##  ######  ##  ######    ################  ####  \n        ##  ######  ##  ########    ##      ##  ####    ##\n        ##  ######  ##    ##  ##    ######          ####  \n        ##          ##  ####  ##  ####  ####      ######  \n        ##############      ######  ####    ##  ##########")) (section 3 "Version history" (section 4 "Version 0.1.0" (ul (li "Initial release")))) (section 3 "Source repository" (p "Source available on " (link "https://github.com/AlexCharlton/qrencode" "GitHub") ".") (p "Bug reports and patches welcome! Bugs can be reported via GitHub or to alex.n.charlton at gmail.")) (section 3 "Author" (p "Alex Charlton")) (section 3 "License" (p "BSD-2-Clause"))))