Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include remotely fail #17

Closed
utamori opened this issue Nov 24, 2021 · 3 comments
Closed

include remotely fail #17

utamori opened this issue Nov 24, 2021 · 3 comments

Comments

@utamori
Copy link

utamori commented Nov 24, 2021

Thank you for creating a great tool. 🙏

I tried to write the file as follows, but I got an error and it did not work correctly

https://github.com/tmorin/plantuml-libs/blob/8978f181caf319de48f5e1bcb35c41b24a55997f/distribution/aws-20210730/Group/GroupAutoScaling.md

@startuml
' configures the library
!global $LIB_BASE_LOCATION="https://github.com/tmorin/plantuml-libs/distribution"

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('aws-20210730/bootstrap')

' loads the Item which embeds the element GroupAutoScaling
include('aws-20210730/Group/GroupAutoScaling')

GroupAutoScaling('GroupAutoScaling', 'Group Auto Scaling', 'an optional tech label') {
  note as note
  the content of the boundary
  end note
}
@enduml

The error message is as follows

PlantUML 1.2021.7
<b>This version of PlantUML is 184 days old, so you should
<b>consider upgrading from https://plantuml.com/download
[From string (line 6) ]
@startuml
' configures the library
!global $LIB_BASE_LOCATION="https://github.com/tmorin/plantuml-libs/distribution"
' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml
Cannot open URL

I couldn't seem to open the URL, so I rewrote it and tried again.

@startuml
- ' configures the library
- !global $LIB_BASE_LOCATION="https://github.com/tmorin/plantuml-libs/distribution"
- 
- ' loads the library's bootstrap
- !include $LIB_BASE_LOCATION/bootstrap.puml

+ !include https://raw.githubusercontent.com/tmorin/plantuml-libs/master/distribution/bootstrap.puml

' loads the package bootstrap
include('aws-20210730/bootstrap')

' loads the Item which embeds the element GroupAutoScaling
include('aws-20210730/Group/GroupAutoScaling')

GroupAutoScaling('GroupAutoScaling', 'Group Auto Scaling', 'an optional tech label') {
  note as note
  the content of the boundary
  end note
}
@enduml

The error message is as follows

PlantUML 1.2021.7
<b>This version of PlantUML is 184 days old, so you should
<b>consider upgrading from https://plantuml.com/download
[From https://raw.githubusercontent.com/tmorin/plantuml-libs/master/distribution/bootstrap.puml (line 79) ]
@startuml
' configures the library
' loads the library's bootstrap
!include https://raw.githubusercontent.com/tmorin/plantuml-libs/master/distribution/bootstrap.puml
...
... ( skipping 156 lines )
...
!procedure GroupElement($id, $stereotype, $name="", $tech="")
!local $V=""
!if ($name != "") && ($tech != "")
!$V=$V + $name + "\n" + "<size:" + $FONT_SIZE_XS + "><color:" + $FONT_COLOR_LIGHT + ">[" + $tech + "]</color></s ...
!elseif ($name != "")
!$V=$V + $name
!elseif ($tech != "")
!$V=$V + "<size:" + $FONT_SIZE_XS + "><color:" + $FONT_COLOR_LIGHT + ">[" + $tech + "]</color></size>"
!endif
!if ($V != "")
Rectangle $id <<$stereotype>> as "$V"
!else
Rectangle $id <<$stereotype>>
!endif
!endprocedure
' loads the package bootstrap
include('aws-20210730/bootstrap')
!include $LIB_BASE_LOCATION/$resource.puml
Cannot open URL

Will this be solved by rewriting https://github.com to https://raw.githubusercontent.com in all code ?

I'm sorry if I'm missing the point.

@tmorin
Copy link
Owner

tmorin commented Nov 26, 2021

Hi @utamori
Thank you for the feedback.
You're right the URL should be "https://raw.githubusercontent.com/tmorin/plantuml-libs/master/distribution".
I will fix it.
Best regards

@tmorin tmorin closed this as completed Nov 26, 2021
@utamori
Copy link
Author

utamori commented Nov 27, 2021

thank you! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants