From 56afd35c823c863f7c936d037017b6d8c705d354 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Thu, 4 Jan 2024 20:14:07 +0800 Subject: [PATCH 1/9] Refactor DockerfileBase to clean up apt cache after package installation Changes include: - Cleaning up the apt cache by adding `rm -rf /var/lib/apt/lists/*` after each package installation within the same RUN statement. - Ensuring the Docker image size is minimized by removing unnecessary files immediately after use. These adjustments will result in a more space-efficient Docker image. --- DockerfileBase | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/DockerfileBase b/DockerfileBase index c913635f..4e41d3e8 100644 --- a/DockerfileBase +++ b/DockerfileBase @@ -6,7 +6,8 @@ FROM ubuntu:latest AS base # JDK for app RUN apt-get update && \ apt-get install -y --no-install-recommends \ - openjdk-17-jre + openjdk-17-jre && \ + rm -rf /var/lib/apt/lists/* # Doc conversion RUN apt-get update && \ @@ -18,7 +19,8 @@ RUN apt-get update && \ libreoffice-impress \ python3-uno \ curl \ - unoconv + unoconv && \ + rm -rf /var/lib/apt/lists/* # OCR MY PDF (unpaper for descew and other advanced featues) @@ -30,6 +32,7 @@ apt-get update && \ python3-pip \ ocrmypdf \ unpaper && \ + rm -rf /var/lib/apt/lists/* && \ pip install --upgrade pip && \ pip install --no-cache-dir --upgrade ocrmypdf && \ pip install --no-cache-dir --upgrade pillow==10.0.1 reportlab==3.6.13 wheel==0.38.1 setuptools==65.5.1 pyjwt==2.4.0 cryptography==39.0.1 @@ -40,8 +43,7 @@ RUN pip install --no-cache-dir opencv-python-headless WeasyPrint # cleanup and etc -RUN rm -rf /var/lib/apt/lists/* && \ - mkdir /usr/share/tesseract-ocr-original && \ +RUN mkdir /usr/share/tesseract-ocr-original && \ cp -r /usr/share/tesseract-ocr/* /usr/share/tesseract-ocr-original && \ rm -rf /usr/share/tesseract-ocr From 846ebe6dda3b5b907231f214ce96e74d300e6dd2 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Thu, 4 Jan 2024 20:30:55 +0800 Subject: [PATCH 2/9] Refine Tesseract-OCR file backup process in DockerfileBase --- DockerfileBase | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/DockerfileBase b/DockerfileBase index 4e41d3e8..ffc8a89e 100644 --- a/DockerfileBase +++ b/DockerfileBase @@ -33,6 +33,7 @@ apt-get update && \ ocrmypdf \ unpaper && \ rm -rf /var/lib/apt/lists/* && \ + mv /usr/share/tesseract-ocr /usr/share/tesseract-ocr-original && \ pip install --upgrade pip && \ pip install --no-cache-dir --upgrade ocrmypdf && \ pip install --no-cache-dir --upgrade pillow==10.0.1 reportlab==3.6.13 wheel==0.38.1 setuptools==65.5.1 pyjwt==2.4.0 cryptography==39.0.1 @@ -40,13 +41,3 @@ apt-get update && \ #CV and HTML RUN pip install --no-cache-dir opencv-python-headless WeasyPrint - - -# cleanup and etc -RUN mkdir /usr/share/tesseract-ocr-original && \ - cp -r /usr/share/tesseract-ocr/* /usr/share/tesseract-ocr-original && \ - rm -rf /usr/share/tesseract-ocr - - - - \ No newline at end of file From ecb62e0c94bc6711ed6afdb71ccbdd575081988e Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Thu, 4 Jan 2024 20:56:24 +0800 Subject: [PATCH 3/9] Apply `--no-cache-dir` to pip upgrade in DockerfileBase Aligned pip upgrade command with others by adding the `--no-cache-dir` flag to reduce image layer size. --- DockerfileBase | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DockerfileBase b/DockerfileBase index ffc8a89e..b37050c7 100644 --- a/DockerfileBase +++ b/DockerfileBase @@ -34,7 +34,7 @@ apt-get update && \ unpaper && \ rm -rf /var/lib/apt/lists/* && \ mv /usr/share/tesseract-ocr /usr/share/tesseract-ocr-original && \ - pip install --upgrade pip && \ + pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir --upgrade ocrmypdf && \ pip install --no-cache-dir --upgrade pillow==10.0.1 reportlab==3.6.13 wheel==0.38.1 setuptools==65.5.1 pyjwt==2.4.0 cryptography==39.0.1 From c8458ffe50e67b1f53d005bf9e632984a22d858a Mon Sep 17 00:00:00 2001 From: albanobattistella <34811668+albanobattistella@users.noreply.github.com> Date: Fri, 5 Jan 2024 20:39:01 +0100 Subject: [PATCH 4/9] Update messages_it_IT.properties --- src/main/resources/messages_it_IT.properties | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/resources/messages_it_IT.properties b/src/main/resources/messages_it_IT.properties index bd881472..7ef311ba 100644 --- a/src/main/resources/messages_it_IT.properties +++ b/src/main/resources/messages_it_IT.properties @@ -43,7 +43,7 @@ green=Verde blue=Blu custom=Personalizzato WorkInProgess=Lavori in corso, potrebbe non funzionare o essere difettoso, segnalare eventuali problemi! -poweredBy=Powered by +poweredBy=Alimentato da changedCredsMessage=Credenziali cambiate! notAuthenticatedMessage=Utente non autenticato. @@ -547,11 +547,11 @@ scalePages.submit=Invia certSign.title=Firma del certificato certSign.header=Firma un PDF con il tuo certificato (Lavoro in corso) certSign.selectPDF=Seleziona un file PDF per la firma: -certSign.jksNote=Note: If your certificate type is not listed below, please convert it to a Java Keystore (.jks) file using the keytool command line tool. Then, choose the .jks file option below. +certSign.jksNote=Nota: se il tipo di certificato non รจ elencato di seguito, convertilo in un file Java Keystore (.jks) utilizzando lo strumento da riga di comando keytool. Quindi, scegli l'opzione del file .jks di seguito. certSign.selectKey=Seleziona il file della tua chiave privata (formato PKCS#8, potrebbe essere .pem o .der): certSign.selectCert=Seleziona il tuo file di certificato (formato X.509, potrebbe essere .pem o .der): certSign.selectP12=Selezionare il file keystore PKCS#12 (.p12 o .pfx) (facoltativo, se fornito, dovrebbe contenere la chiave privata e il certificato): -certSign.selectJKS=Select Your Java Keystore File (.jks or .keystore): +certSign.selectJKS=Seleziona il tuo file Java Keystore (.jks o .keystore): certSign.certType=Tipo di certificato certSign.password=Inserisci la tua password dell'archivio chiavi o della chiave privata (se presente): certSign.showSig=Mostra firma @@ -924,11 +924,11 @@ split-by-sections.submit=Dividi PDF #licenses -licenses.nav=Licenses -licenses.title=3rd Party Licenses -licenses.header=3rd Party Licenses -licenses.module=Module -licenses.version=Version -licenses.license=License +licenses.nav=Licenze +licenses.title=Licenze di terze parti +licenses.header=Licenze di terze parti +licenses.module=Modulo +licenses.version=Versione +licenses.license=Licenza From 863b48b5a984db318886fa502512491b45fdda4c Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sat, 6 Jan 2024 21:09:37 +0000 Subject: [PATCH 5/9] Delete CNAME --- CNAME | 1 - 1 file changed, 1 deletion(-) delete mode 100644 CNAME diff --git a/CNAME b/CNAME deleted file mode 100644 index 736e5893..00000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -stirlingtools.com \ No newline at end of file From 164d1abdbbb2103452b6f4f68194a020b8930ade Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sat, 6 Jan 2024 22:17:03 +0000 Subject: [PATCH 6/9] Delete PipelineUsage.md --- PipelineUsage.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 PipelineUsage.md diff --git a/PipelineUsage.md b/PipelineUsage.md deleted file mode 100644 index e69de29b..00000000 From d76752d7f6f855f97f83835749a450445f728019 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sat, 6 Jan 2024 22:53:07 +0000 Subject: [PATCH 7/9] Create PipelineFeature.md --- PipelineFeature.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 PipelineFeature.md diff --git a/PipelineFeature.md b/PipelineFeature.md new file mode 100644 index 00000000..001c3f22 --- /dev/null +++ b/PipelineFeature.md @@ -0,0 +1,33 @@ +# Pipeline Configuration and Usage Tutorial + +## Steps to Configure and Use Your Pipeline + +1. **Access Configuration** + - Upon entering the screen, click on the **Configure** button. + +2. **Enter Pipeline Name** + - Provide a name for your pipeline in the designated field. + +3. **Select Operations** + - Choose the operations for your pipeline (e.g., **Split Pages**), then click **Add Operation**. + +4. **Configure Operation Settings** + - Input the necessary settings for each added operation. Settings are highlighted in yellow if customization is needed. + +5. **Add More Operations** + - You can add and adjust the order of multiple operations. Ensure each operation's settings are customized. + +6. **Save Settings** + - Click **Save Operation Settings** after customizing settings for each operation. + +7. **Validate Pipeline** + - Use the **Validation** button to check your pipeline. A green indicator signifies correct setup; a pop-out error indicates issues. + +8. **Download Pipeline Configuration** + - To use the configuration for folder scanning (or save it for future use and reupload it), you can also download a JSON file in this menu. You can also pre-load this for future use by placing it in ``/pipeline/defaultWebUIConfigs/``. It will then appear in the dropdown menu for all users to use. + +9. **Submit Files for Processing** + - If your pipeline is correctly set up close the configure menu, input the files and hit **Submit**. + +10. **Note on Web UI Limitations** + - The current web UI version does not support operations that require multiple different types of inputs, such as adding a separate image to a PDF. From 624e0153152c2e1b080866af5c2147ea6a2a934b Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sat, 6 Jan 2024 22:56:56 +0000 Subject: [PATCH 8/9] Update PipelineFeature.md --- PipelineFeature.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/PipelineFeature.md b/PipelineFeature.md index 001c3f22..c2c935b4 100644 --- a/PipelineFeature.md +++ b/PipelineFeature.md @@ -1,5 +1,14 @@ # Pipeline Configuration and Usage Tutorial +## Whilst Pipelines are in alpha... +You must enable this alpha functionality by setting +``` +system: + enableAlphaFunctionality: true +``` +To true like in the above for your `/config/settings.yml` file, after restarting Stirling-PDF you should see both UI and folder scanning enabled. + + ## Steps to Configure and Use Your Pipeline 1. **Access Configuration** From 362a7ff434b404eb6220831baa6f04d361850b3c Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sat, 6 Jan 2024 23:06:58 +0000 Subject: [PATCH 9/9] Update releaseArtifacts.yml --- .github/workflows/releaseArtifacts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/releaseArtifacts.yml b/.github/workflows/releaseArtifacts.yml index 9514ec36..e1473cd9 100644 --- a/.github/workflows/releaseArtifacts.yml +++ b/.github/workflows/releaseArtifacts.yml @@ -4,7 +4,7 @@ on: release: types: [created] permissions: - contents: read + contents: write packages: write jobs: push: