From c72791bd211f58bf17e80ae07177f1413a0a6559 Mon Sep 17 00:00:00 2001 From: jonaswinkler <17569239+jonaswinkler@users.noreply.github.com> Date: Wed, 19 May 2021 22:05:23 +0200 Subject: [PATCH] Fix file permissions --- docker/docker-entrypoint.sh | 0 docker/docker-prepare.sh | 0 docker/install_management_commands.sh | 0 docker/management_script.sh | 0 install-paperless-ng.sh | 0 scripts/post-consumption-example.sh | 0 test.py | 40 --------------------------- 7 files changed, 40 deletions(-) mode change 100644 => 100755 docker/docker-entrypoint.sh mode change 100644 => 100755 docker/docker-prepare.sh mode change 100644 => 100755 docker/install_management_commands.sh mode change 100644 => 100755 docker/management_script.sh mode change 100644 => 100755 install-paperless-ng.sh mode change 100644 => 100755 scripts/post-consumption-example.sh delete mode 100644 test.py diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh old mode 100644 new mode 100755 diff --git a/docker/docker-prepare.sh b/docker/docker-prepare.sh old mode 100644 new mode 100755 diff --git a/docker/install_management_commands.sh b/docker/install_management_commands.sh old mode 100644 new mode 100755 diff --git a/docker/management_script.sh b/docker/management_script.sh old mode 100644 new mode 100755 diff --git a/install-paperless-ng.sh b/install-paperless-ng.sh old mode 100644 new mode 100755 diff --git a/scripts/post-consumption-example.sh b/scripts/post-consumption-example.sh old mode 100644 new mode 100755 diff --git a/test.py b/test.py deleted file mode 100644 index 18a97bacb..000000000 --- a/test.py +++ /dev/null @@ -1,40 +0,0 @@ -import ocrmypdf -from ocrmypdf import ocr, hookimpl -from ocrmypdf._concurrent import NullProgressBar - - -def get_unified_progress(self, desc, current, total): - steps = ["Scanning contents", "OCR", "PDF/A conversion"] - if desc in steps: - index = steps.index(desc) - return (index / len(steps)) + (current / total) / len(steps) - else: - return 0 - - -class MyProgressBar: - - # __enter__, __exit__ and others removed for simplicity - - def update(self, *args, **kwargs): - pass - # i'd need to call MyOcrClass.progress() here. - - -@hookimpl -def get_progressbar_class(*args, **kwargs): - return MyProgressBar - - -class MyOcrClass: - - def progress(self, current_p, max_p): - # send progress over web sockets, *requires* self reference - pass - - def run(self): - ocrmypdf.ocr("test.pdf", "test_out.pdf", skip_text=True, jobs=1, plugins="test") - - -if __name__ == '__main__': - MyOcrClass().run()