Include file(s) or path via command line

+1 vote
asked Mar 12 in Wanted features by kyb (230 points)

On I have found:

    -DVAR1=value		To set a preprocessing variable as if '!define VAR1 value' were used
    -Sparam1=value		To set a skin parameter as if 'skinparam param1 value' were used

But nothing about !include. I would like to have yet another feature - include file like:

    -I=path/to/file.puml	To include file as if '!include file.puml' were used
    -I=path/to/folder/		The same but all files in folder
    -I=path/to/folder/*.skinparam  The same by pattern

I expect to use this feature to `!include style.skinparam`. And I would like to have ability to change a style without changing source files.

Thanks for attention.

1 Answer

0 votes
answered Mar 13 by plantuml (131,070 points)

Thank for your proposal.

There is a flag that sounds like what you are looking for:
java -jar plantuml.jar -config /path/to/file.puml

However, there could be right now only one single config file (but file.puml can itself contain several !include lines)

Since we find your syntax proposal more clear, so in future version, we might add:
java -jar plantuml.jar -I/path/to/file.puml -I/path/to/folder/*.skinparam

We'll post a message here when ready.

commented Mar 13 by plantuml (131,070 points)
A beta with -I option is available here
This has not been widely tested, so feedback welcome!