Skip to content
Connect an agent
Command reference

plotwork export

Print paste-ready text of the first diagram for Confluence or Notion. It is a command of the Plotwork command line, the npm package @buun_group/plotwork.

TL;DR

QuestionAnswer
What does it do?Print paste-ready text of the first diagram for Confluence or Notion.
How do I run it?npx -y @buun_group/plotwork@0.1.0-beta.13 export, or plotwork export once the package is installed.
What does it write?The SVG beside the output when there is no --image; the text with --out.
Does it use the network?No. It reads and writes files on this machine only.
Does it read the repository settings?No.
How do I read this in a terminal?plotwork export --help

Synopsis

sh
plotwork export <file> --format confluence|confluence-wiki|notion [--image <https link>] [--out <file>] [--theme light|dark] [--no-source]

What it does

Writes the first diagram of a file as text to paste into a wiki page. With --image the text shows the picture at that address, such as a hosted link; without it the SVG is written beside the output for you to upload, and the text names that file.

The text goes to standard output or --out, and the steps around the paste go to standard error.

Options

OptionDefaultWhat it does
--format confluence|confluence-wiki|notionRequiredThe wiki to write for.
--image <https link>the SVG is written beside the outputAn https address the wiki can fetch the picture from.
--out <file>standard outputWrite the text to a file.
--theme light|darklightThe colours of the SVG written beside the output.
--no-sourcethe source is includedLeave the diagram source out of the text.

Examples

Text for a Notion page, with the SVG written beside it to upload.

sh
plotwork export checkout.diagram --format notion

Text for Confluence that shows a hosted picture.

sh
plotwork export flow.diagram --format confluence --image https://cdn.plotwork.dev/d/<token>.svg

Exit codes

CodeWhen
0The text was printed or written.
1The diagram has an error.
2A mistake in the command line: an unknown option, a missing operand, a file or glob that matches nothing, or a settings file that cannot be read. Also when --format is missing or --image is not an https address.

See also

DocWhy
Command referenceEvery command of the command line
Slack, email, Confluence, and NotionPasting a diagram into a wiki
Exit codes and output formatsWhat every code and format means