mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-03-28 21:16:20 +01:00
circo, fdp, neato, osage, patchwork, sfdp, twopi: add page (#6284)
* dot: prepare to add all graphviz layout engines These changes are in preparation for adding commands: `neato`, `circo`, `twopi`, `pfd`, `spfd`, `osage` and `patchwork`, which use the same command syntax. This one is to argue over before posting the other seven that are generated from the same template. Changes: - use `gv` extension, not `dot`. Author uses `gv`. - link to command usage guide page - specify the type of layout in the description (varies) - use `input` and `image` not `file` or `out_file` - provide a list of available image formats - show how to use the engine as a filter - give the help command * dot: add link angle-brackets * Added a static list of layout engines as line 2 of description. * dot: Accept suggestion to highlight graph type with back-quotes. * Fix back-quotes around `png`. * circo, fdp, neato, osage, patchwork, sfdp, twopi : add pages See #6270, #2580. This pull-request contains the other seven graphviz layout commands in addition to `dot`, which is awaiting approval at #6270. These files are generated from the same template as `dot.md` there. The eight commands differ in the command name, description line and the content of the `echo` command in one example. (If any more changes are required, I will regenerate all the files together.) * gv layouts: space after flags. -o versus -O. 80 char 2nd line. * dot: remove back-quotes from stdin, stdout to match tldr usage. * graphviz layouts : use https not http. * graphviz layouts : use {{png}} {{svg}} and {{gif}} as requested.
This commit is contained in:
parent
fa84524c0b
commit
31fa8a04e6
8 changed files with 194 additions and 6 deletions
25
pages/common/circo.md
Normal file
25
pages/common/circo.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
# circo
|
||||
|
||||
> Render an image of a `circular` network graph from a `graphviz` file.
|
||||
> Layouts: `dot`, `neato`, `twopi`, `circo`, `fdp`, `sfdp`, `osage` & `patchwork`.
|
||||
> More information: <https://graphviz.org/doc/info/command.html>.
|
||||
|
||||
- Render a `png` image with a filename based on the input filename and output format (uppercase -O):
|
||||
|
||||
`circo -T {{png}} -O {{path/to/input.gv}}`
|
||||
|
||||
- Render a `svg` image with the specified output filename (lowercase -o):
|
||||
|
||||
`circo -T {{svg}} -o {{path/to/image.svg}} {{path/to/input.gv}}`
|
||||
|
||||
- Render the output in `ps`, `pdf`, `svg`, `fig`, `png`, `gif`, `jpg`, `json`, or `dot` format:
|
||||
|
||||
`circo -T {{format}} -O {{path/to/input.gv}}`
|
||||
|
||||
- Render a `gif` image using stdin and stdout:
|
||||
|
||||
`echo "{{digraph {this -> that} }}" | circo -T {{gif}} > {{path/to/image.gif}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`circo -?`
|
|
@ -1,12 +1,25 @@
|
|||
# dot
|
||||
|
||||
> A command-line tool to produce layered drawings of directed graphs.
|
||||
> More information: <https://www.graphviz.org/pdf/dotguide.pdf>.
|
||||
> Render an image of a `linear directed` network graph from a `graphviz` file.
|
||||
> Layouts: `dot`, `neato`, `twopi`, `circo`, `fdp`, `sfdp`, `osage` & `patchwork`.
|
||||
> More information: <https://graphviz.org/doc/info/command.html>.
|
||||
|
||||
- Render an image file and determine output filename based on input filename and selected format:
|
||||
- Render a `png` image with a filename based on the input filename and output format (uppercase -O):
|
||||
|
||||
`dot -Tpng -O {{path/to/file.dot}}`
|
||||
`dot -T {{png}} -O {{path/to/input.gv}}`
|
||||
|
||||
- Create an SVG from DOT file:
|
||||
- Render a `svg` image with the specified output filename (lowercase -o):
|
||||
|
||||
`dot -Tsvg -o {{path/to/out_file.svg}} {{path/to/file.dot}}`
|
||||
`dot -T {{svg}} -o {{path/to/image.svg}} {{path/to/input.gv}}`
|
||||
|
||||
- Render the output in `ps`, `pdf`, `svg`, `fig`, `png`, `gif`, `jpg`, `json`, or `dot` format:
|
||||
|
||||
`dot -T {{format}} -O {{path/to/input.gv}}`
|
||||
|
||||
- Render a `gif` image using stdin and stdout:
|
||||
|
||||
`echo "{{digraph {this -> that} }}" | dot -T {{gif}} > {{path/to/image.gif}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`dot -?`
|
||||
|
|
25
pages/common/fdp.md
Normal file
25
pages/common/fdp.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
# fdp
|
||||
|
||||
> Render an image of a `force-directed` network graph from a `graphviz` file.
|
||||
> Layouts: `dot`, `neato`, `twopi`, `circo`, `fdp`, `sfdp`, `osage` & `patchwork`.
|
||||
> More information: <https://graphviz.org/doc/info/command.html>.
|
||||
|
||||
- Render a `png` image with a filename based on the input filename and output format (uppercase -O):
|
||||
|
||||
`fdp -T {{png}} -O {{path/to/input.gv}}`
|
||||
|
||||
- Render a `svg` image with the specified output filename (lowercase -o):
|
||||
|
||||
`fdp -T {{svg}} -o {{path/to/image.svg}} {{path/to/input.gv}}`
|
||||
|
||||
- Render the output in `ps`, `pdf`, `svg`, `fig`, `png`, `gif`, `jpg`, `json`, or `dot` format:
|
||||
|
||||
`fdp -T {{format}} -O {{path/to/input.gv}}`
|
||||
|
||||
- Render a `gif` image using stdin and stdout:
|
||||
|
||||
`echo "{{digraph {this -> that} }}" | fdp -T {{gif}} > {{path/to/image.gif}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`fdp -?`
|
25
pages/common/neato.md
Normal file
25
pages/common/neato.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
# neato
|
||||
|
||||
> Render an image of a `linear undirected` network graph from a `graphviz` file.
|
||||
> Layouts: `dot`, `neato`, `twopi`, `circo`, `fdp`, `sfdp`, `osage` & `patchwork`.
|
||||
> More information: <https://graphviz.org/doc/info/command.html>.
|
||||
|
||||
- Render a `png` image with a filename based on the input filename and output format (uppercase -O):
|
||||
|
||||
`neato -T {{png}} -O {{path/to/input.gv}}`
|
||||
|
||||
- Render a `svg` image with the specified output filename (lowercase -o):
|
||||
|
||||
`neato -T {{svg}} -o {{path/to/image.svg}} {{path/to/input.gv}}`
|
||||
|
||||
- Render the output in `ps`, `pdf`, `svg`, `fig`, `png`, `gif`, `jpg`, `json`, or `dot` format:
|
||||
|
||||
`neato -T {{format}} -O {{path/to/input.gv}}`
|
||||
|
||||
- Render a `gif` image using stdin and stdout:
|
||||
|
||||
`echo "{{graph {this -- that} }}" | neato -T {{gif}} > {{path/to/image.gif}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`neato -?`
|
25
pages/common/osage.md
Normal file
25
pages/common/osage.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
# osage
|
||||
|
||||
> Render an image of a `clustered` network graph from a `graphviz` file.
|
||||
> Layouts: `dot`, `neato`, `twopi`, `circo`, `fdp`, `sfdp`, `osage` & `patchwork`.
|
||||
> More information: <https://graphviz.org/doc/info/command.html>.
|
||||
|
||||
- Render a `png` image with a filename based on the input filename and output format (uppercase -O):
|
||||
|
||||
`osage -T {{png}} -O {{path/to/input.gv}}`
|
||||
|
||||
- Render a `svg` image with the specified output filename (lowercase -o):
|
||||
|
||||
`osage -T {{svg}} -o {{path/to/image.svg}} {{path/to/input.gv}}`
|
||||
|
||||
- Render the output in `ps`, `pdf`, `svg`, `fig`, `png`, `gif`, `jpg`, `json`, or `dot` format:
|
||||
|
||||
`osage -T {{format}} -O {{path/to/input.gv}}`
|
||||
|
||||
- Render a `gif` image using stdin and stdout:
|
||||
|
||||
`echo "{{digraph {this -> that} }}" | osage -T {{gif}} > {{path/to/image.gif}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`osage -?`
|
25
pages/common/patchwork.md
Normal file
25
pages/common/patchwork.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
# patchwork
|
||||
|
||||
> Render an image of a `squareified treemap` network graph from a `graphviz` file.
|
||||
> Layouts: `dot`, `neato`, `twopi`, `circo`, `fdp`, `sfdp`, `osage` & `patchwork`.
|
||||
> More information: <https://graphviz.org/doc/info/command.html>.
|
||||
|
||||
- Render a `png` image with a filename based on the input filename and output format (uppercase -O):
|
||||
|
||||
`patchwork -T {{png}} -O {{path/to/input.gv}}`
|
||||
|
||||
- Render a `svg` image with the specified output filename (lowercase -o):
|
||||
|
||||
`patchwork -T {{svg}} -o {{path/to/image.svg}} {{path/to/input.gv}}`
|
||||
|
||||
- Render the output in `ps`, `pdf`, `svg`, `fig`, `png`, `gif`, `jpg`, `json`, or `dot` format:
|
||||
|
||||
`patchwork -T {{format}} -O {{path/to/input.gv}}`
|
||||
|
||||
- Render a `gif` image using stdin and stdout:
|
||||
|
||||
`echo "{{digraph {this -> that} }}" | patchwork -T {{gif}} > {{path/to/image.gif}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`patchwork -?`
|
25
pages/common/sfdp.md
Normal file
25
pages/common/sfdp.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
# sfdp
|
||||
|
||||
> Render an image of a `scaled force-directed` network graph from a `graphviz` file.
|
||||
> Layouts: `dot`, `neato`, `twopi`, `circo`, `fdp`, `sfdp`, `osage` & `patchwork`.
|
||||
> More information: <https://graphviz.org/doc/info/command.html>.
|
||||
|
||||
- Render a `png` image with a filename based on the input filename and output format (uppercase -O):
|
||||
|
||||
`sfdp -T {{png}} -O {{path/to/input.gv}}`
|
||||
|
||||
- Render a `svg` image with the specified output filename (lowercase -o):
|
||||
|
||||
`sfdp -T {{svg}} -o {{path/to/image.svg}} {{path/to/input.gv}}`
|
||||
|
||||
- Render the output in `ps`, `pdf`, `svg`, `fig`, `png`, `gif`, `jpg`, `json`, or `dot` format:
|
||||
|
||||
`sfdp -T {{format}} -O {{path/to/input.gv}}`
|
||||
|
||||
- Render a `gif` image using stdin and stdout:
|
||||
|
||||
`echo "{{digraph {this -> that} }}" | sfdp -T {{gif}} > {{path/to/image.gif}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`sfdp -?`
|
25
pages/common/twopi.md
Normal file
25
pages/common/twopi.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
# twopi
|
||||
|
||||
> Render an image of a `radial` network graph from a `graphviz` file.
|
||||
> Layouts: `dot`, `neato`, `twopi`, `circo`, `fdp`, `sfdp`, `osage` & `patchwork`.
|
||||
> More information: <https://graphviz.org/doc/info/command.html>.
|
||||
|
||||
- Render a `png` image with a filename based on the input filename and output format (uppercase -O):
|
||||
|
||||
`twopi -T {{png}} -O {{path/to/input.gv}}`
|
||||
|
||||
- Render a `svg` image with the specified output filename (lowercase -o):
|
||||
|
||||
`twopi -T {{svg}} -o {{path/to/image.svg}} {{path/to/input.gv}}`
|
||||
|
||||
- Render the output in `ps`, `pdf`, `svg`, `fig`, `png`, `gif`, `jpg`, `json`, or `dot` format:
|
||||
|
||||
`twopi -T {{format}} -O {{path/to/input.gv}}`
|
||||
|
||||
- Render a `gif` image using stdin and stdout:
|
||||
|
||||
`echo "{{digraph {this -> that} }}" | twopi -T {{gif}} > {{path/to/image.gif}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`twopi -?`
|
Loading…
Add table
Reference in a new issue