Add 2013/cable2/try.sh + update bugs + formatting
The try.sh script is as usual but it integrates some of the comments in the previous set of commands in the 'try' section (in particular about different typesets). The bugs.md was updated with features, not bugs. Typo/format check README.md file.
This commit is contained in:
1 parent
39cb779c19
commit
45a7c8ca5f
4 files changed
+119
-41
No files matched your search
Executable
+55
@@ -0,0 +1,55 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# try.sh - demonstrate IOCCC winner 2013/cable2
|
||||
#
|
||||
|
||||
# make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it
|
||||
# this way allows us to have the user specify a different compiler in an easy
|
||||
# way.
|
||||
if [[ -z "$CC" ]]; then
|
||||
CC="cc"
|
||||
fi
|
||||
|
||||
make CC="$CC" all >/dev/null || exit 1
|
||||
|
||||
# clear screen after compilation so that only the entry is shown
|
||||
clear
|
||||
|
||||
read -r -n 1 -p "Press any key for OCR example that shows all 94 ASCII chars: "
|
||||
echo 1>&2
|
||||
echo "$ ./cable2 ascii.bmp" 1>&2
|
||||
./cable2 ascii.bmp
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key for OCR example with ASCII colours: "
|
||||
echo 1>&2
|
||||
echo "$ ./cable2 multi_color.bmp color" 1>&2
|
||||
./cable2 multi_color.bmp color
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key for OCR example of different character size/positions: "
|
||||
echo 1>&2
|
||||
echo "$ ./cable2 mixed_sizes.bmp" 1>&2
|
||||
./cable2 mixed_sizes.bmp
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to extract and compile C code by OCR: "
|
||||
echo 1>&2
|
||||
echo "$ ./cable2 hello_world.bmp | gcc -xc -o hello -" 1>&2
|
||||
./cable2 hello_world.bmp | gcc -xc -o hello -
|
||||
echo "$ ./hello" 1>&2
|
||||
./hello
|
||||
echo 1>&2
|
||||
|
||||
echo "Sometimes typeset text will work if the typeset has characters that are" 1>&2
|
||||
echo "enough to support the handwritten shapes." 1>&2
|
||||
read -r -n 1 -p "Press any key to try Menlo 160pt text: "
|
||||
echo 1>&2
|
||||
echo "$ ./cable2 typeset.bmp" 1>&2
|
||||
./cable2 typeset.bmp
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key for an added IOCCC bonus: "
|
||||
echo 1>&2
|
||||
echo "$ ./cable2 bonus.bmp" 1>&2
|
||||
./cable2 bonus.bmp
|
||||
Reference in new issue
Block a user