Repository navigation
CLI
platemaker is a first-class consumer of the library, not a demo: everything the GUI can do, it can
do. That is a deliberate constraint on the library's design — an API that cannot be driven from a
terminal has state hiding in a UI somewhere.
Command grammar, exit codes and JSON output follow.
Standalone binary. All commands operate on a workspace JSON file.
platemaker [--help | -h | help]
platemaker --version
platemaker workspace create [--output FILE] [--target-width N] [--slice-height N]
# Canvas profiles (selected by name):
platemaker workspace add-canvas-profile --workspace FILE --name NAME --canvas WxH --margins T,R,B,L
platemaker workspace mod-canvas-profile --workspace FILE --name NAME [--canvas WxH] [--margins T,R,B,L]
platemaker workspace rm-canvas-profile --workspace FILE --name NAME
platemaker workspace list-canvas-profiles --workspace FILE
# Output profiles (selected by id — names may repeat, ids do not):
platemaker workspace list-presets --workspace FILE
platemaker workspace add-output-profile --workspace FILE --name NAME
{ --from-preset PRESET_ID | [--target-width N] [--slice-height N] [--format png|jpg|webp] }
platemaker workspace mod-output-profile --workspace FILE --output-profile ID [--name N] [--target-width N] [--slice-height N] [--format png|jpg|webp]
platemaker workspace rm-output-profile --workspace FILE --output-profile ID
platemaker workspace list-output-profiles --workspace FILE
platemaker workspace list-all-profiles --workspace FILE # alias: list-profiles — canvas + output
platemaker workspace list-projects --workspace FILE
platemaker workspace export --workspace FILE --out PACKAGE.platemaker.zip
platemaker project create --workspace FILE --name NAME [--input DIR] [--output DIR]
platemaker project mod --workspace FILE --name NAME [--new-name N] [--input DIR] [--output DIR]
[--add-canvas-profile NAME] [--rm-canvas-profile NAME] [--output-profile ID]
platemaker project rm --workspace FILE --name NAME
platemaker project status --workspace FILE --name NAME
platemaker process --workspace FILE
{ --input DIR | --project NAME }
[--output DIR] [--output-profile ID] [--format png|jpg|webp] [--start-index N]
[--target-width N] [--slice-height N]
[--no-profile] [--json]
platemaker template --workspace FILE --profile NAME --output FILE
[--margins-tpl-color R,G,B[,A]] [--background-tpl-color R,G,B[,A]]
workspace create — Creates an empty workspace. No output profiles are stored: the
"Webtoon Standard" preset (800 px target, 1280 px slice) is always available from the catalogue,
so it need not be written to the file. --target-width / --slice-height that differ from the
preset store a custom profile instead. No canvas profiles are created at this point. --output
is optional (default: ./project.platemaker.json).
workspace add-canvas-profile — Adds a CanvasProfile entry that describes one physical
canvas size + margins used by the artist. A workspace can hold multiple profiles (e.g.
one per canvas height variant). Files are matched to profiles at processing time by
their pixel width. Canvas profiles are selected by name.
workspace mod-canvas-profile / rm-canvas-profile — Modify or remove a named canvas profile.
Use list-canvas-profiles to discover profile names.
workspace output-profile family — add-/mod-/rm-/list-output-profiles and list-presets
manage the output profiles. Output profiles are selected by id (names may repeat, ids do not).
add-output-profile either copies a preset (--from-preset PRESET_ID) or builds one from scratch;
it prints the new id. Presets are read-only and never persisted — mod-/rm-output-profile on a
preset id is refused with a hint to duplicate it. list-output-profiles shows the user's own
profiles (yours) and the built-in presets (preset).
workspace list-all-profiles (alias list-profiles) — Prints the canvas-profile and
output-profile listings together in one view; list-canvas-profiles and list-output-profiles
each show only their own family.
workspace export — Writes a package (WorkspacePackager, see Workspace): the workspace and every
page, overlay and template it uses, in one zip that opens elsewhere as is, with a package.json
manifest. No outputs — rendering the package reproduces them byte for byte. A missing file is a warning
naming it, not an error. The CLI packs what the model names; fonts and the pictures behind lettered
pictures are the GUI's to add, so the manifest records "editable": false.
Canvas profile matching during process:
See §7.5 for the full algorithm. In summary: for each input image the library searches
the project's canvasProfileIds list first, then falls back to the workspace-wide
canvasProfiles palette. The library never silently selects a profile that is not
listed in the project — it always reports an actionable error with a suggested CLI
command. If canvasProfileIds is empty, all files are processed without margin
cropping (standard pipeline).
Exit codes: 0 success · 1 usage error · 2 IO error · 3 processing error
--json flag: machine-readable JSON summary to stdout (for web backend subprocess use).
--start-index N: output numbering starts at N (default 1), e.g. --start-index 5 → output_005.png, output_006.png …
Human-readable progress always goes to stderr.
The Qt GUI is developed in a separate repository. It consumes libplatemaker as a shared library via find_package(platemaker CONFIG REQUIRED). See that repository for GUI-specific documentation.
See also: Home · Workspace · Project · Render · Preview · Canvas-Profiles · Processing-Steps · Components · CLI · Platform · Roadmap · Diagrams