James R. Barlow
411981efbc
Experiment with CFFI instead of ctypes
2016-01-30 15:06:25 -08:00
James R. Barlow
350ad5210e
Leptonica: convert to CFFI
2016-01-20 15:03:07 -08:00
James R. Barlow
f3b588764e
Suppress tesseract argument printout
2016-01-20 15:02:48 -08:00
James R. Barlow
b49f5a7d77
Support optionally using leptonica to deskew
...
unpaper doesn't seem to be good at deskewing. It fails on test case
with a lot of italics. I think it also struggles on pages with a lot
of whitespace. Leptonica continues to shine here.
However, this is only a first crack at Leptonica. The leptonica module
should be redone to use cffi (more extensible).
Also considering the possibility of making all Lept calls in a forked
process to insulate the calling process from C code crashes and the
messy redirect of stdout/stderr to read Leptonica's errors.
I don't think the redirect is a huge problem as long as multiprocesses
rather than multithreads are used. The ruffus child process that is
handling a page is single threaded and will not be affected by the
redirection. It just feels dirty. The main reason to consider a child
process is crash isolation.
2016-01-19 17:43:40 -08:00
James R. Barlow
bacbcba58a
Merge branch 'release/v3.2-rc1'
v3.2rc1
2016-01-19 16:58:37 -08:00
James R. Barlow
52e8aa434f
Update release notes for v3.2-rc1
2016-01-19 16:49:49 -08:00
James R. Barlow
37c508f3f8
Better versioning: no silly version files, but wrong ver in development
...
Small price to pay.
2016-01-19 16:07:52 -08:00
James R. Barlow
26e36422cc
More fiddling with version
2016-01-19 15:07:21 -08:00
James R. Barlow
f82cb002bc
Try automatic versioning with setuptools_scm
2016-01-19 13:27:18 -08:00
James R. Barlow
c1eb047a4b
Fix name of pdfa_def.ps
...
Used to include a copy of the parent dir's name.
2016-01-19 13:11:03 -08:00
James R. Barlow
626ca18f5c
Remove stale comment
2016-01-19 13:02:35 -08:00
James R. Barlow
9058dedfbe
New tests for ccitt, jbig2 encodings
2016-01-19 13:01:56 -08:00
James R. Barlow
a0952bfca3
Optimize: use img2pdf stream instead of repeated copies
2016-01-18 20:24:46 -08:00
James R. Barlow
354e61946e
Use os.makedirs for test output directories
...
Broke Travis
2016-01-16 02:47:56 -08:00
James R. Barlow
fd6d1d748a
Merge branch 'feature/pypdf-page-merge' into develop
2016-01-16 02:33:23 -08:00
James R. Barlow
360acd1e2c
Adjust test_oversample test case
...
Add -f to force generation of the background image at the desired
oversample resolution. Our new behavior is to only send the oversampled
image to Tesseract while leaving the main page intact unless asked to
deskew, clean, etc.
2016-01-15 15:55:23 -08:00
James R. Barlow
fc0479f110
Fix all but test_oversample[hocr]
2016-01-15 15:46:47 -08:00
James R. Barlow
62728205b6
Implement image+text merging in other cases
...
5 failed, 28 passed
failures:
test_oversample[hocr], test_skip_ocr, test_skip_big, test_maximum_options[hocr],
test_blank_input_pdf,
2016-01-15 15:38:08 -08:00
James R. Barlow
dc0fb25e64
Render hocr page: no longer needs an image as input
2016-01-15 15:16:47 -08:00
James R. Barlow
f3e04cce56
Update pipeline.svg
2016-01-15 14:56:16 -08:00
James R. Barlow
7067110308
Add safety check to prevent merge from running when not sensible
2016-01-15 14:54:45 -08:00
James R. Barlow
599d889703
Implement "perfect reconstruction" - transfer page and watermark OCR layer
...
Works, does not account for changes to clean/deskew, etc.
Surprisingly, it works. PyPDF2 fixes since last attempt?
2016-01-15 14:39:12 -08:00
James R. Barlow
2fa8366632
Merge branch 'feature/test-pageinfo-cleanup' into develop
2016-01-15 14:18:01 -08:00
James R. Barlow
c368c51bad
New hocrtransform test
2016-01-15 14:14:08 -08:00
James R. Barlow
7c558b3713
Move pageinfo test into tests folder
2016-01-11 17:40:44 -08:00
James R. Barlow
8d323ae510
Merge branch 'feature/pagesegmode' into develop
2016-01-11 17:23:00 -08:00
James R. Barlow
3b53e9adac
Use tesseract cache for -psm
2016-01-11 17:22:50 -08:00
James R. Barlow
074c1d71b4
Activate --tesseract-pagesegmode
2016-01-11 17:19:32 -08:00
James R. Barlow
1fca9a004d
Adjust command line parameters
...
Was splitting each argument to --tesseract-config into a list of single
character strings
2016-01-11 16:57:19 -08:00
James R. Barlow
b485a1ef78
Override ruffus' handling of --jobs
...
Ruffus treats omitted parameter as -j1. For our purposes it makes more
sense for omitting the parameter to mean "use all CPUs". As such we
must be able to distinguish -j1 from the parameter -j being omitted.
Telling ruffus to ignore the argument actually just makes it not auto
generate the argument. We can add an argument back with the same name.
2016-01-09 19:07:48 -08:00
James R. Barlow
326ef7a3ac
Merge branch 'hotfix/v3.1.1' into develop
...
# Conflicts:
# RELEASE_NOTES.rst
2016-01-09 18:55:04 -08:00
James R. Barlow
12bc58b5b6
Merge branch 'hotfix/v3.1.1'
v3.1.1
2016-01-09 18:45:40 -08:00
James R. Barlow
6af0815681
Bump version
2016-01-09 18:45:06 -08:00
James R. Barlow
66c2b9b78e
Merge branch 'hotfix/v3.1.1' into develop
2016-01-09 18:38:09 -08:00
James R. Barlow
d03c056cb1
Supporting all languages bloats the image by an extra 1 GB
...
Make it a special image
2016-01-04 16:49:06 -08:00
James R. Barlow
3f94d628fa
Dockerfile: remove manual build of unpaper
...
Fortunately unpaper now exists as binary package, eliminating the need
to install all of the build machinery and build it from source.
2016-01-04 15:07:12 -08:00
James R. Barlow
a64c7dbe99
Update dockerfile: include all languages
...
Also update ignore files
2016-01-04 14:27:16 -08:00
James R. Barlow
61b3ccb57c
Place ruffus database in temporary folder
...
Because we don't really use ruffus checkpoint feature, putting the
database in a permanent location does not help anything, but does cause
large database files and problems if the .ruffus_history.sqlite wanted
to be in a writable location.
2016-01-04 13:23:47 -08:00
James R. Barlow
424b4b33b1
Just go right ahead and demand Python 3.4
2016-01-04 12:56:51 -08:00
James R. Barlow
e510f89792
Python 2 warning message
2015-12-21 09:38:38 -08:00
James R. Barlow
49cd6cc619
Off by one error in page info calculation
2015-12-21 09:35:02 -08:00
James R. Barlow
9aa3d340d4
Tell Travis about the cache
2015-12-17 14:02:13 -08:00
James R. Barlow
09782242c8
Adjust test cases to use cache and noop more effectively
...
This reduces total execution time to 164s on my machine, down from
about double that.
2015-12-17 14:00:17 -08:00
James R. Barlow
9ec4aa039d
Add tesseract caching to speed up tests
2015-12-17 12:52:12 -08:00
James R. Barlow
ecebe2f24b
Let some tests use the spoofed tesseract
...
Where getting OCR doesn't matter
2015-12-17 11:56:09 -08:00
James R. Barlow
7313a77c2a
Implement pdf renderer side of tess spoof
2015-12-17 11:41:54 -08:00
James R. Barlow
45113676a3
Add Tesseract spoofing
2015-12-17 11:36:47 -08:00
James R. Barlow
102bd07019
Check for encrypted PDF and complain appropriately
2015-12-17 10:37:54 -08:00
James R. Barlow
9622e31da9
Use envvars in a new test case
...
And get rid of the messy binary replacement spoofing
2015-12-17 09:29:01 -08:00
James R. Barlow
1731ce2a44
Environment variables can now override default programs
2015-12-17 09:05:10 -08:00