aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2013-07-16 10:39:04 +0200
committerGravatar Christian Hesse <mail@eworm.de>2013-07-16 10:39:04 +0200
commitcaf759b3b6ad741c8908bcaa081324d915e44aad (patch)
treeec8d04b51449741bba919b031b3b6695bc8cedd9
parent18cb2652ac83be1a3f2d9c4ce445420534b666d1 (diff)
downloadcqrlogo-caf759b3b6ad741c8908bcaa081324d915e44aad.tar.gz
cqrlogo-caf759b3b6ad741c8908bcaa081324d915e44aad.tar.zst
add some documentation
-rw-r--r--Makefile2
-rw-r--r--README.md61
-rw-r--r--cqrlogo.pngbin0 -> 509 bytes
3 files changed, 61 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 6ce06f4..5fb94f2 100644
--- a/Makefile
+++ b/Makefile
@@ -116,4 +116,4 @@ check:
$(GREP) -e '^This QR Code has been stolen from https://eworm.net/!$$'
clean:
- $(RM) -f *.o *~ cqrlogo
+ $(RM) -f *.o *~ check.png cqrlogo
diff --git a/README.md b/README.md
index 808c051..198127d 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,63 @@
cqrlogo
=======
-CGI QR-Code logo
+**CGI QR-Code logo**
+
+The resulting QR-Code should look something like this:
+
+![QR-Code](cqrlogo.png)
+
+It is generated dynamically from referer URL sent by the user agent.
+
+Requirments
+-----------
+
+To compile and run `cqrlogo` you need:
+
+* [libpng](http://www.libpng.org/pub/png/libpng.html)
+* [zlib](http://www.zlib.net/) (which is a dependency for libpng)
+* [qrencode](http://megaui.net/fukuchi/works/qrencode/index.en.html)
+
+Additionally it is expected to have `make` and `pkg-config` around to
+successfully compile.
+
+Some systems may require additional development packages for the libraries.
+Look for `libpng-dev`, `libz-dev` and `libqrencode-dev` or similar.
+
+For `make check` to work you have to install optional dependency
+[zbar](http://zbar.sourceforge.net/).
+
+Build and install
+-----------------
+
+Building and installing is very easy. Just run:
+
+> make
+
+followed by:
+
+> make install
+
+This will place an executable at `/usr/share/webapps/cqrlogo/cqrlogo`.
+
+The file `config.h` (copy from `config.def.h` if it does not exist) provides
+some build time configuration, so feel free to make your changes there and
+rerun the commands above.
+
+Usage
+-----
+
+This is a **CGI executable** (*Common Gateway interface*), so it is expected
+to be run inside a web server. Consult your web server's documentation
+to get information about how to run CGI executables.
+
+By default `cqrlogo` generates a file with scale two, so one QR-Code pixel
+results in 2x2 pixels. The border is one pixel (though scale takes effect)
+and error correction level is the lowest available.
+
+Runtime options can be given with request method GET. These are available:
+
+* `scale`: scale the QR-Code up by this factor
+* `border`: width of the border
+* `level`: error correction level
+
diff --git a/cqrlogo.png b/cqrlogo.png
new file mode 100644
index 0000000..964f749
--- /dev/null
+++ b/cqrlogo.png
Binary files differ