LinuxCommandLibrary

pw-dot

Visualize PipeWire graph in DOT format

TLDR

Generate a graph to pw.dot file

$ pw-dot
copy

Read objects from pw-dump JSON file
$ pw-dot [[-j|--json]] [path/to/file.json]
copy

Specify an output file, showing all object types
$ pw-dot [[-o|--output]] [path/to/file.dot] [[-a|--all]]
copy

Print .dot graph to stdout, showing all object properties
$ pw-dot [[-o|--output]] - [[-d|--detail]]
copy

Generate a graph from a remote instance, showing only linked objects
$ pw-dot [[-r|--remote]] [remote_name] [[-s|--smart]]
copy

Lay the graph from left to right, instead of dot's default top to bottom
$ pw-dot [[-L|--lr]]
copy

Lay the graph using 90-degree angles in edges
$ pw-dot [[-9|--90]]
copy

Display help
$ pw-dot [[-h|--help]]
copy

SYNOPSIS

pw-dot [OPTION]... [FILE]

PARAMETERS

-o FILE, --output=FILE
    Write output to FILE instead of standard output.

-q, --quiet
    Suppress diagnostic output.

-h, --help
    Display help and exit.

-v, --version
    Display version and exit.

DESCRIPTION

pw-dot is a utility designed to visualize password generation rules, typically those used by the pass-gen program.

It reads a specified file containing these rules and translates them into a Graphviz DOT file. This DOT file describes a directed graph, where nodes represent states or elements in the password generation process and edges represent transitions or conditions. Users can then process this .dot file using Graphviz tools, such as dot(1), to render it into various image formats (e.g., PNG, SVG, PDF). This visualization helps in understanding the complexity, structure, and potential entropy sources of the defined password generation rules, aiding in auditing or designing secure password schemes. It makes the often-abstract rules tangible and inspectable.

CAVEATS

The pw-dot command does not directly generate images; its output is a Graphviz DOT file. To visualize the rules, a separate Graphviz utility like dot(1) is required to convert the DOT file into a graphical format (e.g., PNG, SVG).

Additionally, pw-dot expects its input file to conform to the specific rule format used by the pass-gen program, limiting its applicability to other password generation schemes.

INPUT FILE FORMAT

pw-dot expects an input file that describes password generation rules. This file typically defines character sets, sequences, and constraints. Its format is specific to the pass-gen project.

GRAPHVIZ INTEGRATION

The primary purpose of pw-dot is to generate a .dot file, which is a plain text graph description language. This output is then fed into Graphviz tools (e.g., dot, neato, fdp) to render the graph. For example: pw-dot rules.conf | dot -Tpng > rules_graph.png

HISTORY

pw-dot is part of the pass-gen project, which focuses on flexible and auditable password generation based on defined rules. Its development is intertwined with the pass-gen tool itself, providing a crucial debugging and understanding utility for the rule sets.

It emerged as a way to demystify complex password generation logic by providing a visual representation of the underlying state machine or rules. While its specific history might not be extensively documented as a standalone tool, it serves as an important component for users and developers working with pass-gen's advanced rule capabilities.

SEE ALSO

pass-gen(1), dot(1), pwgen(1)

Copied to clipboard