Skip to content

Print one label for each line of a list - #394

Open
DL6ER wants to merge 3 commits into
masterfrom
feature/print-a-list
Open

DL6ER wants to merge 3 commits into
masterfrom
feature/print-a-list

Conversation

@DL6ER

@DL6ER DL6ER commented Dec 5, 2026

Copy link
Copy Markdown
Owner

Paste or type lines, e.g., plant names, and each prints as one label. "Basil x 20" prints that line 20 times. Cells pasted from a spreadsheet fill the label's blanks in order, and a label without blanks takes them as its lines.

It opens from the small arrow beside Print, so the main screen stays as it is. The API takes the lines as list.

Menu List Phone

DL6ER added 3 commits December 5, 2026 20:52
A list of lines, e.g., plant names, prints one label for each. In the label designer it opens from the arrow beside Print, and `/api/print`, `/api/preview` and the prints of saved and demo labels take it as `list`.

1. The cells of a line, split at tabs as pasted from a spreadsheet, fill the blanks of the label in order. A label without blanks takes them as its text lines. An empty cell leaves its blank as it is.
2. A trailing "x N" after a word prints the line N times, e.g., "Basil x 20". "M3 x 10" prints once, as written.
3. Every line is checked before anything prints, and the whole list counts against `PRINT_MAX_COUNT`.

Signed-off-by: DL6ER <dl6er@dl6er.de>
How to print a list in the label designer and through the API.

Signed-off-by: DL6ER <dl6er@dl6er.de>
Copilot AI balanced review requested due to automatic review settings December 5, 2026 21:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

"""The cells of a line without its count and the count, else 1. Only a
count in the last cell after a word without digits counts: "M3 x 10",
"Box 2 x 3" or a cell of "x 5" alone are names, printed once."""
counted = COUNT.fullmatch(cells[-1])

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants