Package: plantumlcli
plantumlcliAn easy-to-use plantuml cli for everyone.InstallInstall from official pypipipinstallplantumlcliInstall from source codegitclonehttps://github.com/HansBug/plantumlclicdplantumlcli&&pipinstall.Python 3.7+ is required, pypy is also tested to be okay.If you need to export the diagrams to PDF format, just install like thispipinstallplantumlcli[pdf]Using with cliBasic UsageShow version ofplantumlcliplantumlcli-vShow help information ofplantumlcliplantumlcli-hCheck the local plantuml environment and remote plantuml hostplantumlcli-c# check both environmentsplantumlcli-cL# check local environment onlyplantumlcli-cR# check remote environment onlyIn default, no local plantuml jar can be used, the remote host is set to the official
one (http://www.plantuml.com/plantuml). But don't worry, you can specify your plantuml jar file or remote host by
environment variables or command lines.plantumlcli-c# local not okay, remote okayPLANTUML_HOST=http://plantuml.example.complantumlcli-cR# remote okayplantumlcli-cR-rhttp://plantuml.example.com# remote okayPLANTUML_JAR=/my/path/plantuml.jarplantumlcli-cL# local okayplantumlcli-cL-p/my/path/plantuml.jar# local okayBuild image from plantuml source codeplantumlclisource.puml# the target image will be named as 'source.png'plantumlcli-oimage.pngsource.puml# the target image will be named as 'image.png'plantumlcli-tepssource.puml# eps format is supportedplantumlclisource1.pumlsource2.puml# 2 source codes, the images' names will be 'source1.png' and 'source2.png'plantumlcli-oimage1.png-oimage2.pngsource1.pumlsource2.puml# 2 source codes, image will be 'image1.png' and 'image2.png'PLANTUML_JAR=/my/path/plantuml.jarplantumlclisource.puml# use local plantuml jar to build pngPLANTUML_JAR=/my/path/plantuml.jarplantumlcli-Lsource.puml# force use local plantuml jar to build pngPLANTUML_HOST=http://plantuml.example.complantumlsource.puml# use your plantuml host to build pngPLANTUML_HOST=http://plantuml.example.complantuml-Rsource.puml# force use your plantuml host to build pngYou can also get the URL address of remote plantuml (in these cases, remote plantuml will be used regardless of-Land-Rcommands)plantumlcli-uhelloworld.puml# get png URL of helloworld.pumlplantumlcli-u-tepshelloworld.puml# get eps URL of helloworld.pumlplantumlcli--homepage-urlhelloworld.puml# get online editor's URL of helloworld.pumlplantumlcli-uhelloworld.pumlcommon.puml# get png URL of the 2 puml files (one line for one URL, in order)Using from pythonYou can also use plantumlcli in python source code byimport# environment variables# PLANTUML_JAR=/path/to/plantuml.jar# PLANTUML_HOST=https://plantuml.example.comfrompathlibimportPathfromplantumlcliimportLocalPlantuml,RemotePlantumlif__name__=="__main__":code=Path('source.puml').read_text()local=LocalPlantuml.autoload()print(local.dump_txt(code))# print text graph of codelocal.dump('/my/path/source_local.png','png',code)# save png to /my/path/source_local.pnglocal.dump('/my/path/source_local.eps','eps',code)# save eps to /my/path/source_local.epsremote=RemotePlantuml.autoload()print(remote.dump_txt(code))# print text graph of coderemote.dump('/my/path/source_remote.png','png',code)# save png to /my/path/source_remote.pngremote.dump('/my/path/source_remote.eps','eps',code)# save eps to /my/path/source_remote.epsprint(remote.get_url('png',code))# get png url from remote hostprint(remote.get_homepage_url(code))# get online editor's url from remote hostContributingThank you for considering contributing to plantumlcli!We appreciate all contributions to improve plantumlcli, both logic and system designs. Please refer to CONTRIBUTING.md
for more guides.And users can join
ourslack communication channel, or
contact the core developerHansBugfor more detailed discussion.LinksGithub:https://github.com/HansBug/plantumlcliDocumentation(just readme yet, will be written
soon):https://github.com/HansBug/plantumlcli/blob/main/README.mdIssue Tracker:https://github.com/HansBug/plantumlcli/issuesPypi:https://pypi.org/project/plantumlcli/Test pypi(pre-released versions can be found
here):https://test.pypi.org/project/plantumlcli/Change logVersion 0.0.3Released 2021-10-8Fix the problem when using official site.click version requirement changed to >= 7.0, will not conflict with other packages any more.Version 0.0.2Released 2020-11-30Fix a bug on windows platform,
issue:https://github.com/HansBug/plantumlcli/issues/1Version 0.0.1Released 2020-11-29The first officialplantumlcliversion, cheers!!! :beers: