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 · 5 comments · May be fixed by #2242
Open

d2 play input.d2 #1213

alixander opened this issue Apr 17, 2023 · 5 comments · May be fixed by #2242
Assignees
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?

@cyborg-ts cyborg-ts added this to D2 Apr 17, 2023
@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
@turkmenkaan
Copy link

Is this still needed? I can look into this.

@alixander
Copy link
Collaborator Author

alixander commented Dec 10, 2024

@turkmenkaan go for it!

@turkmenkaan turkmenkaan linked a pull request Dec 11, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

5 participants
@danielsitnik @alixander @turkmenkaan @bo-ku-ra and others