mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
Rename container scripts to document-to-pixels and pixels-to-pdf, and add tesseract dependency
This commit is contained in:
parent
195386d526
commit
db23ced6c5
4 changed files with 5 additions and 5 deletions
|
@ -91,7 +91,7 @@ class ConvertToPixels(TaskBase):
|
||||||
"-v",
|
"-v",
|
||||||
f"{self.common.pixel_dir.name}:/dangerzone",
|
f"{self.common.pixel_dir.name}:/dangerzone",
|
||||||
"dangerzone",
|
"dangerzone",
|
||||||
"convert_to_pixels",
|
"document-to-pixels",
|
||||||
]
|
]
|
||||||
output = self.execute_podman(args)
|
output = self.execute_podman(args)
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ class ConvertToPDF(TaskBase):
|
||||||
"-v",
|
"-v",
|
||||||
f"{self.common.safe_dir.name}:/safezone",
|
f"{self.common.safe_dir.name}:/safezone",
|
||||||
"dangerzone",
|
"dangerzone",
|
||||||
"convert_to_pdf",
|
"pixels-to-pdf",
|
||||||
]
|
]
|
||||||
self.execute_podman(args)
|
self.execute_podman(args)
|
||||||
self.task_finished.emit()
|
self.task_finished.emit()
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
FROM ubuntu:18.04
|
FROM ubuntu:18.04
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y file poppler-utils imagemagick ghostscript
|
apt-get install -y file poppler-utils imagemagick ghostscript tesseract-ocr tesseract-ocr-all
|
||||||
|
|
||||||
# Fix imagemagick policy to allow writing PDFs
|
# Fix imagemagick policy to allow writing PDFs
|
||||||
RUN sed -i '/rights="none" pattern="PDF"/c\<policy domain="coder" rights="read|write" pattern="PDF" />' /etc/ImageMagick-6/policy.xml
|
RUN sed -i '/rights="none" pattern="PDF"/c\<policy domain="coder" rights="read|write" pattern="PDF" />' /etc/ImageMagick-6/policy.xml
|
||||||
|
|
||||||
COPY convert_to_pixels /usr/local/bin/convert_to_pixels
|
COPY document-to-pixels /usr/local/bin/document-to-pixels
|
||||||
COPY convert_to_pdf /usr/local/bin/convert_to_pdf
|
COPY pixels-to-pdf /usr/local/bin/pixels-to-pdf
|
||||||
|
|
Loading…
Reference in a new issue