Parse dinit service files and generate a dependency graph in hiearch YAML format
Project description
Introduction
dinit_graph parses dinit (https://github.com/davmac314/dinit) service
files and generates a dependency graph in hiearch YAML format
(https://github.com/asherikov/hiearch). Service files are collected from a set
of input directories.
Installation
pipx install dinit-graph
Usage
There are two kinds of output:
- Service dependency graph.
- Dependency graph style which specifies visualization parameters.
Both files have to be passed to hiearch for diagram generation.
Command line interface
usage: dinit_graph [-h] [-d DIRECTORIES [DIRECTORIES ...]] [-s [SERVICES ...]] [-o OUTPUT] [-S STYLE]
Parse dinit service files and generate a dependency graph in hiearch YAML format.
options:
-h, --help show this help message and exit
-d DIRECTORIES [DIRECTORIES ...], --directories DIRECTORIES [DIRECTORIES ...]
Directories to traverse for dinit service files
-s [SERVICES ...], --services [SERVICES ...]
Optional list of service names to visualize (if not provided, all services are visualized)
-o OUTPUT, --output OUTPUT
Output file (default: stdout)
-S STYLE, --style STYLE
Output hiearch style to the given input file
Examples
- Generate style file:
dinit-graph -S graph_style.yaml
- Parse services in the given directory and print graph to standard output:
dinit-graph -d /path/to/service/directory
- Perform both operations simultaneously:
dinit-graph -S graph_style.yaml -d /path/to/service/directory
- Generate a complete example with sample services:
# Generate the style file
dinit-graph -S graph_style.yaml
# Generate the graph from sample services
dinit-graph -d /path/to/service/directory -o graph.yaml
# Generate the SVG using hiearch (assuming it's installed)
hiearch graph.yaml graph_style.yaml
Example output
Different colors and arrow styles represent different service types and their dependencies.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dinit_graph-0.1.0.tar.gz.
File metadata
- Download URL: dinit_graph-0.1.0.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ee3fd0b13ce18f346cab02de0454407dff02df489484a311fae70c25f923938
|
|
| MD5 |
11aedda9a43f8a56abb9a4ee09b08d90
|
|
| BLAKE2b-256 |
b74171d2ea3a578a594d1d3c9f28ebbcd503b99c23aba391240a4bc2dc6229f2
|
File details
Details for the file dinit_graph-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dinit_graph-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f382d31c619fb3cc13a36cde8120c5f88c7515b86e7af986d1620f61e21aaf5c
|
|
| MD5 |
fa63a93124b9a56f2a89ac452f62a620
|
|
| BLAKE2b-256 |
22a21339c25efd18cc315015fc98a0c2c339f1e3af7b59ddaa1939480a412e72
|