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

inputting portions of a script #289

Open
ggrothendieck opened this issue Aug 2, 2022 · 0 comments
Open

inputting portions of a script #289

ggrothendieck opened this issue Aug 2, 2022 · 0 comments

Comments

@ggrothendieck
Copy link

ggrothendieck commented Aug 2, 2022

Not sure if this is within the scope of box but if box is regarded as a better way to use scripts then perhaps it is.

The feature would be to allow reading just part of a script. There would be some syntax that the script could use to define chunks and then box could source just specified chunks.

Some examples of use would be:

  • have a chunk of functions and then various chunks giving runs with alternative data. That would allow everything to be stored in a single script.
  • have a script with functions and then have alternative codes to run it with different parameters
  • have a script with functions and code to use them but then allow a second script to run just the functions without running the code to execute them so it can use its own code to run them.

Presumably there would be some syntax like this that the script could use.

#!! chunk_name
lines of code

#!! another_chunk_name
lines of code

The box command or some other command would have an argument that specifies the chunk(s) to run.

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

No branches or pull requests

1 participant