mirror of
https://github.com/colindean/optar.git
synced 2025-03-11 22:17:40 +13:00
Merge pull request #4 from cnelsonsic/add_travisci
Add travis.ci support and README.md
This commit is contained in:
commit
01b9fca4d4
5
.travis.yml
Normal file
5
.travis.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
language: c
|
||||||
|
compiler:
|
||||||
|
- clang
|
||||||
|
- gcc
|
||||||
|
script: "make"
|
19
Makefile
19
Makefile
@ -1,3 +1,4 @@
|
|||||||
|
CC?=gcc
|
||||||
LDFLAGS=-lm
|
LDFLAGS=-lm
|
||||||
CFLAGS=-O3 -Wall -Wuninitialized -fomit-frame-pointer -funroll-loops \
|
CFLAGS=-O3 -Wall -Wuninitialized -fomit-frame-pointer -funroll-loops \
|
||||||
-fstrength-reduce -DNODEBUG `libpng-config --I_opts`
|
-fstrength-reduce -DNODEBUG `libpng-config --I_opts`
|
||||||
@ -18,31 +19,31 @@ clean:
|
|||||||
rm -f optar unoptar golay golay_codes.c *.o
|
rm -f optar unoptar golay golay_codes.c *.o
|
||||||
|
|
||||||
common.o: common.c optar.h
|
common.o: common.c optar.h
|
||||||
gcc -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
parity.o: parity.c
|
parity.o: parity.c
|
||||||
gcc -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
optar.o: optar.c optar.h font.h parity.h
|
optar.o: optar.c optar.h font.h parity.h
|
||||||
gcc -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
golay_codes.o: golay_codes.c
|
golay_codes.o: golay_codes.c
|
||||||
gcc -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
golay.o: golay.c parity.h
|
golay.o: golay.c parity.h
|
||||||
gcc -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
unoptar.o: unoptar.c optar.h parity.h
|
unoptar.o: unoptar.c optar.h parity.h
|
||||||
gcc -c -I/usr/local/include/libpng $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
$(CC) -c -I/usr/local/include/libpng $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
optar: optar.o common.o golay_codes.o parity.o
|
optar: optar.o common.o golay_codes.o parity.o
|
||||||
gcc $(LDFLAGS) -o $@ $^
|
$(CC) $(LDFLAGS) -o $@ $^
|
||||||
|
|
||||||
golay_codes.c: golay
|
golay_codes.c: golay
|
||||||
./$< > $@
|
./$< > $@
|
||||||
|
|
||||||
golay: golay.o parity.o
|
golay: golay.o parity.o
|
||||||
gcc $(LDFLAGS) -o $@ $^
|
$(CC) $(LDFLAGS) -o $@ $^
|
||||||
|
|
||||||
unoptar: unoptar.o common.o golay_codes.o parity.o
|
unoptar: unoptar.o common.o golay_codes.o parity.o
|
||||||
gcc -o $@ -L/usr/local/lib $^ -lm -lpng -lz
|
$(CC) -o $@ -L/usr/local/lib $^ -lm -lpng -lz
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
Twibright Optar
|
Twibright Optar
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
|
[](https://travis-ci.org/cnelsonsic/optar)
|
||||||
|
|
||||||
This is a program to store data on paper using a 600dpi b/w laser printer and a
|
This is a program to store data on paper using a 600dpi b/w laser printer and a
|
||||||
600+ dpi scanner.
|
600+ dpi scanner.
|
||||||
|
|
||||||
@ -11,28 +13,28 @@ there is no unnecessary jitter).
|
|||||||
Make sure you have libpng installed and if you type "libpng-config" on the
|
Make sure you have libpng installed and if you type "libpng-config" on the
|
||||||
commandline, there's a program which prints something.
|
commandline, there's a program which prints something.
|
||||||
|
|
||||||
Compile with "make". Become root (su -) and type "make install". Now you have
|
Compile with ``make``. Become root ``su -`` and type ``make install``. Now you have
|
||||||
optar, unoptar and pgm2ps installed on your system in /usr/local/bin. Later
|
optar, unoptar and pgm2ps installed on your system in /usr/local/bin. Later
|
||||||
you can uninstall by typing "make uninstall" the same way as you typed
|
you can uninstall by typing ``make uninstall`` the same way as you typed
|
||||||
"make install".
|
``make install``.
|
||||||
|
|
||||||
Encoding (writing)
|
Encoding (writing)
|
||||||
------------------
|
------------------
|
||||||
Run
|
Run
|
||||||
|
|
||||||
./optar other_guys.ogg other_guys.ogg
|
``./optar other_guys.ogg other_guys.ogg``
|
||||||
|
|
||||||
which will produce files:
|
which will produce files:
|
||||||
|
|
||||||
other_guys.ogg_0001.pgm
|
* other_guys.ogg_0001.pgm
|
||||||
other_guys.ogg_0002.pgm
|
* other_guys.ogg_0002.pgm
|
||||||
other_guys.ogg_0003.pgm
|
* other_guys.ogg_0003.pgm
|
||||||
other_guys.ogg_0004.pgm
|
* other_guys.ogg_0004.pgm
|
||||||
other_guys.ogg_0005.pgm
|
* other_guys.ogg_0005.pgm
|
||||||
other_guys.ogg_0006.pgm
|
* other_guys.ogg_0006.pgm
|
||||||
|
|
||||||
Now convert them into PostScript using the included pgm2ps tool:
|
Now convert them into PostScript using the included pgm2ps tool:
|
||||||
./pgm2ps *.pgm
|
``./pgm2ps *.pgm``
|
||||||
|
|
||||||
Print them using a 600dpi (or more) laser printer. Inkjet or dot matrix was
|
Print them using a 600dpi (or more) laser printer. Inkjet or dot matrix was
|
||||||
never tested and will not probably work at the pre-defined data density. See
|
never tested and will not probably work at the pre-defined data density. See
|
||||||
@ -49,18 +51,18 @@ yellow pages on the scanner lid to get sharper picture *). Insert the
|
|||||||
page so that the text on the bottom is upright. Scan the pages into
|
page so that the text on the bottom is upright. Scan the pages into
|
||||||
PNG (not JPEG!) on 600dpi (or 1200dpi, slightly better):
|
PNG (not JPEG!) on 600dpi (or 1200dpi, slightly better):
|
||||||
|
|
||||||
scan_0001.png
|
* scan_0001.png
|
||||||
scan_0002.png
|
* scan_0002.png
|
||||||
scan_0003.png
|
* scan_0003.png
|
||||||
scan_0004.png
|
* scan_0004.png
|
||||||
scan_0005.png
|
* scan_0005.png
|
||||||
scan_0006.png
|
* scan_0006.png
|
||||||
|
|
||||||
Read the number sequence (format specification) from any of the papers and feed
|
Read the number sequence (format specification) from any of the papers and feed
|
||||||
it as 1st argument to the optar, 2nd argument is the filename part before the
|
it as 1st argument to the optar, 2nd argument is the filename part before the
|
||||||
underscore:
|
underscore:
|
||||||
|
|
||||||
unoptar 0-65-93-24-3-1-2-24 scan > out.ogg
|
``unoptar 0-65-93-24-3-1-2-24 scan > out.ogg``
|
||||||
|
|
||||||
Then play out.ogg with mplayer. You should get first about 41 seconds from the
|
Then play out.ogg with mplayer. You should get first about 41 seconds from the
|
||||||
Ogg Vorbis file.
|
Ogg Vorbis file.
|
||||||
@ -107,7 +109,7 @@ Future improvement
|
|||||||
camera. Currently it cannot since digital camera blurs at the sides of
|
camera. Currently it cannot since digital camera blurs at the sides of
|
||||||
the picture.
|
the picture.
|
||||||
|
|
||||||
(c) GPL 2007 Karel 'Clock' Kulhavy of Twibright Labs
|
© GPL 2007 Karel 'Clock' Kulhavy of Twibright Labs
|
||||||
See COPYING for the text of the GPL license.
|
See COPYING for the text of the GPL license.
|
||||||
e-mail: clock (at) twibright (dot) com
|
e-mail: clock (at) twibright (dot) com
|
||||||
Twibright Optar homepage: http://ronja.twibright.com/optar/
|
Twibright Optar homepage: http://ronja.twibright.com/optar/
|
Loading…
x
Reference in New Issue
Block a user