Skip to content

CSV merge for text templates (one row per copy or per job) #528

Open

Description

@switch87

Is your feature request related to a problem? Please describe.
Name tags, product labels and personalised gifts come with a list: a spreadsheet of names, article numbers or prices. Today every line has to be typed into a text box by hand, one job at a time. LightBurn calls this Variable Text "Merge/CSV".

Describe the solution you'd like
Building on the serial counter and variable offsets from #527:

  • Link a CSV file to the project. The rows are stored in the project, so it stays self-contained; the file path is kept and can be reloaded when the spreadsheet changes. Delimiter and header row are detected, UTF-8 (with or without BOM) is expected.
  • Text box templates reference columns through a csv mapping: {csv["Name"]}, or by position {csv[0]}. {row} is the 1-based row number.
  • A current row with Previous / Next / First buttons and a preview of the row(s) the next job will use.
  • Per copy: a workpiece shows row current + variable offset, so a grid array lays out one copy per row on the bed (batch on one sheet). A "copies needed" hint shows how many copies cover the remaining rows.
  • Per job: with auto-advance on, the current row moves on by the number of copies after every finished job, so "one job per row" is just pressing Start again. When the last row has been used, the row stops there and a notification says so instead of wrapping.
  • Copies whose row lies past the end of the file render the empty string for every column.

Scope I'd leave out for now: editing CSV contents inside Rayforge, other encodings than UTF-8, and a "one job per row" loop that runs unattended.

Describe alternatives you've considered
A --script template function can read a CSV file, but it cannot tell which copy it is rendering and it has no notion of "the row after the last job".

Additional context
Depends on #527 (it reuses the variable offsets and the auto-advance hook). I'm working on this and will report back with a branch.

Activity

  1. knipknap commented on Oct 9, 2026

    @knipknap
    Contributor

    Thanks for thinking this through so carefully — storing the rows in the project so it stays self-contained, plus the "row stops at the end and notifies instead of wrapping" behavior, both sound right to me. Building it on the variable offsets and auto-advance hook from #527 makes sense, so I'd suggest landing that one first. The scope you've marked as out for now (in-app editing, other encodings, unattended loops) matches what I'd exclude from a first version too. Looking forward to the branch!

  2. added
    rca-doneA root cause analysis was attached
    and removed on Oct 9, 2026
  3. switch87 commented on Oct 12, 2026

    @switch87
    ContributorAuthor

    CSV merge is up as #555, stacked on #554 as you suggested; it is a draft for the same GitHub reason, but complete. Once #554 lands I'll rebase it so only the CSV commits remain.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    rca-doneA root cause analysis was attached

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions