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

Allow passing script code in URL encoding to make it possible to integrate with Zulip #28

Open
unfa opened this issue Oct 28, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@unfa
Copy link

unfa commented Oct 28, 2024

Hi!

Zulip is a self-hostable open-source team collaborative communication tool.
It has a feature called code playgrounds.

For example, to configure a code playground for code blocks tagged as Rust, you can set:

Language: Rust
Name: Rust playground
URL template: https://play.rust-lang.org/?code={code}
For more examples and technical details, see the help center documentation on adding code playgrounds.

Unfortunately Zulip doesn't support base64 encoding, and can't embed custom metadata that might be present there.

If this playground would allow passing the script code in uri-encoded format. Godot has tools to encode/decode text this way.
Allowing to pass raw code text and have it placed inside the ready function of a Node would mean a user can do

    for i in range(0,10):
        print("this is the number %d" % [i])

Open it in the playground , and be able to hit Ctrl+Enter to evaluate their code immediatelly.

@williamd1k0 williamd1k0 added the enhancement New feature or request label Oct 29, 2024
@williamd1k0
Copy link
Owner

In the current implementation, you can already omit the extends Node and the _ready() method, so I guess the only thing I need to do is add support for script in uri-encoded format.

@williamd1k0
Copy link
Owner

I have just deployed a new version with support for URI encoded code.

I don't have access to this Zulip platform, could you please test and confirm that everything works as intended? @unfa

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

No branches or pull requests

2 participants