From 81a8c58b70af073036d2233bf7088d6415d77465 Mon Sep 17 00:00:00 2001 From: Lephe Date: Wed, 9 Oct 2019 07:08:12 +0200 Subject: [PATCH] add a README file --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..7cb2f98 --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +# Python-based fx-92 Scientifique Collège+ interpreter + +This is an alternate imlementation of the fx-92 SC+ Algorithmic application. It +interprets programs read from QR code URLs or text files, and renders images +using the SDL. + +Requirements: +* Python ≥ 3.5 (may work with older versions) +* PySDL2 (`pip3 install --user PySDL2`) + +## Running programs + +To run programs, execute `fx92.py` and specify an input file: + +``` +./fx92.py [-s|-u] [options...] +``` + +* If the input file contains text instructions (for example `goto 12,35`), + specify `-s` (this is the default). +* If the input file contains a QR code URL (for example + `https://...F908313200333500`), specify `-u`. + +The input can also be set to `-`, in which case the interpreter reads from +standard input. Typical use case is for URLs: + +``` +echo -n "F908313200333500" | ./fx92.py -u - +``` + +## Output options + +* `--scale ` lets you set the (integer) scaling ratio of the output. +* `--save ` will save a screenshot of the output to the designated file. +* `--quiet` will "hide" the window while executing. _(At the moment the window + is still shown, but closed immediately, due to SDL subtleties.)_ + +## Tests + +A few units tests are provided. Run `tests.py` to execute them.