James R. Barlow
4ff4ed24a8
Refactor Windows executable shims
2020-04-14 23:59:33 -07:00
James R. Barlow
9471bc8921
Fix versions with leading v, e.g. v5.0
2020-04-10 13:42:33 -07:00
James R. Barlow
d13d70fd56
Fix version checker failing for qpdf 10.0.0
...
Fixes #527
2020-04-10 13:00:19 -07:00
James R. Barlow
32041c43e1
tests: improve tesseract coverage
2020-01-04 02:35:14 -08:00
James R. Barlow
599028bebb
tesseract: don't explicitly set lstm_use_matrix
...
Apparently tesseract does this own its own as needed.
2020-01-04 01:17:33 -08:00
James R. Barlow
6faa8f7221
logging: always log process arguments and stderr when at debug
...
Also remove ad-hoc logging of this information.
2020-01-01 16:48:48 -08:00
James R. Barlow
a4dc5e365f
logging: fix incorrect usage: logging.Logger()
2020-01-01 16:47:36 -08:00
James R. Barlow
16dd8b54a8
ghostscript: don't delete output_file that will never exist
...
We stream output now, so no point in deleting.
2019-12-30 22:38:38 -08:00
James R. Barlow
708113a514
Windows: Remove Program Files cache from ocrmypdf.exec
...
@lru_cache doesn't work here, so let's just remove it.
2019-12-29 02:36:20 -08:00
James R. Barlow
868b3b4abd
exec/init: os.get_exec_path() returns list not str
2019-12-28 16:11:08 -08:00
James R. Barlow
a53a3937c2
Fix exception on parsing Ghostscript error messages
2019-12-20 11:25:45 -08:00
James R. Barlow
c5edff2c2f
Sort imports
2019-12-19 15:31:18 -08:00
James R. Barlow
39da931a56
Look in Program Files for executables and liblept5.dll
2019-12-19 12:11:32 -08:00
James R. Barlow
9559b0b186
Use pikepdf to perform qpdf.check()
2019-12-11 01:21:15 -08:00
James R. Barlow
a2d89f67c4
Improve help messages for Windows
2019-12-10 01:44:00 -08:00
James R. Barlow
b354511ac9
ghostscript: document need to write to stdout when using txtwrite
2019-12-09 16:17:10 -08:00
James R. Barlow
65855dc14c
Fix close_fds=True on Windows Python 3.6
2019-12-09 16:17:10 -08:00
James R. Barlow
cac4a8b9b6
Suppress duplicate error messages from Ghostscript
2019-12-06 15:14:15 -08:00
James R. Barlow
6b745d892f
Merge branch 'windows'
2019-12-06 15:09:09 -08:00
James R. Barlow
fbf271a3ec
Remove Tesseract < 4.0 specific check
2019-12-06 15:06:02 -08:00
James R. Barlow
8077718804
Possible fix to loss of log adapter state
2019-12-06 15:05:58 -08:00
James R. Barlow
cb3cfaa055
Add Windows install advice
2019-12-04 21:01:09 -08:00
James R. Barlow
9db01c7ff5
Remove test_bad_utf8
...
Due to difficulties of getting this to work on Python 3.8, Windows, and
high probability that this behavior is now gone from Tesseract 4.0+.
Originally added in 2017.
2019-12-04 21:01:09 -08:00
James R. Barlow
06a1f987d4
Use _OCRMYPDF_TEST_PATH for testing and .py stubs to simulate symlinks
2019-12-04 21:01:06 -08:00
James R. Barlow
e51e21c6b6
ghostscript: Refactor checking for executable name on Windows
2019-12-04 21:01:06 -08:00
James R. Barlow
c5fa72bd4e
ghostscript: use run(check=True) for more consistent error handling
2019-12-04 21:01:00 -08:00
James R. Barlow
bf99587aa1
ghostscript: use correct executable name on Windows
2019-12-04 17:37:38 -08:00
James R. Barlow
d249aef57d
ghostscript: don't use NamedTemporaryFile
...
Temporary files are more awkward for Windows.
2019-12-04 17:37:38 -08:00
James R. Barlow
e63503d64b
Fix difference in Windows error message breaking test_no_languages
2019-12-04 17:13:51 -08:00
James R. Barlow
72d3ee3a87
Refactor symlink usage to support Windows
2019-12-04 17:13:51 -08:00
James R. Barlow
9b2ab92913
tesseract: fix exception when logger is RootLogger
2019-11-11 22:19:01 -08:00
James R. Barlow
45bea1c0e0
Import and docstring cleanup
2019-11-09 14:56:30 -08:00
James R. Barlow
979b0bcaed
tesseract: refactor logging
2019-11-05 15:38:09 -08:00
James R. Barlow
6e99e7b346
Use lstm_use_matrix for --user-words,patterns
2019-10-20 00:49:11 -07:00
James R. Barlow
4d26867dee
Delinting
2019-09-20 17:17:11 -07:00
James R. Barlow
17ac9d7a9a
Embed ICC profile in .ps (fixing Ghostscript 9.28 compatibility)
...
Previously we included the
filename, which required Postscript to run with file access enabled. For
security, Ghostscript 9.28 enables ``-dSAFER`` and as such, no longer
permits access to any file by default. This fix is necessary for
compatibility with Ghostscript 9.28.
We use ASCII85 for a slightly more compact representation.
2019-09-05 13:17:26 -07:00
James R. Barlow
feff1e38bb
Use context managers to ensure Pillow images are closed
2019-09-03 17:19:12 -07:00
James R. Barlow
11ef78a891
Fix running without eng.traineddata installed raises exception
2019-08-27 14:54:03 -07:00
James R. Barlow
5f00e4f9d8
Sort imports
2019-07-27 04:51:52 -07:00
James R. Barlow
5304c631ec
Don't warn about --user-words in Tesseract 4.1 or later
2019-07-27 02:14:59 -07:00
James R. Barlow
7117dc10de
Suppress noisy empty debug messages
2019-07-11 01:23:01 -07:00
James R. Barlow
20ad032977
Fix some error messages that printed directly to sys.stderr instead of logging
2019-06-05 03:07:48 -07:00
James R. Barlow
eb5200d26a
Change most tests to use ocrmypdf API instead of subprocess
...
The main benefit of this is code coverage gains can actually follow it.
Also removes most ugly os.environ hacks.
2019-06-03 01:45:27 -07:00
James R. Barlow
8ed4e229f3
ghostscript: avoid log=None construct
2019-05-30 13:57:38 -07:00
James R. Barlow
e4baa8c0dd
Remove sys.exit() calls so we don't terminate caller application
2019-05-20 15:08:20 -07:00
James R. Barlow
c1af0fb18d
Cleanup ghostscript error output
2019-05-17 00:50:29 -07:00
James R. Barlow
50bd129d7a
logging: don't pass log object to validation
2019-05-16 01:58:48 -07:00
James R. Barlow
486f73d5d6
Remove custom logger
2019-05-15 02:28:13 -07:00
James R. Barlow
c904b430b6
Merge master into api branch; all test pass
2019-05-14 16:33:02 -07:00
James R. Barlow
5adbddd1f9
ghostscript: rendering threads has no effect on pdfwrite, so remove it
...
See
https://www.ghostscript.com/doc/current/Language.htm
2019-05-12 03:36:07 -07:00