Crates.io | modeling |
lib.rs | modeling |
version | 0.6.2 |
source | src |
created_at | 2021-05-02 06:28:46.879803 |
updated_at | 2022-03-15 08:13:26.992116 |
description | Modeling is a tools to analysis different languages by Ctags |
homepage | https://github.com/inherd/modeling |
repository | https://github.com/inherd/modeling |
max_upload_size | |
id | 392125 |
size | 339,959 |
Modeling is a tools to analysis different languages by Ctags
process:
ctags
ctags
with optctags
logs by regexvisualing
(optional)language support:
Modeling 0.6.1
USAGE:
modeling [FLAGS] [OPTIONS]
FLAGS:
-b, --by-modules multiple modules
-d, --debug output debug information
-f, --field-only only load field in methods
-h, --help Prints help information
--inline-id-suffix if class's prop end with Id and class in list, will replace `int` type to `xxClass`
-m, --merge merge for same method name
-V, --version Prints version information
--without-impl-suffix if class's prop start with `IRepository` will become `Repository`
--without-parent without class inheritance
OPTIONS:
-g, --grep <grep> by grep regex rules: for example: `.*Service` [default: ]
-i, --input <input> input dir [default: .]
-o, --output-type <output-type> support: puml, mermaid, graphviz with json [default: puml]
-p, --packages <packages>... filter by packages, like: `com.phodal.modeling`
-s, --suffixes <suffixes>... filter by suffixes, like: `java` for .java file
convert to image: plantuml modeling.puml modeling.svg -tsvg
modeling --input=/youpath/ --field-only --without-parent --grep ".*Service|.*Controller|.*Repository"
with --output-type=graphviz
modeling --input=/youpath --field-only -o graphviz --without-impl-suffix
cargo install modeling
modeling .
use modeling::{by_dir};
use modeling::render::PlantUmlRender;
let classes = by_dir("src/");
let puml = PlantUmlRender::render(&classes);
output sample:
@startuml
class Animal {
+ string name
+ string constructor()
+move()
}
class Horse extends Animal {
+move()
}
class Snake extends Animal {
+move()
}
@enduml
ctags analysis based on https://github.com/dalance/ptags with MIT, see in src
ctags parser rewrite from Golang's https://github.com/ruben2020/tags2uml with Apache License.
@ 2020~2021 This code is distributed under the MIT license. See LICENSE
in this directory.