I have setup the docker container to run the model evaluation.
Run find . -name "*.pdf" -exec python3 process.py {} txt/{}.txt \; but don't rewrite files that already exist. Instead of .pdf.txt make it just .txt
Run find . -name "*.pdf" -exec python3 process.py {} txt/{}.txt \; but don't rewrite files that already exist. Instead of .pdf.txt make it just .txt
1 | find . -name "*.pdf" -exec bash -c 'if [ ! -f "txt/{}.txt" ]; then python3 process.py "$0" "txt/{}.txt"; fi' {} \; |
I extracted the following code from that output:
1 | find . -name "*.pdf" -exec bash -c 'if [ ! -f "txt/{}.txt" ]; then python3 process.py "$0" "txt/{}.txt"; fi' {} \; |
Running the following program:
1 | find . -name "*.pdf" -exec bash -c 'if [ ! -f "txt/{}.txt" ]; then python3 process.py "$0" "txt/{}.txt"; fi' {} \; |
Traceback (most recent call last): File "/usr/src/app/check.py", line 6, in <module> print('final: ' + str(check_ok())) File "/usr/src/app/check.py", line 3, in check_ok return open("txt/a.txt").read() == "done1" and open("txt/b.txt").read() == "hello2" and open("txt/c.txt").read() == "done3" and len(os.listdir("txt")) == 3 FileNotFoundError: [Errno 2] No such file or directory: 'txt/b.txt' Resulting in output: False
I have setup the docker container to run the model evaluation.
Run find . -name "*.pdf" -exec python3 process.py {} txt/{}.txt \; but don't rewrite files that already exist. Instead of .pdf.txt make it just .txt
Run find . -name "*.pdf" -exec python3 process.py {} txt/{}.txt \; but don't rewrite files that already exist. Instead of .pdf.txt make it just .txt
1 2 3 4 5 | find . -name "*.pdf" -exec bash -c ' if [ ! -f "txt/{}.txt" ]; then python3 process.py "$1" "txt/{}.txt" fi ' sh {} \; |
I extracted the following code from that output:
1 2 3 4 5 | find . -name "*.pdf" -exec bash -c ' if [ ! -f "txt/{}.txt" ]; then python3 process.py "$1" "txt/{}.txt" fi ' sh {} \; |
Running the following program:
1 2 3 4 5 | find . -name "*.pdf" -exec bash -c ' if [ ! -f "txt/{}.txt" ]; then python3 process.py "$1" "txt/{}.txt" fi ' sh {} \; |
Traceback (most recent call last): File "/usr/src/app/check.py", line 6, in <module> print('final: ' + str(check_ok())) File "/usr/src/app/check.py", line 3, in check_ok return open("txt/a.txt").read() == "done1" and open("txt/b.txt").read() == "hello2" and open("txt/c.txt").read() == "done3" and len(os.listdir("txt")) == 3 FileNotFoundError: [Errno 2] No such file or directory: 'txt/b.txt' Resulting in output: False
I have setup the docker container to run the model evaluation.
Run find . -name "*.pdf" -exec python3 process.py {} txt/{}.txt \; but don't rewrite files that already exist. Instead of .pdf.txt make it just .txt
Run find . -name "*.pdf" -exec python3 process.py {} txt/{}.txt \; but don't rewrite files that already exist. Instead of .pdf.txt make it just .txt
1 | find . -name "*.pdf" -exec python3 process.py {} txt/{}.txt \; | grep -v '^txt/\(.*\)\.txt$' | xargs -r -I {} mv {} txt/{}.txt |
I extracted the following code from that output:
1 | find . -name "*.pdf" -exec python3 process.py {} txt/{}.txt \; | grep -v '^txt/\(.*\)\.txt$' | xargs -r -I {} mv {} txt/{}.txt |
Running the following program:
1 | find . -name "*.pdf" -exec python3 process.py {} txt/{}.txt \; | grep -v '^txt/\(.*\)\.txt$' | xargs -r -I {} mv {} txt/{}.txt |
Traceback (most recent call last): File "/usr/src/app/check.py", line 6, in <module> print('final: ' + str(check_ok())) File "/usr/src/app/check.py", line 3, in check_ok return open("txt/a.txt").read() == "done1" and open("txt/b.txt").read() == "hello2" and open("txt/c.txt").read() == "done3" and len(os.listdir("txt")) == 3 FileNotFoundError: [Errno 2] No such file or directory: 'txt/b.txt' Resulting in output: False