From f474651f3692670f960a471b4f0d501e97cb2597 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sun, 17 Mar 2024 09:33:05 +0000 Subject: [PATCH] lang, save to browser (#923) --- FolderScanning.md | 8 -- PipelineFeature.md | 20 ++--- src/main/resources/messages_ar_AR.properties | 3 +- src/main/resources/messages_bg_BG.properties | 3 +- src/main/resources/messages_ca_CA.properties | 3 +- src/main/resources/messages_de_DE.properties | 1 + src/main/resources/messages_el_GR.properties | 3 +- src/main/resources/messages_en_GB.properties | 3 +- src/main/resources/messages_en_US.properties | 3 +- src/main/resources/messages_es_ES.properties | 1 + src/main/resources/messages_eu_ES.properties | 3 +- src/main/resources/messages_fr_FR.properties | 1 + src/main/resources/messages_hi_IN.properties | 3 +- src/main/resources/messages_hu_HU.properties | 3 +- src/main/resources/messages_id_ID.properties | 3 +- src/main/resources/messages_it_IT.properties | 3 +- src/main/resources/messages_ja_JP.properties | 1 + src/main/resources/messages_ko_KR.properties | 3 +- src/main/resources/messages_nl_NL.properties | 1 + src/main/resources/messages_pl_PL.properties | 3 +- src/main/resources/messages_pt_BR.properties | 3 +- src/main/resources/messages_pt_PT.properties | 3 +- src/main/resources/messages_ro_RO.properties | 3 +- src/main/resources/messages_ru_RU.properties | 3 +- .../resources/messages_sr_LATN_RS.properties | 1 + src/main/resources/messages_sv_SE.properties | 3 +- src/main/resources/messages_tr_TR.properties | 3 +- src/main/resources/messages_zh_CN.properties | 3 +- src/main/resources/messages_zh_TW.properties | 3 +- src/main/resources/static/js/pipeline.js | 46 ++++++++++- src/main/resources/templates/pipeline.html | 77 +++---------------- 31 files changed, 113 insertions(+), 107 deletions(-) diff --git a/FolderScanning.md b/FolderScanning.md index 6b743a7f..140c9f5f 100644 --- a/FolderScanning.md +++ b/FolderScanning.md @@ -1,13 +1,5 @@ ## User Guide for Local Directory Scanning and File Processing -### Whilst Pipelines are in alpha... -You must enable this alpha functionality by setting -```yaml -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. - ### Setting Up Watched Folders: - Create a folder where you want your files to be monitored. This is your 'watched folder'. - The default directory for this is `./pipeline/watchedFolders/` diff --git a/PipelineFeature.md b/PipelineFeature.md index 8d51c3c5..7edbb089 100644 --- a/PipelineFeature.md +++ b/PipelineFeature.md @@ -1,13 +1,6 @@ # Pipeline Configuration and Usage Tutorial - -## Whilst Pipelines are in alpha... -You must enable this alpha functionality by setting -```yaml -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. - +- Configure the pipeline config file and input files to run files against it +- For reuse, download the config file and re-upload it when needed, or place it in /pipeline/defaultWebUIConfigs/ to auto-load in the web UI for all users ## Steps to Configure and Use Your Pipeline @@ -40,3 +33,12 @@ To true like in the above for your `/config/settings.yml` file, after restarting 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. + + +### Current Limitations +- Cannot have more than one of the same operation +- Cannot input additional files via UI +- All files and operations run in serial mode + + + \ No newline at end of file diff --git a/src/main/resources/messages_ar_AR.properties b/src/main/resources/messages_ar_AR.properties index 63a459a4..23c6f688 100644 --- a/src/main/resources/messages_ar_AR.properties +++ b/src/main/resources/messages_ar_AR.properties @@ -17,6 +17,7 @@ true=\u0635\u062D\u064A\u062D false=\u062E\u0637\u0623 unknown=\u063A\u064A\u0631 \u0645\u0639\u0631\u0648\u0641 save=\u062D\u0641\u0638 +saveToBrowser=Save to Browser close=\u0625\u063A\u0644\u0627\u0642 filesSelected=الملفات المحددة noFavourites=لم تتم إضافة أي مفضلات @@ -61,7 +62,7 @@ deleteUsernameExistsMessage=The username does not exist and cannot be deleted. ############### # Pipeline # ############### -pipeline.header=Pipeline Menu (Alpha) +pipeline.header=Pipeline Menu (Beta) pipeline.uploadButton=Upload Custom pipeline.configureButton=Configure pipeline.defaultOption=Custom diff --git a/src/main/resources/messages_bg_BG.properties b/src/main/resources/messages_bg_BG.properties index 4428a68b..4d3eb2ca 100644 --- a/src/main/resources/messages_bg_BG.properties +++ b/src/main/resources/messages_bg_BG.properties @@ -17,6 +17,7 @@ true=Вярно false=Невярно unknown=Непознат save=Съхранете +saveToBrowser=Save to Browser close=Затворете filesSelected=избрани файлове noFavourites=Няма добавени любими @@ -61,7 +62,7 @@ deleteUsernameExistsMessage=The username does not exist and cannot be deleted. ############### # Pipeline # ############### -pipeline.header=Pipeline Menu (Alpha) +pipeline.header=Pipeline Menu (Beta) pipeline.uploadButton=Upload Custom pipeline.configureButton=Configure pipeline.defaultOption=Custom diff --git a/src/main/resources/messages_ca_CA.properties b/src/main/resources/messages_ca_CA.properties index a97f6604..395cbd7e 100644 --- a/src/main/resources/messages_ca_CA.properties +++ b/src/main/resources/messages_ca_CA.properties @@ -17,6 +17,7 @@ true=Verdader false=Fals unknown=Desconegut save=Desa +saveToBrowser=Save to Browser close=Tanca filesSelected=fitxers seleccionats noFavourites=No s'ha afegit cap favorit @@ -61,7 +62,7 @@ deleteUsernameExistsMessage=The username does not exist and cannot be deleted. ############### # Pipeline # ############### -pipeline.header=Pipeline Menu (Alpha) +pipeline.header=Pipeline Menu (Beta) pipeline.uploadButton=Upload Custom pipeline.configureButton=Configure pipeline.defaultOption=Custom diff --git a/src/main/resources/messages_de_DE.properties b/src/main/resources/messages_de_DE.properties index 9af8a347..30c81ce3 100644 --- a/src/main/resources/messages_de_DE.properties +++ b/src/main/resources/messages_de_DE.properties @@ -17,6 +17,7 @@ true=Wahr false=Falsch unknown=Unbekannt save=Speichern +saveToBrowser=Save to Browser close=Schließen filesSelected=Dateien ausgewählt noFavourites=Keine Favoriten hinzugefügt diff --git a/src/main/resources/messages_el_GR.properties b/src/main/resources/messages_el_GR.properties index b3531514..6615a1d9 100644 --- a/src/main/resources/messages_el_GR.properties +++ b/src/main/resources/messages_el_GR.properties @@ -17,6 +17,7 @@ true=\u0391\u03BB\u03B7\u03B8\u03AD\u03C2 false=\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF unknown=\u0386\u03B3\u03BD\u03C9\u03C3\u03C4\u03BF save=\u0391\u03C0\u03BF\u03B8\u03AE\u03BA\u03B5\u03C5\u03C3\u03B7 +saveToBrowser=Save to Browser close=\u039A\u03BB\u03B5\u03AF\u03C3\u03B9\u03BC\u03BF filesSelected=\u03B1\u03C1\u03C7\u03B5\u03AF\u03B1 \u03C0\u03BF\u03C5 \u03B5\u03C0\u03B9\u03BB\u03AD\u03C7\u03B8\u03B7\u03BA\u03B1\u03BD noFavourites=\u039A\u03B1\u03BD\u03AD\u03BD\u03B1 \u03B1\u03B3\u03B1\u03C0\u03AE\u03BC\u03B5\u03BD\u03BF \u03B4\u03B5\u03BD \u03AD\u03C7\u03B5\u03B9 \u03C0\u03C1\u03BF\u03C3\u03C4\u03B5\u03B8\u03B5\u03AF @@ -61,7 +62,7 @@ deleteUsernameExistsMessage=The username does not exist and cannot be deleted. ############### # Pipeline # ############### -pipeline.header=Pipeline Menu (Alpha) +pipeline.header=Pipeline Menu (Beta) pipeline.uploadButton=Upload Custom pipeline.configureButton=Configure pipeline.defaultOption=Custom diff --git a/src/main/resources/messages_en_GB.properties b/src/main/resources/messages_en_GB.properties index 41c9f30a..110879e6 100644 --- a/src/main/resources/messages_en_GB.properties +++ b/src/main/resources/messages_en_GB.properties @@ -17,6 +17,7 @@ true=True false=False unknown=Unknown save=Save +saveToBrowser=Save to Browser close=Close filesSelected=files selected noFavourites=No favourites added @@ -61,7 +62,7 @@ deleteUsernameExistsMessage=The username does not exist and cannot be deleted. ############### # Pipeline # ############### -pipeline.header=Pipeline Menu (Alpha) +pipeline.header=Pipeline Menu (Beta) pipeline.uploadButton=Upload Custom pipeline.configureButton=Configure pipeline.defaultOption=Custom diff --git a/src/main/resources/messages_en_US.properties b/src/main/resources/messages_en_US.properties index 2d7524f5..2749a6f5 100644 --- a/src/main/resources/messages_en_US.properties +++ b/src/main/resources/messages_en_US.properties @@ -17,6 +17,7 @@ true=True false=False unknown=Unknown save=Save +saveToBrowser=Save to Browser close=Close filesSelected=files selected noFavourites=No favorites added @@ -61,7 +62,7 @@ deleteUsernameExistsMessage=The username does not exist and cannot be deleted. ############### # Pipeline # ############### -pipeline.header=Pipeline Menu (Alpha) +pipeline.header=Pipeline Menu (Beta) pipeline.uploadButton=Upload Custom pipeline.configureButton=Configure pipeline.defaultOption=Custom diff --git a/src/main/resources/messages_es_ES.properties b/src/main/resources/messages_es_ES.properties index adaab7de..8e93da1d 100644 --- a/src/main/resources/messages_es_ES.properties +++ b/src/main/resources/messages_es_ES.properties @@ -17,6 +17,7 @@ true=Verdadero false=Falso unknown=Desconocido save=Guardar +saveToBrowser=Save to Browser close=Cerrar filesSelected=archivos seleccionados noFavourites=No se agregaron favoritos diff --git a/src/main/resources/messages_eu_ES.properties b/src/main/resources/messages_eu_ES.properties index e24e3a7d..58d1c83d 100644 --- a/src/main/resources/messages_eu_ES.properties +++ b/src/main/resources/messages_eu_ES.properties @@ -17,6 +17,7 @@ true=Egiazkoa false=Faltsua unknown=Ezezaguna save=Gorde +saveToBrowser=Save to Browser close=Itxi filesSelected=Hautatutako fitxategiak noFavourites=Ez dira gogokoak gehitu @@ -61,7 +62,7 @@ deleteUsernameExistsMessage=The username does not exist and cannot be deleted. ############### # Pipeline # ############### -pipeline.header=Pipeline Menu (Alpha) +pipeline.header=Pipeline Menu (Beta) pipeline.uploadButton=Upload Custom pipeline.configureButton=Configure pipeline.defaultOption=Custom diff --git a/src/main/resources/messages_fr_FR.properties b/src/main/resources/messages_fr_FR.properties index 809612d1..39fdabbb 100644 --- a/src/main/resources/messages_fr_FR.properties +++ b/src/main/resources/messages_fr_FR.properties @@ -17,6 +17,7 @@ true=Vrai false=Faux unknown=Inconnu save=Enregistrer +saveToBrowser=Save to Browser close=Fermer filesSelected=fichiers sélectionnés noFavourites=Aucun favori ajouté diff --git a/src/main/resources/messages_hi_IN.properties b/src/main/resources/messages_hi_IN.properties index ab08aa3c..2ac56339 100644 --- a/src/main/resources/messages_hi_IN.properties +++ b/src/main/resources/messages_hi_IN.properties @@ -17,6 +17,7 @@ true=सही false=गलत unknown=अज्ञात save=सहेजें +saveToBrowser=Save to Browser close=बंद करें filesSelected=फ़ाइलें चयनित हैं noFavourites=कोई पसंदीदा जोड़ा नहीं गया है @@ -61,7 +62,7 @@ deleteUsernameExistsMessage=The username does not exist and cannot be deleted. ############### # Pipeline # ############### -pipeline.header=Pipeline Menu (Alpha) +pipeline.header=Pipeline Menu (Beta) pipeline.uploadButton=Upload Custom pipeline.configureButton=Configure pipeline.defaultOption=Custom diff --git a/src/main/resources/messages_hu_HU.properties b/src/main/resources/messages_hu_HU.properties index c6ef560a..b7fdcb25 100644 --- a/src/main/resources/messages_hu_HU.properties +++ b/src/main/resources/messages_hu_HU.properties @@ -17,6 +17,7 @@ true=Igaz false=Hamis unknown=Ismeretlen save=Mentés +saveToBrowser=Save to Browser close=Bezárás filesSelected=kiválasztott fájlok noFavourites=Nincs hozzáadva kedvenc @@ -61,7 +62,7 @@ deleteUsernameExistsMessage=The username does not exist and cannot be deleted. ############### # Pipeline # ############### -pipeline.header=Pipeline Menu (Alpha) +pipeline.header=Pipeline Menu (Beta) pipeline.uploadButton=Upload Custom pipeline.configureButton=Configure pipeline.defaultOption=Custom diff --git a/src/main/resources/messages_id_ID.properties b/src/main/resources/messages_id_ID.properties index 96e77082..f16bcc78 100644 --- a/src/main/resources/messages_id_ID.properties +++ b/src/main/resources/messages_id_ID.properties @@ -17,6 +17,7 @@ true=Benar false=Salah unknown=Tidak diketahui save=Simpan +saveToBrowser=Save to Browser close=Tutup filesSelected=berkas dipilih noFavourites=Tidak ada favorit yang ditambahkan @@ -61,7 +62,7 @@ deleteUsernameExistsMessage=The username does not exist and cannot be deleted. ############### # Pipeline # ############### -pipeline.header=Pipeline Menu (Alpha) +pipeline.header=Pipeline Menu (Beta) pipeline.uploadButton=Upload Custom pipeline.configureButton=Configure pipeline.defaultOption=Custom diff --git a/src/main/resources/messages_it_IT.properties b/src/main/resources/messages_it_IT.properties index 524c98cd..00c426be 100644 --- a/src/main/resources/messages_it_IT.properties +++ b/src/main/resources/messages_it_IT.properties @@ -17,6 +17,7 @@ true=Vero false=Falso unknown=Sconosciuto save=Salva +saveToBrowser=Save to Browser close=Chiudi filesSelected=file selezionati noFavourites=Nessun preferito @@ -61,7 +62,7 @@ deleteUsernameExistsMessage=Il nome utente non esiste e non può essere eliminat ############### # Pipeline # ############### -pipeline.header=Pipeline Menu (Alpha) +pipeline.header=Pipeline Menu (Beta) pipeline.uploadButton=Caricamento personalizzato pipeline.configureButton=Configura pipeline.defaultOption=Personalizzato diff --git a/src/main/resources/messages_ja_JP.properties b/src/main/resources/messages_ja_JP.properties index 956f9562..e2ffdb83 100644 --- a/src/main/resources/messages_ja_JP.properties +++ b/src/main/resources/messages_ja_JP.properties @@ -17,6 +17,7 @@ true=True false=False unknown=不明 save=保存 +saveToBrowser=Save to Browser close=閉じる filesSelected=選択されたファイル noFavourites=お気に入りはありません diff --git a/src/main/resources/messages_ko_KR.properties b/src/main/resources/messages_ko_KR.properties index aa10e3c4..80df3af8 100644 --- a/src/main/resources/messages_ko_KR.properties +++ b/src/main/resources/messages_ko_KR.properties @@ -17,6 +17,7 @@ true=참 false=거짓 unknown=알 수 없음 save=저장 +saveToBrowser=Save to Browser close=닫기 filesSelected=개 파일 선택됨 noFavourites=즐겨찾기 없음 @@ -61,7 +62,7 @@ deleteUsernameExistsMessage=The username does not exist and cannot be deleted. ############### # Pipeline # ############### -pipeline.header=Pipeline Menu (Alpha) +pipeline.header=Pipeline Menu (Beta) pipeline.uploadButton=Upload Custom pipeline.configureButton=Configure pipeline.defaultOption=Custom diff --git a/src/main/resources/messages_nl_NL.properties b/src/main/resources/messages_nl_NL.properties index 887a6813..75db259b 100644 --- a/src/main/resources/messages_nl_NL.properties +++ b/src/main/resources/messages_nl_NL.properties @@ -17,6 +17,7 @@ true=Waar false=Onwaar unknown=Onbekend save=Opslaan +saveToBrowser=Save to Browser close=Sluiten filesSelected=Bestanden geselecteerd noFavourites=Geen favorieten toegevoegd diff --git a/src/main/resources/messages_pl_PL.properties b/src/main/resources/messages_pl_PL.properties index 5ffccb4d..54a41913 100644 --- a/src/main/resources/messages_pl_PL.properties +++ b/src/main/resources/messages_pl_PL.properties @@ -17,6 +17,7 @@ true=Tak false=Nie unknown=Nieznany save=Zapisz +saveToBrowser=Save to Browser close=Zamknij filesSelected=wybrane pliki noFavourites=Nie dodano ulubionych @@ -61,7 +62,7 @@ deleteUsernameExistsMessage=The username does not exist and cannot be deleted. ############### # Pipeline # ############### -pipeline.header=Pipeline Menu (Alpha) +pipeline.header=Pipeline Menu (Beta) pipeline.uploadButton=Upload Custom pipeline.configureButton=Configure pipeline.defaultOption=Custom diff --git a/src/main/resources/messages_pt_BR.properties b/src/main/resources/messages_pt_BR.properties index 83171291..4e4ebfb6 100644 --- a/src/main/resources/messages_pt_BR.properties +++ b/src/main/resources/messages_pt_BR.properties @@ -17,6 +17,7 @@ true=Verdadeiro false=Falso unknown=Desconhecido save=Salvar +saveToBrowser=Save to Browser close=Fechar filesSelected=arquivos selecionados noFavourites=Nenhum favorito adicionado @@ -61,7 +62,7 @@ deleteUsernameExistsMessage=The username does not exist and cannot be deleted. ############### # Pipeline # ############### -pipeline.header=Pipeline Menu (Alpha) +pipeline.header=Pipeline Menu (Beta) pipeline.uploadButton=Upload Custom pipeline.configureButton=Configure pipeline.defaultOption=Custom diff --git a/src/main/resources/messages_pt_PT.properties b/src/main/resources/messages_pt_PT.properties index 06d33860..3ed85b8a 100644 --- a/src/main/resources/messages_pt_PT.properties +++ b/src/main/resources/messages_pt_PT.properties @@ -17,6 +17,7 @@ true=Verdadeiro false=Falso unknown=Desconhecido save=Salvar +saveToBrowser=Save to Browser close=Fechar filesSelected=Ficheiros Selecionados noFavourites=Nenhum favorito adicionado @@ -61,7 +62,7 @@ deleteUsernameExistsMessage=The username does not exist and cannot be deleted. ############### # Pipeline # ############### -pipeline.header=Pipeline Menu (Alpha) +pipeline.header=Pipeline Menu (Beta) pipeline.uploadButton=Carregar personalizado pipeline.configureButton=Configurar pipeline.defaultOption=Personalizar diff --git a/src/main/resources/messages_ro_RO.properties b/src/main/resources/messages_ro_RO.properties index 66639555..36208aa4 100644 --- a/src/main/resources/messages_ro_RO.properties +++ b/src/main/resources/messages_ro_RO.properties @@ -17,6 +17,7 @@ true=Adevărat false=Fals unknown=Necunoscut save=Salvează +saveToBrowser=Save to Browser close=Închide filesSelected=fișiere selectate noFavourites=Niciun favorit adăugat @@ -61,7 +62,7 @@ deleteUsernameExistsMessage=The username does not exist and cannot be deleted. ############### # Pipeline # ############### -pipeline.header=Pipeline Menu (Alpha) +pipeline.header=Pipeline Menu (Beta) pipeline.uploadButton=Upload Custom pipeline.configureButton=Configure pipeline.defaultOption=Custom diff --git a/src/main/resources/messages_ru_RU.properties b/src/main/resources/messages_ru_RU.properties index 5826ceef..085ea27b 100644 --- a/src/main/resources/messages_ru_RU.properties +++ b/src/main/resources/messages_ru_RU.properties @@ -17,6 +17,7 @@ true=Истина false=Ложь unknown=Неизвестно save=Сохранить +saveToBrowser=Save to Browser close=Закрыть filesSelected=файлов выбрано noFavourites=Нет избранного @@ -61,7 +62,7 @@ deleteUsernameExistsMessage=The username does not exist and cannot be deleted. ############### # Pipeline # ############### -pipeline.header=Pipeline Menu (Alpha) +pipeline.header=Pipeline Menu (Beta) pipeline.uploadButton=Upload Custom pipeline.configureButton=Configure pipeline.defaultOption=Custom diff --git a/src/main/resources/messages_sr_LATN_RS.properties b/src/main/resources/messages_sr_LATN_RS.properties index 0b195bcb..2313910d 100644 --- a/src/main/resources/messages_sr_LATN_RS.properties +++ b/src/main/resources/messages_sr_LATN_RS.properties @@ -17,6 +17,7 @@ true=Tačno false=Netačno unknown=Nepoznato save=Sačuvaj +saveToBrowser=Save to Browser close=Zatvori filesSelected=odabrani fajlovi noFavourites=Nema dodatih favorita diff --git a/src/main/resources/messages_sv_SE.properties b/src/main/resources/messages_sv_SE.properties index 6adb3302..f9d6000c 100644 --- a/src/main/resources/messages_sv_SE.properties +++ b/src/main/resources/messages_sv_SE.properties @@ -17,6 +17,7 @@ true=True false=Falskt unknown=Okänt save=Spara +saveToBrowser=Save to Browser close=Stäng filesSelected=filer valda noFavourites=Inga favoriter har lagts till @@ -61,7 +62,7 @@ deleteUsernameExistsMessage=The username does not exist and cannot be deleted. ############### # Pipeline # ############### -pipeline.header=Pipeline Menu (Alpha) +pipeline.header=Pipeline Menu (Beta) pipeline.uploadButton=Upload Custom pipeline.configureButton=Configure pipeline.defaultOption=Custom diff --git a/src/main/resources/messages_tr_TR.properties b/src/main/resources/messages_tr_TR.properties index 0b50c054..fa26e617 100644 --- a/src/main/resources/messages_tr_TR.properties +++ b/src/main/resources/messages_tr_TR.properties @@ -17,6 +17,7 @@ true=Doğru false=Yanlış unknown=Bilinmeyen save=Kaydet +saveToBrowser=Save to Browser close=Kapat filesSelected=dosya seçildi noFavourites=Favori eklenmedi @@ -61,7 +62,7 @@ deleteUsernameExistsMessage=The username does not exist and cannot be deleted. ############### # Pipeline # ############### -pipeline.header=Pipeline Menu (Alpha) +pipeline.header=Pipeline Menu (Beta) pipeline.uploadButton=Upload Custom pipeline.configureButton=Configure pipeline.defaultOption=Custom diff --git a/src/main/resources/messages_zh_CN.properties b/src/main/resources/messages_zh_CN.properties index 80a0d028..9390ba7c 100644 --- a/src/main/resources/messages_zh_CN.properties +++ b/src/main/resources/messages_zh_CN.properties @@ -17,6 +17,7 @@ true=对 false=错 unknown=未知 save=保存 +saveToBrowser=Save to Browser close=关闭 filesSelected=选中的文件 noFavourites=没有添加收藏夹 @@ -61,7 +62,7 @@ deleteUsernameExistsMessage=The username does not exist and cannot be deleted. ############### # Pipeline # ############### -pipeline.header=Pipeline Menu (Alpha) +pipeline.header=Pipeline Menu (Beta) pipeline.uploadButton=Upload Custom pipeline.configureButton=Configure pipeline.defaultOption=Custom diff --git a/src/main/resources/messages_zh_TW.properties b/src/main/resources/messages_zh_TW.properties index cbf50e0e..721f46b5 100644 --- a/src/main/resources/messages_zh_TW.properties +++ b/src/main/resources/messages_zh_TW.properties @@ -17,6 +17,7 @@ true=是 false=否 unknown=未知 save=儲存 +saveToBrowser=Save to Browser close=關閉 filesSelected=已選擇的檔案 noFavourites=未新增收藏 @@ -61,7 +62,7 @@ deleteUsernameExistsMessage=The username does not exist and cannot be deleted. ############### # Pipeline # ############### -pipeline.header=Pipeline Menu (Alpha) +pipeline.header=Pipeline Menu (Beta) pipeline.uploadButton=Upload Custom pipeline.configureButton=Configure pipeline.defaultOption=Custom diff --git a/src/main/resources/static/js/pipeline.js b/src/main/resources/static/js/pipeline.js index fcfd3df5..9ed3e608 100644 --- a/src/main/resources/static/js/pipeline.js +++ b/src/main/resources/static/js/pipeline.js @@ -479,6 +479,31 @@ document.getElementById("addOperationBtn").addEventListener("click", function () hideOrShowPipelineHeader(); }); +function loadBrowserPipelinesIntoDropdown() { + let pipelineSelect = document.getElementById("pipelineSelect"); + + // Retrieve the current set of option values for comparison + let existingOptions = new Set(); + for (let option of pipelineSelect.options) { + existingOptions.add(option.value); + } + + // Iterate over all items in localStorage + for (let i = 0; i < localStorage.length; i++) { + let key = localStorage.key(i); + if (key.startsWith("#Pipeline-")) { + let pipelineData = localStorage.getItem(key); + // Check if the data is already in the dropdown + if (!existingOptions.has(pipelineData)) { + let pipelineName = key.replace("#Pipeline-", ""); // Extract pipeline name from the key + let option = new Option(pipelineName, pipelineData); // Use pipeline data as the option value + pipelineSelect.appendChild(option); + } + } + } +} +loadBrowserPipelinesIntoDropdown(); + function updateConfigInDropdown() { let pipelineSelect = document.getElementById("pipelineSelect"); let selectedOption = pipelineSelect.options[pipelineSelect.selectedIndex]; @@ -496,13 +521,13 @@ function updateConfigInDropdown() { } var saveBtn = document.getElementById("savePipelineBtn"); - +var saveBrowserBtn = document.getElementById("saveBrowserPipelineBtn"); // Remove any existing event listeners saveBtn.removeEventListener("click", savePipeline); - +saveBrowserBtn.removeEventListener("click", savePipelineToBrowser); // Add the event listener saveBtn.addEventListener("click", savePipeline); -console.log("saveBtn", saveBtn); +saveBrowserBtn.addEventListener("click", savePipelineToBrowser); function configToJson() { if (!validatePipeline()) { @@ -537,6 +562,21 @@ function configToJson() { return JSON.stringify(pipelineConfig, null, 2); } +function savePipelineToBrowser() { + let pipelineConfigJson = configToJson(); + if (!pipelineConfigJson) { + console.error("Failed to save pipeline: Invalid configuration"); + return; + } + + let pipelineName = document.getElementById("pipelineName").value; + if (!pipelineName) { + console.error("Failed to save pipeline: Pipeline name is required"); + return; + } + localStorage.setItem("#Pipeline-" +pipelineName, pipelineConfigJson); + console.log("Pipeline configuration saved to localStorage"); +} function savePipeline() { let pipelineConfigJson = configToJson(); if (!pipelineConfigJson) { diff --git a/src/main/resources/templates/pipeline.html b/src/main/resources/templates/pipeline.html index 5d8a1c6d..6dcab369 100644 --- a/src/main/resources/templates/pipeline.html +++ b/src/main/resources/templates/pipeline.html @@ -15,8 +15,13 @@

-

-

+ +
+

+ icon +
+ +
@@ -38,73 +43,12 @@
+ Pipeline Help +
+ Folder Scanning Help
-

Below info is Alpha only, will be removed and hence not translated

- -

Current Limitations

- - - -

How it Works Notes

- - -

How to use pre-load configs in web UI

- - -

Todo

- - - -

User Guide for Local Directory Scanning and File Processing

- -

Setting Up Watched Folders:

-

Create a folder where you want your files to be monitored. This is your 'watched folder'.

-

The default directory for this is ./pipeline/watchedFolders/

-

Place any directories you want to be scanned into this folder, this folder should contain multiple folders each for their own tasks and pipelines.

- -

Configuring Processing with JSON Files:

-

In each directory you want processed (e.g. ./pipeline/watchedFolders/officePrinter), include a JSON configuration file.

-

This JSON file should specify how you want the files in the directory to be handled (e.g., what operations to perform on them) which can be made, configured and downloaded from Stirling-PDF Pipeline interface.

- -

Automatic Scanning and Processing:

-

The system automatically checks the watched folder every minute for new directories and files to process.

-

When a directory with a valid JSON configuration file is found, it begins processing the files inside as per the configuration.

- -

Processing Steps:

-

Files in each directory are processed according to the instructions in the JSON file.

-

This might involve file conversions, data filtering, renaming files, etc. If the output of a step is a zip, this zip will be automatically unzipped as it passes to next process.

- -

Results and Output:

-

After processing, the results are saved in a specified output location. This could be a different folder or location as defined in the JSON file or the default location ./pipeline/finishedFolders/.

-

Each processed file is named and organized according to the rules set in the JSON configuration.

- -

Completion and Cleanup:

-

Once processing is complete, the original files in the watched folder's directory are removed.

-

You can find the processed files in the designated output location.

- -

Error Handling:

-

If there's an error during processing, the system will not delete the original files, allowing you to check and retry if necessary.

- -

User Interaction:

-

As a user, your main tasks are to set up the watched folders, place directories with files for processing, and create the corresponding JSON configuration files.

-

The system handles the rest, including scanning, processing, and outputting results.

-