From f294e16f9d89a9fd521227e435609f24db1264e8 Mon Sep 17 00:00:00 2001 From: Castro0o Date: Fri, 23 Feb 2018 16:11:42 +0100 Subject: [PATCH] working on cleaning --- Makefile | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 490012a..9dc3d55 100644 --- a/Makefile +++ b/Makefile @@ -8,8 +8,10 @@ color_g:="\033[0;32m" color_b:="\033[0;34m" space:= $(empty) $(empty) newline:= '\n' -listtxt:= $(subst $(space),$(newline),$(images)) +listimgs:= $(subst $(space),$(newline),$(images))0 OS:= $(shell uname) +ocroutput:= ocr/output.txt +txtfiles:= $(wildcard ocr/*.txt) # 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 @@ -28,22 +30,23 @@ dirs: # create the directories for the working structures tesseract: echo $(listtxt) > output/list.txt - tesseract output/list.txt output/plain + tesseract ocr/list.txt $(basename $(ocroutput)) + myscript: tesseract - cat output/plain.txt | python3 src/myscript.py > output/a-new-file.txt + cat $(outputocr) | python3 src/myscript.py > output/a-new-file.txt wordtagger: tesseract - cat output/plain.txt | python3 src/wordtagger.py > output/tagged-words.txt - + cat $(outputocr) | python3 src/wordtagger.py > output/tagged-words.txt + talktochatbot: tesseract - cat output/plain.txt | python3 src/textbotconversation.py + cat $(outputocr) | python3 src/textbotconversation.py n+7: tesseract - cat output/plain.txt | python3 src/n_7.py > output/blah.txt + cat $(outputocr) | python3 src/n_7.py > output/blah.txt n+7: tesseract - cat output/plain.txt | python3 src/n_7.py > output/blah.txt + cat $(outputocr) | python3 src/n_7.py > output/blah.txt visualization: $(images) $(tmpfile) #requires mplayer @echo $(tmpfile) @@ -63,3 +66,6 @@ endif # ** Makefile Syntax notes ** # @ preceding command tells make not to print the command being executed # + +tts: + cat $(ocroutput) | espeak