from net.sourceforge.plantuml import SourceStringReader
from java.io import ByteArrayOutputStream
from net.sourceforge.plantuml import FileFormatOption,FileFormat
from java.lang import String
from java.io import FileOutputStream
source = """
@startuml
scale 600*400
[AA] <>
[BB] <>
[CC] <>
node node1
node node2 <>
database Production
skinparam component {
backgroundColor<> DarkKhaki
backgroundColor<> Green
}
skinparam node {
borderColor Green
backgroundColor Yellow
backgroundColor<> Magenta
}
skinparam databaseBackgroundColor Aqua
@enduml
"""
s=SourceStringReader(source)
file =FileOutputStream("diagram.png")
s.generateImage(file);
print "diagram.png created"
file.close()
Ads help maintain this website.