Change license of all GPLv3 files to MPL-2.0

https://github.com/jbarlow83/OCRmyPDF/issues/600
This commit is contained in:
James R. Barlow
2020-08-05 00:44:42 -07:00
parent 12c567ee10
commit aa0ec40102
67 changed files with 646 additions and 1537 deletions
+373 -674
View File
File diff suppressed because it is too large Load Diff
+8 -4
View File
@@ -127,11 +127,15 @@ OCRmyPDF would not be the software that it is today without companies and users
## License ## License
The OCRmyPDF software is licensed under the GNU GPLv3. Certain files are covered by other licenses, as noted in their source files. The OCRmyPDF software is licensed under the Mozilla Public License 2.0
(MPL-2.0). This license permits integration of OCRmyPDF with other code,
included commercial and closed source, but asks you to publish source-level
modifications you make to OCRmyPDF.
The license for each test file varies, and is noted in tests/resources/README.rst. The documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA 4.0). Some components of OCRmyPDF have other licenses, as noted in those files and the
``debian/copyright`` file. Most files in ``misc/`` use the MIT license, and the
OCRmyPDF versions prior to 6.0 were distributed under the MIT License. documentation and test files are generally licensed under Creative Commons
ShareAlike 4.0 (CC-BY-SA 4.0).
## Disclaimer ## Disclaimer
+11 -3
View File
@@ -5,9 +5,10 @@ Source: https://github.com/jbarlow83/OCRmyPDF
Files: * Files: *
Copyright: Copyright:
(C) 2013-2017 The OCRmyPDF Authors (C) 2013-2015 Julien Pfefferkorn
(C) 2013-2016, 2015-2017 2016, 2017, 2017-2018, 2018 James R. Barlow (C) 2015-2020 James R. Barlow
License: GPL-3+ (C) 2019 Martin Wind
License: MPL-2.0
Files: misc/* Files: misc/*
Copyright: Copyright:
@@ -158,6 +159,13 @@ Files: debian/*
Copyright: (C) 2016 Sean Whitton <spwhitton@spwhitton.name> Copyright: (C) 2016 Sean Whitton <spwhitton@spwhitton.name>
License: GPL-3+ License: GPL-3+
License: MPL-2.0
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0.
.
On Debian systems the full text of the MPL-2.0 can be found in
/usr/share/common-licenses/MPL-2.0.
License: GPL-3+ License: GPL-3+
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
+11 -1
View File
@@ -32,7 +32,8 @@ If you are proposing a change that will require a new Python dependency, we
prefer dependencies that are already packaged by Debian or Red Hat. This makes prefer dependencies that are already packaged by Debian or Red Hat. This makes
life much easier for our downstream package maintainers. life much easier for our downstream package maintainers.
Python dependencies must also be GPLv3 compatible. Python dependencies must also be license-compatible. GPLv3 or AGPLv3 are likely
incompatible with the project's license, but LGPLv3 is compatible.
New non-Python dependencies New non-Python dependencies
=========================== ===========================
@@ -55,3 +56,12 @@ of that platform.
Packager maintainers, please ensure that the command line completion scripts in Packager maintainers, please ensure that the command line completion scripts in
``misc/`` are installed. ``misc/`` are installed.
Copyright and license
=====================
For contributions over 10 lines of code, please include your name to list of
copyright holders for that file. The core program is licensed under MPL-2.0,
test files and documentation under CC-BY-SA 4.0, and miscellaneous files under
MIT. Please contribute code only that you wrote and you have the permission to
contribute or license to us.
+1 -2
View File
@@ -163,8 +163,7 @@ complete. This may entail setting a long timeout; this interface is more
useful for internal HTTP API calls. useful for internal HTTP API calls.
Unlike the rest of OCRmyPDF, this web service is licensed under the Unlike the rest of OCRmyPDF, this web service is licensed under the
Affero GPLv3 (AGPLv3) since Ghostscript, a dependency of OCRmyPDF, is Affero GPLv3 (AGPLv3) since Ghostscript is also licensed in this way.
also licensed in this way.
In addition to the above, please read our In addition to the above, please read our
:ref:`general remarks on using OCRmyPDF as a service <ocr-service>`. :ref:`general remarks on using OCRmyPDF as a service <ocr-service>`.
+1 -1
View File
@@ -64,7 +64,7 @@ malicious user could upload a chosen PDF. In particular, it is not
necessarily secure against PDF malware or PDFs that cause denial of necessarily secure against PDF malware or PDFs that cause denial of
service. OCRmyPDF relies on Ghostscript, and therefore, if deployed service. OCRmyPDF relies on Ghostscript, and therefore, if deployed
online one should be prepared to comply with Ghostscript's Affero GPL online one should be prepared to comply with Ghostscript's Affero GPL
license, OCRmyPDF's GPL license, and any other licenses. license, and any other licenses.
Setting aside these concerns, a side effect of OCRmyPDF is it may Setting aside these concerns, a side effect of OCRmyPDF is it may
incidentally sanitize PDFs that contain certain types of malware. It incidentally sanitize PDFs that contain certain types of malware. It
+4 -8
View File
@@ -12,14 +12,10 @@ may be unreliable. Use the API to depend on precise behavior.
The public API may be useful in scripts that launch OCRmyPDF processes or that The public API may be useful in scripts that launch OCRmyPDF processes or that
wish to use some of its features for working with PDFs. wish to use some of its features for working with PDFs.
Note that it is licensed under GPLv3, so scripts that
``import ocrmypdf`` and are released publicly should probably also be
licensed under GPLv3.
v10.3.1 v10.3.1
======= =======
- Fixed a number of test suite failures with pdfminer.six older than veresion 20200420. - Fixed a number of test suite failures with pdfminer.six older than veresion 20200402.
- Enabled support for pdfminer.six 20200720. - Enabled support for pdfminer.six 20200720.
v10.3.0 v10.3.0
@@ -362,7 +358,7 @@ v9.0.0
- Added a high level API for applications that want to integrate OCRmyPDF. - Added a high level API for applications that want to integrate OCRmyPDF.
Special thanks to Martin Wind (@mawi1988) whose made significant contributions Special thanks to Martin Wind (@mawi1988) whose made significant contributions
to this effort. OCRmyPDF is GPLv3-licensed. to this effort.
- Added progress bars for long-running steps. ■■■■■■■□□ - Added progress bars for long-running steps. ■■■■■■■□□
- We now create linearized ("fast web view") PDFs by default. The new parameter - We now create linearized ("fast web view") PDFs by default. The new parameter
``--fast-web-view`` provides control over when this feature is applied. ``--fast-web-view`` provides control over when this feature is applied.
@@ -989,8 +985,8 @@ v6.1.0
v6.0.0 v6.0.0
====== ======
- The software license has been changed to GPLv3. Test resource files - The software license has been changed to GPLv3 [it has since changed again].
and some individual sources may have other licenses. Test resource files and some individual sources may have other licenses.
- OCRmyPDF now depends on - OCRmyPDF now depends on
`PyMuPDF <https://pymupdf.readthedocs.io/en/latest/installation/>`__. `PyMuPDF <https://pymupdf.readthedocs.io/en/latest/installation/>`__.
Including PyMuPDF is the primary reason for the change to GPLv3. Including PyMuPDF is the primary reason for the change to GPLv3.
+5 -15
View File
@@ -2,20 +2,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# © 2015 James R. Barlow: github.com/jbarlow83 # © 2015 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
from __future__ import print_function, unicode_literals from __future__ import print_function, unicode_literals
@@ -60,7 +50,7 @@ setup(
"Intended Audience :: End Users/Desktop", "Intended Audience :: End Users/Desktop",
"Intended Audience :: Science/Research", "Intended Audience :: Science/Research",
"Intended Audience :: System Administrators", "Intended Audience :: System Administrators",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Operating System :: MacOS :: MacOS X", "Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows :: Windows 10", "Operating System :: Microsoft :: Windows :: Windows 10",
"Operating System :: POSIX", "Operating System :: POSIX",
+3 -14
View File
@@ -1,19 +1,8 @@
# © 2017 James R. Barlow: github.com/jbarlow83 # © 2017 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
from pluggy import HookimplMarker as _HookimplMarker from pluggy import HookimplMarker as _HookimplMarker
+4 -14
View File
@@ -1,20 +1,10 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# © 2015-19 James R. Barlow: github.com/jbarlow83 # © 2015-19 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import logging import logging
import os import os
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2020 James R. Barlow: github.com/jbarlow83 # © 2020 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import logging import logging
import logging.handlers import logging.handlers
+4 -14
View File
@@ -1,18 +1,8 @@
# © 2020 James R. Barlow: github.com/jbarlow83 # © 2020 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
"""Manage third party executables""" """Manage third party executables"""
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2017 James R. Barlow: github.com/jbarlow83 # © 2017 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
"""Interface to Ghostscript executable""" """Interface to Ghostscript executable"""
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2018 James R. Barlow: github.com/jbarlow83 # © 2018 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
"""Interface to jbig2 executable""" """Interface to jbig2 executable"""
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2018 James R. Barlow: github.com/jbarlow83 # © 2018 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
"""Interface to pngquant executable""" """Interface to pngquant executable"""
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2017 James R. Barlow: github.com/jbarlow83 # © 2017 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
"""Interface to Tesseract executable""" """Interface to Tesseract executable"""
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2015 James R. Barlow: github.com/jbarlow83 # © 2015 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
# unpaper documentation: # unpaper documentation:
# https://github.com/Flameeyes/unpaper/blob/master/doc/basic-concepts.md # https://github.com/Flameeyes/unpaper/blob/master/doc/basic-concepts.md
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2018 James R. Barlow: github.com/jbarlow83 # © 2018 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import logging import logging
from contextlib import suppress from contextlib import suppress
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2018 James R. Barlow: github.com/jbarlow83 # © 2018 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import os import os
import shutil import shutil
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2020 James R. Barlow: github.com/jbarlow83 # © 2020 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import logging import logging
import sys import sys
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2016 James R. Barlow: github.com/jbarlow83 # © 2016 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import logging import logging
import os import os
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2020 James R. Barlow: github.com/jbarlow83 # © 2020 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import argparse import argparse
import importlib import importlib
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2016 James R. Barlow: github.com/jbarlow83 # © 2016 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import logging import logging
import logging.handlers import logging.handlers
+3 -14
View File
@@ -1,20 +1,9 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# © 2015-17 James R. Barlow: github.com/jbarlow83 # © 2015-17 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import locale import locale
+3 -14
View File
@@ -1,19 +1,8 @@
# © 2017 James R. Barlow: github.com/jbarlow83 # © 2017 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import pkg_resources import pkg_resources
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2019 James R. Barlow: github.com/jbarlow83 # © 2019 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import logging import logging
import os import os
+3 -14
View File
@@ -1,16 +1,5 @@
# © 2020 James R. Barlow: github.com/jbarlow83 # © 2020 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2020 James R. Barlow: github.com/jbarlow83 # © 2020 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import logging import logging
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2020 James R. Barlow: github.com/jbarlow83 # © 2020 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import logging import logging
import os import os
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2015-19 James R. Barlow: github.com/jbarlow83 # © 2015-19 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import argparse import argparse
+3 -14
View File
@@ -1,19 +1,8 @@
# © 2016 James R. Barlow: github.com/jbarlow83 # © 2016 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
from enum import IntEnum from enum import IntEnum
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2016 James R. Barlow: github.com/jbarlow83 # © 2016 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import logging import logging
import multiprocessing import multiprocessing
+4 -14
View File
@@ -3,20 +3,10 @@
# #
# © 2013-16: jbarlow83 from Github (https://github.com/jbarlow83) # © 2013-16: jbarlow83 from Github (https://github.com/jbarlow83)
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
# #
# Python FFI wrapper for Leptonica library # Python FFI wrapper for Leptonica library
+4 -14
View File
@@ -1,18 +1,8 @@
# © 2017 James R. Barlow: github.com/jbarlow83 # © 2017 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
"""Bindings to external libraries""" """Bindings to external libraries"""
+4 -14
View File
@@ -1,20 +1,10 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# © 2017 James R. Barlow: github.com/jbarlow83 # © 2017 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
from pathlib import Path from pathlib import Path
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2018 James R. Barlow: github.com/jbarlow83 # © 2018 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import logging import logging
import sys import sys
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2015 James R. Barlow: github.com/jbarlow83 # © 2015 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
""" """
Utilities for PDF/A production and confirmation with Ghostspcript. Utilities for PDF/A production and confirmation with Ghostspcript.
+4 -14
View File
@@ -1,19 +1,9 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# © 2015 James R. Barlow: github.com/jbarlow83 # © 2015 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
from ocrmypdf.pdfinfo.info import Colorspace, Encoding, PdfInfo from ocrmypdf.pdfinfo.info import Colorspace, Encoding, PdfInfo
+4 -14
View File
@@ -1,20 +1,10 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# © 2015 James R. Barlow: github.com/jbarlow83 # © 2015 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import logging import logging
import re import re
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2018 James R. Barlow: github.com/jbarlow83 # © 2018 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import re import re
from math import copysign from math import copysign
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2020 James R. Barlow: github.com/jbarlow83 # © 2020 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
from abc import ABC, abstractmethod, abstractstaticmethod from abc import ABC, abstractmethod, abstractstaticmethod
from argparse import ArgumentParser, Namespace from argparse import ArgumentParser, Namespace
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2020 James R. Barlow: github.com/jbarlow83 # © 2020 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
"""Utilities to measure OCR quality""" """Utilities to measure OCR quality"""
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2020 James R. Barlow: github.com/jbarlow83 # © 2020 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
"""Wrappers to manage subprocess calls""" """Wrappers to manage subprocess calls"""
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2017 James R. Barlow: github.com/jbarlow83 # © 2017 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import os import os
import platform import platform
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2019 James R. Barlow: github.com/jbarlow83 # © 2019 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import logging import logging
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2019 James R. Barlow: github.com/jbarlow83 # © 2019 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import logging import logging
from io import BytesIO, StringIO from io import BytesIO, StringIO
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2018 James R. Barlow: github.com/jbarlow83 # © 2018 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import pytest import pytest
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2019 James R. Barlow: github.com/jbarlow83 # © 2019 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
from subprocess import PIPE, run from subprocess import PIPE, run
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2019 James R. Barlow: github.com/jbarlow83 # © 2019 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import logging import logging
from decimal import Decimal from decimal import Decimal
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2019 James R. Barlow: github.com/jbarlow83 # © 2019 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
from unittest.mock import patch from unittest.mock import patch
+5 -15
View File
@@ -1,19 +1,9 @@
# © 2019 James R. Barlow: github.com/jbarlow83 # © 2019 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import logging import logging
import multiprocessing import multiprocessing
@@ -22,7 +12,7 @@ from unittest.mock import MagicMock
import pytest import pytest
import ocrmypdf.helpers as helpers from ocrmypdf import helpers as helpers
from ocrmypdf.subprocess import shim_paths_with_program_files from ocrmypdf.subprocess import shim_paths_with_program_files
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2015 James R. Barlow: github.com/jbarlow83 # © 2015 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import re import re
from io import StringIO from io import StringIO
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2019 James R. Barlow: github.com/jbarlow83 # © 2019 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
from unittest.mock import patch from unittest.mock import patch
+3 -14
View File
@@ -1,19 +1,8 @@
# © 2018 James R. Barlow: github.com/jbarlow83 # © 2018 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
from os import fspath from os import fspath
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2015-19 James R. Barlow: github.com/jbarlow83 # © 2015-19 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import os import os
import shutil import shutil
+3 -14
View File
@@ -1,19 +1,8 @@
# © 2018 James R. Barlow: github.com/jbarlow83 # © 2018 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import datetime import datetime
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2018 James R. Barlow: github.com/jbarlow83 # © 2018 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
from os import fspath from os import fspath
from pathlib import Path from pathlib import Path
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2019 James R. Barlow: github.com/jbarlow83 # © 2019 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import pytest import pytest
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2015 James R. Barlow: github.com/jbarlow83 # © 2015 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import pickle import pickle
from math import isclose from math import isclose
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2019 James R. Barlow: github.com/jbarlow83 # © 2019 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
from math import isclose from math import isclose
+5 -15
View File
@@ -1,23 +1,13 @@
# © 2020 James R. Barlow: github.com/jbarlow83 # © 2020 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import pytest import pytest
import ocrmypdf.quality as qual from ocrmypdf import quality as qual
def test_quality_measurement(): def test_quality_measurement():
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2018 James R. Barlow: github.com/jbarlow83 # © 2018 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
from io import BytesIO from io import BytesIO
from os import fspath from os import fspath
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2019 James R. Barlow: github.com/jbarlow83 # © 2019 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import os import os
import sys import sys
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2017 James R. Barlow: github.com/jbarlow83 # © 2017 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import logging import logging
import os import os
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2015-17 James R. Barlow: github.com/jbarlow83 # © 2015-17 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
from os import fspath from os import fspath
from unittest.mock import patch from unittest.mock import patch
+4 -14
View File
@@ -1,19 +1,9 @@
# © 2017 James R. Barlow: github.com/jbarlow83 # © 2017 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
from math import isclose from math import isclose
+5 -15
View File
@@ -1,19 +1,9 @@
# © 2019 James R. Barlow: github.com/jbarlow83 # © 2019 James R. Barlow: github.com/jbarlow83
# #
# This file is part of OCRmyPDF. # This Source Code Form is subject to the terms of the Mozilla Public
# # License, v. 2.0. If a copy of the MPL was not distributed with this
# OCRmyPDF is free software: you can redistribute it and/or modify # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
import logging import logging
from unittest.mock import patch from unittest.mock import patch
@@ -21,7 +11,7 @@ from unittest.mock import patch
import pikepdf import pikepdf
import pytest import pytest
import ocrmypdf._validation as vd from ocrmypdf import _validation as vd
from ocrmypdf._plugin_manager import get_plugin_manager from ocrmypdf._plugin_manager import get_plugin_manager
from ocrmypdf.api import create_options from ocrmypdf.api import create_options
from ocrmypdf.cli import get_parser from ocrmypdf.cli import get_parser