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

Feature: Include Remote Code Files #13

Open
acederberg opened this issue Oct 19, 2024 · 3 comments
Open

Feature: Include Remote Code Files #13

acederberg opened this issue Oct 19, 2024 · 3 comments

Comments

@acederberg
Copy link
Contributor

Hi!

I was wondering if I could add including files from urls (for instance from raw github content)? Obviously, this should only work for pages that are code files, e.g. some content from github raw files.

For instance, I would want this to work like something like

Some code from a repository on github:

```{.python 
     include="https://raw.githubusercontent.com/acederberg/captura/master/src/captura/fields.py"
   }
``` 
@acederberg
Copy link
Contributor Author

@cderv what are your thoughts? Is it possible to include the required dependencies when including the extension in quarto? For instance lua-http, to make requests?

@cderv
Copy link
Contributor

cderv commented Oct 28, 2024

Thanks for your idea. I need to check with the team if we want to allow downloading from external source here. For non computational code cell, it seems ok and we could indeed add such feature.

Is it possible to include the required dependencies when including the extension in quarto? For instance lua-http, to make requests?

Pandoc's Lua API offers some fetching utility that probably can be leverage for that. See https://pandoc.org/lua-filters.html#module-pandoc.mediabag

Maybe there would be no need for a new API.

Do you want to try a PR on this for further discussion ?

@acederberg
Copy link
Contributor Author

Hi!

Yes I'll give that a shot here soon. Currently neck deep in some other stuff, but I think I can make this happen once I've got a minute.

Certainly that would be a problem for executable code blocks, that could enable RCE which is not desirable.

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