Crates.io | sdml |
lib.rs | sdml |
version | 0.1.2 |
source | src |
created_at | 2023-06-09 04:07:39.587934 |
updated_at | 2023-06-09 04:07:39.587934 |
description | Rust CLI for Simple Domain Modeling Language (SDML) |
homepage | |
repository | https://github.com/johnstonskj/rust-sdml.git |
max_upload_size | |
id | 885983 |
size | 445,530 |
Rust CLI for Simple Domain Modeling Language (SDML).
This is a command-line tool that provides functionality to process SDML files.
For most commands the tool accepts a pair of arguments that determine the format and location of the generated output.
These commands --output-format
/-f
and --output-file
/-o
can be used in the following manner.
--output-format svg --output-file rentals.svg
-output-file rentals.svg
In the second example above the format is not specified and so the tool will use the extension of the output file as the format specifier. If the output file is not specified the output is written to stdout. If neither argument is provided the output is written to stdout in the default format.
Similarly most tools use the module resolution rules for loading a module and so the input file is actually specified
as a module name. To allow for searches in non-standard locations the argument --base-path
/-b
can be used to
prepend a path to the standard search path. Thus the two examples below are identical as the current directory is always
a component of the search path.
--base-path . rentals
rentals
Conversion to an Emacs org-Mode file provides a documentation format with the most complete options.
sdml convert --output-format org-mode rentals
This command converts the SDML surface syntax into it's underlying RDF representation.
sdml convert --output-format org-mode rentals
This command convert the SDML surface syntax into an expanded version of the s-expressions used in tree-sitter queries.
sdml convert --output-format org-mode rentals
For the console this uses ANSI escape sequences to format the text.
sdml highlight --output-format ansi rentals
To generate formatted and highlighted HTML the tool accepts two different format specifiers, html
for simply a block
of HTML that can be inserted into another document, or html-standalone
to generate a full document around the
highlighted code block.
sdml highlight --output-format html rentals
sdml highlight --output-format html-standalone rentals
To draw a high-level Concepts diagram, use the diagram specifier concepts
.
sdml draw --diagram concepts \
--output-format svg --output-file rentals.svg \
--base-path . rentals
For more detail an Entity-Relationship diagram can be generated with the diagram specifier entity-relationship
.
sdml draw --diagram entity-relationship \
--output-format svg --output-file rentals.svg \
--base-path . rentals
For the mose detail a UML Class diagram can be generated with the diagram specifier uml-class
.
sdml draw --diagram uml-class \
--output-format svg --output-file rentals.svg \
--base-path . rentals
Formatting:
Linting:
Version: 0.1.2
Version: 0.1.1
Version: 0.1.0