VScode (Code-OSS) 无法显示 plantUML - 找不到精灵库 awslib

VScode (Code-OSS) can't display plantUML - can't find sprite library awslib

提问人:azbarcea 提问时间:11/8/2023 最后编辑:azbarcea 更新时间:11/8/2023 访问量:24

问:

我在 Archlinux 中,我已经安装了 plantuml 和 VSCode。在 VSCode 中,我尝试使用以下 Markdown 代码:

@startuml
!include <awslib/AWSCommon>
!include <awslib/AWSSimplified.puml>
!include <awslib/Compute/all.puml>
!include <awslib/mobile/all.puml>
!include <awslib/general/all.puml>
!include <awslib/GroupIcons/all.puml>


 skinparam linetype polyline
' skinparam linetype ortho


package "AWS Cloud" {
EC2(Smadex, "Smadex Service", " ")
}


Users(Users, "Users", " ")
TraditionalServer(AdExchange, "Ad Exchange", " ")
Mobile(Mobile, "Publisher app or web", " ")


Users -down-> Mobile: 1. Visits
Mobile -right-> AdExchange: 2. Start auction
AdExchange -right-> Smadex: 3. Bid request / response
Smadex -left-> Mobile: 4. Show Ad
Users -right-> Smadex: 5. Impression / click / install / event {request id}
@enduml

但是,我收到以下错误:

!include <awslib/mobile/all.puml>
cannot include <awslib/mobile/all.puml>

我想是因为plantuml找不到plantuml精灵库。有什么建议吗?

我尽量避免导入直接 URL 链接并使用不同的语句作为https://raw.github...importimport AWSLib/...

我期待在 Markdown 预览中看到 plantuml 图。我希望能够下载文件并在 VSCode (OSS-Code) 中使用的路径 () 和 () 上导入 AWS 库,以便能够自动使用/能够导入 ..pumlplantumlclasspathplantuml.jar/usr/share/java/plantuml/plantuml.jarawslib

注意:这个问题不是针对一般的 linux,可以应用于一般的 linux,不仅适用于 sprite 库,但可以应用于任何 sprite 库。archlinuxawslibplantuml

linux markdown archlinux plantuml

评论


答:

1赞 Fuhrmanator 12/12/2023 #1

宏演变为没有 Pascal 大小写。一些宏移动了。以下是 plantuml.com 上的有效解决方案:

@startuml
!include <awslib/AWSCommon>
!include <aws/common>
!include <awslib/AWSSimplified.puml>
!include <awslib/Compute/all.puml>
!include <awslib/General/all.puml>
!include <awslib/GroupIcons/all.puml>


 skinparam linetype polyline
' skinparam linetype ortho


package "AWS Cloud" {
EC2(Smadex, "Smadex Service", " ")
}


Users(Users, "Users", " ")

Traditionalserver(AdExchange, "Ad Exchange", " ")

Mobileclient(Mobile, "Publisher app or web", " ")


Users -down-> Mobile: 1. Visits
Mobile -right-> AdExchange: 2. Start auction
AdExchange -right-> Smadex: 3. Bid request / response
Smadex -left-> Mobile: 4. Show Ad
Users -right-> Smadex: 5. Impression / click / install / event {request id}
@enduml

plantuml image