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

d2 play input.d2 #1213

Open
alixander opened this issue Apr 17, 2023 · 3 comments
Open

d2 play input.d2 #1213

alixander opened this issue Apr 17, 2023 · 3 comments
Labels
cli This issue is related to the CLI (cmd/d2) good first issue Good for newcomers

Comments

@alixander
Copy link
Collaborator

What if this command just encoded the input.d2 file and opened it up on playground?

@bo-ku-ra
Copy link
Contributor

for what purpose?

my idea is
https://play.d2lang.com/?l=&script=qlDQtVOo5AIEAAD__w%3D%3D& Export=SVG

foobar.d2
xy{
icon:https://play.d2lang.com/?l=&script=qlDQtVOo5AIEAAD__w%3D%3D&Export=SVG
}

@danielsitnik
Copy link

Sorry to revive this topic, but If anyone is interested, the content you see in the script parameter in the URL of the playground is just the diagram code after being compressed with Deflate and than base64url encoded.

Please note that it uses base64url (eg: / is converted to _ and = to %3d) and not plain base64. 😉

@alixander alixander added good first issue Good for newcomers cli This issue is related to the CLI (cmd/d2) labels May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli This issue is related to the CLI (cmd/d2) good first issue Good for newcomers
Projects
Status: No status
Development

No branches or pull requests

4 participants
@danielsitnik @alixander @bo-ku-ra and others