| Crates.io | pumlformat |
| lib.rs | pumlformat |
| version | 0.1.0 |
| created_at | 2025-05-04 05:25:48.692463+00 |
| updated_at | 2025-05-04 05:25:48.692463+00 |
| description | A formatter for plantuml source code. |
| homepage | |
| repository | https://github.com/huleiak47/pumlformat |
| max_upload_size | |
| id | 1659382 |
| size | 19,148 |
A command-line tool for formatting PlantUML diagrams with consistent indentation and spacing.
cd pumlformat
cargo build --release
target/release/pumlformatBasic formatting:
pumlformatter input.puml -o formatted.puml
With custom indentation:
pumlformatter --indent 2 input.puml
Pipe from stdin/stdout:
cat input.puml | pumlformatter > formatted.puml
Formats PlantUML code with consistent indentation and spacing
Usage: pumlformat [OPTIONS] [INPUT]
Arguments:
[INPUT] Input file (default: stdin)
Options:
-o, --output <OUTPUT> Output file (default: stdout)
-i, --indent <INDENT> Number of spaces for indentation [default: 4]
-h, --help Print help
-V, --version Print version
Before:
@startuml
actor User
alt A
User -> Server : Login
else B
Server -> Database : Query
else C
Server -> Mailer : SendEmail
end
@enduml
After formatting:
@startuml
actor User
alt A
User -> Server : Login
else B
Server -> Database : Query
else C
Server -> Mailer : SendEmail
end
@enduml
MIT Licensed