{"id":13414167,"url":"https://github.com/modernizing/modeling","last_synced_at":"2025-04-15T01:53:41.244Z","repository":{"id":57639799,"uuid":"363582656","full_name":"modernizing/modeling","owner":"modernizing","description":" Modeling 是一个基于代码的领域模型生成工具，支持 Java、Cpp、TypeScript、Golang 等语言。Modeling is a tools to analysis different languages by Ctags","archived":false,"fork":false,"pushed_at":"2022-03-16T00:57:32.000Z","size":417,"stargazers_count":21,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-15T01:53:35.093Z","etag":null,"topics":["ctags","model-driven-development","modeling"],"latest_commit_sha":null,"homepage":"https://inherd.org/modeling/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/modernizing.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-02T06:27:41.000Z","updated_at":"2024-11-25T09:59:38.000Z","dependencies_parsed_at":"2022-09-04T13:01:51.793Z","dependency_job_id":null,"html_url":"https://github.com/modernizing/modeling","commit_stats":null,"previous_names":["inherd/modeling"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modernizing%2Fmodeling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modernizing%2Fmodeling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modernizing%2Fmodeling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modernizing%2Fmodeling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/modernizing","download_url":"https://codeload.github.com/modernizing/modeling/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248991540,"owners_count":21194894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ctags","model-driven-development","modeling"],"created_at":"2024-07-30T21:00:15.861Z","updated_at":"2025-04-15T01:53:41.227Z","avatar_url":"https://github.com/modernizing.png","language":"Rust","readme":"# Modeling\n\n[![crates.io](https://img.shields.io/crates/v/modeling.svg)](https://crates.io/crates/modeling)\n[![docs.rs](https://docs.rs/modeling/badge.svg)](https://docs.rs/modeling/)\n[![license](https://img.shields.io/crates/l/modeling)](https://github.com/inherd/modeling/blob/master/LICENSE)\n\n\u003e Modeling is a tools to analysis different languages by Ctags\n\nprocess:\n\n1. analysis `ctags`\n   - generate to opt\n   - call `ctags` with opt\n   - analysis `ctags` logs by regex\n2. generate results\n3. visual result with `visualing` (optional)\n\nlanguage support:\n\n - [x] Java\n - [x] C#\n - [x] Cpp\n - [x] TypeScript\n - [x] Golang\n - [x] Rust\n - ... others by ctags\n\n## Usage\n\n - modeling, generate model from source code.\n - concepting, generate concepts from source code.\n - visualing, visualization the uml.\n\n```bash\nModeling 0.6.2\n\nUSAGE:\n    modeling [FLAGS] [OPTIONS]\n\nFLAGS:\n    -b, --by-modules             multiple modules\n    -d, --debug                  output debug information\n    -f, --field-only             only load field in methods\n    -h, --help                   Prints help information\n        --inline-id-suffix       if class's prop end with Id and class in list, will replace `int` type to `xxClass`\n    -m, --merge                  merge for same method name\n    -V, --version                Prints version information\n        --without-impl-suffix    if class's prop start with `IRepository` will become `Repository`\n        --without-parent         without class inheritance\n\nOPTIONS:\n    -g, --grep \u003cgrep\u003e                  by grep regex rules: for example: `.*Service` [default: ]\n    -i, --input \u003cinput\u003e                input dir [default: .]\n    -o, --output-type \u003coutput-type\u003e    support: puml, mermaid, graphviz with json [default: puml]\n    -p, --packages \u003cpackages\u003e...       filter by packages, like: `com.phodal.modeling`\n    -s, --suffixes \u003csuffixes\u003e...       filter by suffixes, like: `java` for .java file\n    --without-suffix \u003cwithout-suffix\u003e  remove specify suffix by text, for example `DemoDto` with be `Demo` [default: ]\n```\n\n### sample: Grep with MVC\n\n```bash\nmodeling --input=/youpath/ --field-only --without-parent --grep \".*Service|.*Controller|.*Repository\"\n```\n\n### sample: with Graphviz and Visualization\n\nwith `--output-type=graphviz`\n\n```bash\nmodeling --input=/youpath  --field-only -o graphviz --without-impl-suffix\n```\n\n### sample: puml to Image\n\nconvert to image: `plantuml modeling.puml modeling.svg -tsvg`\n\n### with Visualization\n\nPS: need to set `--output-type graphviz`, in order to generate `output.json` file\n\n```bash\nmodeling -i youpath -o graphviz\nvisualing\n```\n\n## Library\n\n```\ncargo install modeling\nmodeling .\n```\n\n#### Library\n\n```rust\nuse modeling::{by_dir};\nuse modeling::render::PlantUmlRender;\n\nlet classes = by_dir(\"src/\");\nlet puml = PlantUmlRender::render(\u0026classes);\n```\n\noutput sample:\n\n```puml\n@startuml\n\nclass Animal {\n  + string name\n  + string constructor()\n  +move()\n}\n\nclass Horse extends Animal {\n  +move()\n}\n\nclass Snake extends Animal {\n  +move()\n}\n\n@enduml\n```\n\nLicense\n---\n\nctags analysis based on [https://github.com/dalance/ptags](https://github.com/dalance/ptags) with MIT, see in [src](plugins/coco_struct_analysis/src)\n\nctags parser rewrite from Golang's [https://github.com/ruben2020/tags2uml](https://github.com/ruben2020/tags2uml) with Apache License.\n\n@ 2020~2021 This code is distributed under the MIT license. See `LICENSE` in this directory.\n","funding_links":[],"categories":["Code"],"sub_categories":["Code to UML"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodernizing%2Fmodeling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodernizing%2Fmodeling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodernizing%2Fmodeling/lists"}