@@ -37,7 +37,7 @@ For most use cases you should add Scala2PlantUML as a global plugin since your b
3737Create ` ~/.sbt/1.0/plugins/scala2PlantUML.sbt ` containing:
3838
3939``` text
40- addSbtPlugin("nz.co.bottech" % "sbt-scala2plantuml" % "0.1.12 ")
40+ addSbtPlugin("nz.co.bottech" % "sbt-scala2plantuml" % "0.2.0 ")
4141```
4242
4343## CLI
@@ -52,20 +52,23 @@ cs install --channel https://git.io/Jqv1i scala2plantuml
5252
5353### Usage
5454
55+ ``` shell
56+ scala2plantuml --help
57+ ```
58+
5559``` text
56- > scala2plantuml --help
57- Scala2PlantUML version 0.1.12
60+ Scala2PlantUML version 0.2.0
5861Usage: scala2plantuml [options] symbol
5962
6063Scala2PlantUML generates PlantUML Class Diagrams from Scala SemanticDB files.
6164
6265 symbol The symbol to use as the starting point for generating the diagram.
63-
66+
6467 To get a symbol from a class name, convert the package name separate '.' to '/' and add a '#'
6568 suffix. For an object use a suffix of '.'.
66-
69+
6770 See https://scalameta.org/docs/semanticdb/specification.html#symbol-1 for the full syntax.
68-
71+
6972 Examples:
7073 'com/example/Foo#' (class com.example.Foo)
7174 'com/example/Foo.' (object com.example.Foo)
@@ -79,16 +82,16 @@ The pattern supports two wildcards:
79822) * (matches all characters except for '/')
8083
8184 -i, --include <pattern> Only include symbols that match the pattern.
82-
85+
8386 Default: '**'
84-
87+
8588 Example:
8689 --include 'com/example/**/model/*'
8790
8891 -e, --exclude <pattern> Excludes all symbols that match the pattern.
89-
92+
9093 Default: 'scala/**', 'java/**'
91-
94+
9295 Example:
9396 --exclude 'com/example/**/data/*'
9497
@@ -98,62 +101,190 @@ Each of these can be provided multiple times.
98101By default, the classpath that was used when executing Scala2PlantUML is also used.
99102
100103 -d, --dir <dir> Directories of the SemanticDB target roots containing META-INF/semanticdb/**/*.semanticdb files.
101-
104+
102105 Example:
103106 --dir 'my-project/target/scala-2.13/meta'
104107
105108 -j, --jar <jar> JAR containing META-INF/semanticdb/**/*.semanticdb files.
106-
109+
107110 Example:
108111 --jar 'foo.jar'
109112
110113 -u, --url <url> A URL to a JAR containing META-INF/semanticdb/**/*.semanticdb files.
111-
114+
112115 Example:
113116 --url 'https://repo1.maven.org/maven2/com/example/foo/foo_2.13/1.0.0/foo_2.13-1.0.0-semanticdb.jar'
114117
115118The --project and --source options specify where within the search locations the SemanticDB files can be found.
116119Each of these can be provided multiple times. The result will be all combinations of projects and source roots.
117120
118121 -p, --project <project> The name of the projects that have SemanticDB files.
119-
122+
120123 The project name will be used when looking for SemanticDB files such as:
121124 META-INF/semanticdb/<project>/<source>/*.semanticdb
122-
125+
123126 An empty project name will search in:
124127 META-INF/semanticdb/<source>/*.semanticdb
125-
128+
126129 Default: ''
127-
130+
128131 Example:
129132 --project my-project
130133
131134 -s, --source <source> The directory relative to the project where the source files were located.
132-
135+
133136 The source will be used when looking for SemanticDB files such as
134137 META-INF/semanticdb/<project>/<source>/*.semanticdb.
135-
138+
136139 Default: src/main/scala
137-
140+
138141 Example:
139142 --source 'source/scala'
140143
141- -o, --output <file> Write the output to the given file.
144+ -l, --max-level <level> The maximum number of levels that will be traversed when following symbol references.
145+
146+ This means that parent symbols that would be beyond the max level will not be shown.
147+
148+ A diagram with a max-level of 1 will only contain the initial symbol.
149+
150+ Default: Unlimited
151+
152+ Example:
153+ --max-level 3
142154
155+ -o, --output <file> Write the output to the given file.
156+
143157 Example:
144158 --output docs/diagrams/my-project.puml
145159
146160 -c, --colour <value> Enables coloured output.
147-
161+
148162 Default: true
149-
163+
150164 Example:
151165 --colour false
152166
153167 -v, --verbose Increases the log level.
154-
168+
155169 This can be provided twice for the most verbose logging.
170+
171+ Example:
172+ -vv
173+
174+ -h, --help
175+ --version
176+ Error: Missing argument symbol
177+ Scala2PlantUML version 0.2.0
178+ Usage: scala2plantuml [options] symbol
179+
180+ Scala2PlantUML generates PlantUML Class Diagrams from Scala SemanticDB files.
181+
182+ symbol The symbol to use as the starting point for generating the diagram.
183+
184+ To get a symbol from a class name, convert the package name separate '.' to '/' and add a '#'
185+ suffix. For an object use a suffix of '.'.
186+
187+ See https://scalameta.org/docs/semanticdb/specification.html#symbol-1 for the full syntax.
188+
189+ Examples:
190+ 'com/example/Foo#' (class com.example.Foo)
191+ 'com/example/Foo.' (object com.example.Foo)
192+ 'com/example/Foo.bar.' (value/variable bar on object com.example.Foo)
193+ 'com/example/Foo#baz().' (function baz on class com.example.Foo)
194+
195+ The --include and --exclude options control which symbols will be processed. Each of these can be provided multiple times.
196+
197+ The pattern supports two wildcards:
198+ 1) ** (matches any character)
199+ 2) * (matches all characters except for '/')
200+
201+ -i, --include <pattern> Only include symbols that match the pattern.
202+
203+ Default: '**'
204+
205+ Example:
206+ --include 'com/example/**/model/*'
156207
208+ -e, --exclude <pattern> Excludes all symbols that match the pattern.
209+
210+ Default: 'scala/**', 'java/**'
211+
212+ Example:
213+ --exclude 'com/example/**/data/*'
214+
215+ The --dir, --jar, and --url options specify the directories and JAR files that are used when locating SemanticDB files.
216+ Each of these can be provided multiple times.
217+
218+ By default, the classpath that was used when executing Scala2PlantUML is also used.
219+
220+ -d, --dir <dir> Directories of the SemanticDB target roots containing META-INF/semanticdb/**/*.semanticdb files.
221+
222+ Example:
223+ --dir 'my-project/target/scala-2.13/meta'
224+
225+ -j, --jar <jar> JAR containing META-INF/semanticdb/**/*.semanticdb files.
226+
227+ Example:
228+ --jar 'foo.jar'
229+
230+ -u, --url <url> A URL to a JAR containing META-INF/semanticdb/**/*.semanticdb files.
231+
232+ Example:
233+ --url 'https://repo1.maven.org/maven2/com/example/foo/foo_2.13/1.0.0/foo_2.13-1.0.0-semanticdb.jar'
234+
235+ The --project and --source options specify where within the search locations the SemanticDB files can be found.
236+ Each of these can be provided multiple times. The result will be all combinations of projects and source roots.
237+
238+ -p, --project <project> The name of the projects that have SemanticDB files.
239+
240+ The project name will be used when looking for SemanticDB files such as:
241+ META-INF/semanticdb/<project>/<source>/*.semanticdb
242+
243+ An empty project name will search in:
244+ META-INF/semanticdb/<source>/*.semanticdb
245+
246+ Default: ''
247+
248+ Example:
249+ --project my-project
250+
251+ -s, --source <source> The directory relative to the project where the source files were located.
252+
253+ The source will be used when looking for SemanticDB files such as
254+ META-INF/semanticdb/<project>/<source>/*.semanticdb.
255+
256+ Default: src/main/scala
257+
258+ Example:
259+ --source 'source/scala'
260+
261+ -l, --max-level <level> The maximum number of levels that will be traversed when following symbol references.
262+
263+ This means that parent symbols that would be beyond the max level will not be shown.
264+
265+ A diagram with a max-level of 1 will only contain the initial symbol.
266+
267+ Default: Unlimited
268+
269+ Example:
270+ --max-level 3
271+
272+ -o, --output <file> Write the output to the given file.
273+
274+ Example:
275+ --output docs/diagrams/my-project.puml
276+
277+ -c, --colour <value> Enables coloured output.
278+
279+ Default: true
280+
281+ Example:
282+ --colour false
283+
284+ -v, --verbose Increases the log level.
285+
286+ This can be provided twice for the most verbose logging.
287+
157288 Example:
158289 -vv
159290
0 commit comments