Expand environnement variable in constants

0 votes
asked Oct 24, 2016 in Wanted features by Serge Wenger Work (4,850 points)
Hello,
To automatically set some text (Title, caption, ...), it would be nice to have environnement variable in "constant" like with "include"
 
For example (under Windows)
@startuml
!define THE_DATE %date%
Title Generated THE_DATE
@enduml
 
Best Regards

1 Answer

+1 vote
answered Oct 25, 2016 by plantuml (131,770 points)
selected Oct 26, 2016 by Serge Wenger Work
 
Best answer

Good idea!

With last beta https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

You can have:

@startuml
!define THE_DATE %date%
!define ANOTHER_DATE %date[yyyy.MM.dd G 'at' HH:mm:ss z]%
Title Generated THE_DATE or ANOTHER_DATE
alice -> bob
@enduml

The format for date is defined here:

https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html

Thanks for the suggestion,

commented Oct 26, 2016 by Serge Wenger Work (4,850 points)
Thanks, it is working well
...