Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flying-sheep/xdot-rs
https://github.com/flying-sheep/xdot-rs
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/flying-sheep/xdot-rs
- Owner: flying-sheep
- Created: 2023-02-02T03:18:48.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-22T06:43:50.000Z (2 months ago)
- Last Synced: 2024-10-23T09:40:02.977Z (2 months ago)
- Language: Rust
- Homepage: https://flying-sheep.github.io/xdot-rs/xdot/index.html
- Size: 144 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
[![CI](https://github.com/flying-sheep/xdot-rs/actions/workflows/rust.yml/badge.svg)](https://github.com/flying-sheep/xdot-rs/actions/workflows/rust.yml)
[![docs.rs](https://img.shields.io/docsrs/xdot)](https://docs.rs/xdot/latest/xdot/)
[![Crates.io](https://img.shields.io/crates/v/xdot)](https://crates.io/crates/xdot)
[![PyPI](https://img.shields.io/pypi/v/xdot-rs)](https://pypi.org/project/xdot-rs/)xdot
====The main function of this package is `parse`.
It parses node/edge attributes on graphviz graphs created by [`xdot`](https://graphviz.org/docs/attr-types/xdot/) into drawable shapes.```rust
use xdot::{parse, ShapeDraw};
let shapes: Vec = parse("c 7 -#ff0000 p 4 4 4 36 4 36 36 4 36");
```Each `ShapeDraw` struct contains a `shape` with geometry and a `pen` with drawing attributes (such as color, line style, and font).
If you have the `layout` feature active, you can also use `layout_and_draw_graph` (and `draw_graph`):```rust
use graphviz_rust::parse;
use graphviz_rust::dot_structures::Graph;
use xdot::{layout_and_draw_graph, ShapeDraw};let graph: Graph = parse("graph { a -- b}").unwrap();
let shapes: Vec = layout_and_draw_graph(graph).unwrap();
```Release process
---------------1. A commit to `main` causes creation or update of a release PR. ([`release` workflow](https://github.com/flying-sheep/xdot-rs/actions/workflows/release.yml))
2. Merging a release PR causes the creation of a Git tag and GitHub release, and the upload of a Rust crate to [crates.io](https://crates.io).(also `release` workflow)
3. Publishing this GitHub release in turn triggers building and uploading a Python package. ([`publish` workflow](https://github.com/flying-sheep/xdot-rs/actions/workflows/publish.yml))