comma_array, joi items are empty or bigger than one, this is not implemented
);
}
break;
- case "alternatives":
+ case "alternatives": // TODO: Better support this. It is currently used by ScaleContent (working) and SplitByPreset (incompatible, but with that operator it isn't even considered a field so we need a different schema for that)
return (
@@ -138,5 +138,6 @@ export function GenericField({ fieldName, joiDefinition }: GenericFieldProps) {
default:
console.log(joiDefinition);
return (
GenericField.tsx: "{fieldName}": requested type "{joiDefinition.type}" not found. Check console for further info.
)
+
}
}
\ No newline at end of file
diff --git a/shared-operations/public/locales/arrangePages/en.json b/shared-operations/public/locales/arrangePages/en.json
new file mode 100644
index 000000000..545158f40
--- /dev/null
+++ b/shared-operations/public/locales/arrangePages/en.json
@@ -0,0 +1,10 @@
+{
+ "friendlyName": "Arrange Pages",
+ "description": "Arrange Pages in a new order",
+ "values": {
+ "arrangementConfig": {
+ "friendlyName": "Arrangement Config",
+ "description": "How to order the pages. See documentation for more info on the possible values."
+ }
+ }
+}
\ No newline at end of file
diff --git a/shared-operations/public/locales/removeBlankPages/en.json b/shared-operations/public/locales/removeBlankPages/en.json
index 93c096a6c..0b24b239e 100644
--- a/shared-operations/public/locales/removeBlankPages/en.json
+++ b/shared-operations/public/locales/removeBlankPages/en.json
@@ -1,6 +1,6 @@
{
"friendlyName": "Remove Blank Pages",
- "description": "Remove pages without .",
+ "description": "Remove pages without text and images.",
"values": {
"whiteThreashold": {
"friendlyName": "Image White Threashold",
diff --git a/shared-operations/public/locales/removePages/en.json b/shared-operations/public/locales/removePages/en.json
new file mode 100644
index 000000000..241930b28
--- /dev/null
+++ b/shared-operations/public/locales/removePages/en.json
@@ -0,0 +1,10 @@
+{
+ "friendlyName": "Remove Pages",
+ "description": "Remove selected pages.",
+ "values": {
+ "pageIndexes": {
+ "friendlyName": "Page Indexes",
+ "description": "An array of indexes of pages you want to extract."
+ }
+ }
+}
\ No newline at end of file
diff --git a/shared-operations/public/locales/rotatePages/en.json b/shared-operations/public/locales/rotatePages/en.json
new file mode 100644
index 000000000..dd72826a8
--- /dev/null
+++ b/shared-operations/public/locales/rotatePages/en.json
@@ -0,0 +1,10 @@
+{
+ "friendlyName": "Rotate Pagess",
+ "description": "Rotate selected pages by multiples of 90deg.",
+ "values": {
+ "rotation": {
+ "friendlyName": "Rotation",
+ "description": "Multiples of 90. Can be an array with the same size as the pdf pages or a single number."
+ }
+ }
+}
\ No newline at end of file
diff --git a/shared-operations/public/locales/scaleContent/en.json b/shared-operations/public/locales/scaleContent/en.json
new file mode 100644
index 000000000..180bc2e97
--- /dev/null
+++ b/shared-operations/public/locales/scaleContent/en.json
@@ -0,0 +1,10 @@
+{
+ "friendlyName": "Scale Content",
+ "description": "Scales the content of a page by a set factor.",
+ "values": {
+ "scaleFactor": {
+ "friendlyName": "Scale Factor",
+ "description": "Can be an array with the same size as the pdf pages or a single number."
+ }
+ }
+}
\ No newline at end of file
diff --git a/shared-operations/public/locales/scalePage/en.json b/shared-operations/public/locales/scalePage/en.json
new file mode 100644
index 000000000..f8e4d3088
--- /dev/null
+++ b/shared-operations/public/locales/scalePage/en.json
@@ -0,0 +1,14 @@
+{
+ "friendlyName": "Scale Page",
+ "description": "Sets the size of all pdf pages of the given document in pixels.",
+ "values": {
+ "height": {
+ "friendlyName": "Height",
+ "description": "The height of the pdf document in pixels."
+ },
+ "width": {
+ "friendlyName": "Width",
+ "description": "The width of the pdf document in pixels."
+ }
+ }
+}
\ No newline at end of file
diff --git a/shared-operations/public/locales/splitPagesByPreset/en.json b/shared-operations/public/locales/splitPagesByPreset/en.json
new file mode 100644
index 000000000..f57aaf382
--- /dev/null
+++ b/shared-operations/public/locales/splitPagesByPreset/en.json
@@ -0,0 +1,10 @@
+{
+ "friendlyName": "Split Pages By Preset",
+ "description": "Splits the Document when a specific split indicator is detected on a page.",
+ "values": {
+ "pageIndexes": {
+ "friendlyName": "Split Settings",
+ "description": "The type of page that should be used as a split indecator. whiteThreashold is only used when BLANK_PAGE is selected."
+ }
+ }
+}
\ No newline at end of file
diff --git a/shared-operations/public/locales/splitPdfByIndex/en.json b/shared-operations/public/locales/splitPdfByIndex/en.json
new file mode 100644
index 000000000..537737aff
--- /dev/null
+++ b/shared-operations/public/locales/splitPdfByIndex/en.json
@@ -0,0 +1,10 @@
+{
+ "friendlyName": "Split PDF by Index",
+ "description": "Splits the document at specific pages.",
+ "values": {
+ "pageIndexes": {
+ "friendlyName": "Page Indexes",
+ "description": "An array of indexes of pages you want to split the document after."
+ }
+ }
+}
\ No newline at end of file
diff --git a/shared-operations/public/locales/updateMetadata/en.json b/shared-operations/public/locales/updateMetadata/en.json
new file mode 100644
index 000000000..0d36c0173
--- /dev/null
+++ b/shared-operations/public/locales/updateMetadata/en.json
@@ -0,0 +1,10 @@
+{
+ "friendlyName": "Update Metadata",
+ "description": "Updates the metadata of a PDF.",
+ "values": {
+ "deleteAll": {
+ "friendlyName": "Delete All",
+ "description": "Delete all metadata instead of overwriting it?"
+ }
+ }
+}
\ No newline at end of file
diff --git a/shared-operations/src/functions/splitPagesByPreset.ts b/shared-operations/src/functions/splitPagesByPreset.ts
index 0e7fd3343..e3a97dac9 100644
--- a/shared-operations/src/functions/splitPagesByPreset.ts
+++ b/shared-operations/src/functions/splitPagesByPreset.ts
@@ -1,17 +1,11 @@
import { Operator, Progress, oneToN } from ".";
-import Joi from "@stirling-tools/joi";
-import { JoiPDFFileSchema } from "../wrappers/PdfFileJoi";
-
-import i18next from "i18next";
-
import { PdfFile } from "../wrappers/PdfFile";
import { splitPagesByIndex } from "./common/splitPagesByIndex";
import { detectEmptyPages } from "./common/detectEmptyPages";
import { detectQRCodePages } from "./common/detectQRCodePages";
-
export class SplitPagesByPreset extends Operator {
/** Detect and remove white pages */
async run(input: PdfFile[], progressCallback: (state: Progress) => void): Promise {
diff --git a/shared-operations/src/functions/splitPdfByIndex.ts b/shared-operations/src/functions/splitPdfByIndex.ts
index 23d31c311..ae57b3f11 100644
--- a/shared-operations/src/functions/splitPdfByIndex.ts
+++ b/shared-operations/src/functions/splitPdfByIndex.ts
@@ -1,8 +1,6 @@
import { PdfFile } from "../wrappers/PdfFile";
import { Operator, Progress, oneToN } from ".";
-import Joi from "@stirling-tools/joi";
-
import { splitPagesByIndex } from "./common/splitPagesByIndex";
export class SplitPdfByIndex extends Operator {
diff --git a/shared-operations/src/functions/updateMetadata.ts b/shared-operations/src/functions/updateMetadata.ts
index a5400dec9..b5e8c702e 100644
--- a/shared-operations/src/functions/updateMetadata.ts
+++ b/shared-operations/src/functions/updateMetadata.ts
@@ -1,12 +1,6 @@
import { PdfFile } from "../wrappers/PdfFile";
import { Operator, Progress, oneToOne } from ".";
-import Joi from "@stirling-tools/joi";
-
-import { JoiPDFFileSchema } from "../wrappers/PdfFileJoi";
-
-import i18next from "i18next";
-
export class UpdateMetadata extends Operator {
/** PDF extraction, specify pages from one pdf and output them to a new pdf */
async run(input: PdfFile[], progressCallback: (state: Progress) => void): Promise {