You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a documentation author, I want a command-line utility that given a path to patch JSON would provide rendered SVG file.
Patch figures are massively used for end-user documentation. It’s a pain to have a long toolset to produce that images.
The better idea is to keep example mini-patches as JSONs along with documentation source files and get them rendered automatically on documentation build.
This would also guarantee that we’ll get 1:1 visual experience between IDE and HTML docs.
Produced SVG’s must be correctly rendered by supported browsers.
Acceptance criteria
I can xodc render /path/to/project/patch-to-render/patch.xodp and result SVG well be rendered to stdout
xodc render can understand paths of shorter form /path/to/project/patch-to-render/ and /path/to/project/patch-to-render as well
xodc render can take --output or -o argument to output to file rather than stdout
Dimensions of the output are determined by bounding box of patch contents
The resulting SVG alone is rendered correctly in Chrome and Firefox
How to implement
Implement an additional build step of xod-client that would produce a single CSS for patch rendering
Make a ReadOnlyPatch React container that is similar to existing Patch but doesn’t attach all interactive stuff
In the implementation of render subcommand use that container and invoke method to render it to an SVG string
Inline CSS required into the SVG string
Output the SVG string
The text was updated successfully, but these errors were encountered:
nkrkv
changed the title
CLI-renderer of patches to SVG
As a documentation writer, I want to run CLI-renderer to convert patch saved to an SVG image
Jun 21, 2016
As a documentation author, I want a command-line utility that given a path to patch JSON would provide rendered SVG file.
Patch figures are massively used for end-user documentation. It’s a pain to have a long toolset to produce that images.
The better idea is to keep example mini-patches as JSONs along with documentation source files and get them rendered automatically on documentation build.
This would also guarantee that we’ll get 1:1 visual experience between IDE and HTML docs.
Produced SVG’s must be correctly rendered by supported browsers.
Acceptance criteria
xodc render /path/to/project/patch-to-render/patch.xodp
and result SVG well be rendered to stdoutxodc render
can understand paths of shorter form/path/to/project/patch-to-render/
and/path/to/project/patch-to-render
as wellxodc render
can take--output
or-o
argument to output to file rather than stdoutHow to implement
xod-client
that would produce a single CSS for patch renderingReadOnlyPatch
React container that is similar to existingPatch
but doesn’t attach all interactive stuffrender
subcommand use that container and invoke method to render it to an SVG stringThe text was updated successfully, but these errors were encountered: