From 086a7ae640fdbbe17f0160d23531523fbea733f5 Mon Sep 17 00:00:00 2001 From: n07070 Date: Fri, 13 Nov 2026 19:46:16 +0100 Subject: [PATCH] Make max text length configurable --- configuration/config.toml | 6 +++++- configuration/config.toml.sample | 4 ++++ src/templates/api.html | 2 +- src/templates/base.html | 2 +- src/templates/footer.html | 5 ----- 5 files changed, 11 insertions(+), 8 deletions(-) delete mode 100644 src/templates/footer.html diff --git a/configuration/config.toml b/configuration/config.toml index 4b16436..7191042 100644 --- a/configuration/config.toml +++ b/configuration/config.toml @@ -3,6 +3,7 @@ [defaults] signature = "" + # Printer settings [printer] upload_folder = "src/static/uploads" @@ -14,11 +15,14 @@ waiting_time = 5 profile = "TM-T20III" label_type = 80 # 80 or 58 ( label width in mm ) align_text = "center" +text_max_length = 4096 +signature_max_length = 256 [printer.brother] # Configurations for Brother printers label_type = "62" # See https://github.com/pklaus/brother_ql#usage for label types - +text_max_length = 4096 +signature_max_length = 256 # Raspberry Pi Configuration [rpi] diff --git a/configuration/config.toml.sample b/configuration/config.toml.sample index 3d95bdc..7cfeb56 100644 --- a/configuration/config.toml.sample +++ b/configuration/config.toml.sample @@ -16,10 +16,14 @@ waiting_time = 5 profile = "TM-T20III" label_type = 80 # 80 or 58 ( label width in mm ) align_text = "center" +text_max_length = 4096 +signature_max_length = 256 [printer.brother] # Configurations for Brother printers label_type = 62 # See https://github.com/pklaus/brother_ql#usage for label types +text_max_length = 4096 +signature_max_length = 256 # Raspberry Pi Configuration [rpi] diff --git a/src/templates/api.html b/src/templates/api.html index b02aeb6..4d7241a 100644 --- a/src/templates/api.html +++ b/src/templates/api.html @@ -5,6 +5,6 @@ LittlePrynter API - "Welcome to the printing software's API. Please see the index page to get started. + Welcome to the printing software's API. Please see the index page to get started. diff --git a/src/templates/base.html b/src/templates/base.html index 2bf4de2..d441fab 100644 --- a/src/templates/base.html +++ b/src/templates/base.html @@ -53,7 +53,7 @@
diff --git a/src/templates/footer.html b/src/templates/footer.html deleted file mode 100644 index 6b3e682..0000000 --- a/src/templates/footer.html +++ /dev/null @@ -1,5 +0,0 @@ -
- - - -