Added visualization; and color variables

master
Castro0o 6 years ago
parent 800bfc6c36
commit cf52e06142

@ -1,6 +1,7 @@
images=$(wildcard images/*.jpg)
# creates: images/001.jpg images/002.jpg images/000.jpg
tmpfile:= $(shell mktemp)
color_w:="\033[0;29m" # add color to output
color_r:="\033[0;31m" # echo $(color_r) something
color_g:="\033[0;32m"
@ -11,6 +12,8 @@ listtxt:= $(subst $(space),$(newline),$(images))
# subst is a way to do string replacements, it works like this: $(subst $(delimitator),$(replacement),$(list))
# it's used here to make a list of the images, with one filename on each line
rmtmp:
rm $(tmpfile)
dirs: # create the directories for the working structures
mkdir images # scanned image dir
@ -24,8 +27,13 @@ tesseract:
myscript: tesseract
cat output/plain.txt | python3 src/myscript.py > output/a-new-file.txt
visualization: $(images) $(tmpfile) #requires mplayer
@echo $(tmpfile)
for i in $(images); do \
cat $$i >> $(tmpfile); \
done;
cat $(tmpfile) | mplayer -vo x11 -sws 4 -zoom -vf dsize=720:720 -demuxer rawvideo -rawvideo w=56:h=64:i420:fps=25 -;\
# Changes: moved output list.txt,plain.txt from src/ to output/. src/ should be a dir for source-code and not outputs. Otherwise git will want to track these outputs, when it should only be tracking the tools :)
# ** Makefile Syntax notes **
# @ preceding command tells make not to print the command being executed

@ -3,6 +3,7 @@
Makefile:
* `make dirs`: create the working folder structure
* `make tessaract`
* `make tessaract` **dependency: tesseract**
* `make myscript`
* `make visualization`: **dependency: mplayer** creates visualization of images/ dir, by cating the images content into mplayer. See more option ins [shiftop](https://git.bleu255.com/shiftop/file/shiftop.html)

Loading…
Cancel
Save