You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I would like to use glow as "jupyter for the poor" 😅.
I want to write regular markdown with some code blocks. The code should be executed step by the step by the user - but without copy/pasting the code to a terminal.
The easiest would be if the user could have a button or so, to trigger the code execution.
Just like this image shows (the "execute" button on each code block is missing, i hope you can imaging it :-)) :
Describe the solution you'd like
I would like to propose a generic and open solution resulting in endless use cases - configurable "hooks" for glow to provide custom interactive markdown documents. just like jupyter notebooks - but simpler and targeting just the terminal.
glow should support configurable hooks as cli arguments
individual markdown documents should even support glow hook declarations (defined in the markdown frontmatter section) to provide self contained "executable" markdown documents
the minimal initial hooks supported by glow should be :
the init hook for running a custom script configuring/creating the environment/dependencies to run the code blocks in the markdown document. this might be preparing a terminal window and checking the required software is already installed. if the script configured as init hook returns a status code != 0 glow should disable code block execution an just show up the stderr console output of the init hook. If glow hooks are configured, glow should initially ask the user for confirmation of hook execution is really safe for the user.
the onCode hook for running script whenever the user clicks the code block's "execute" action (=> might be a button or whatever). The label of the action might be derived from the configured script (i.e. its name). Whenever the action gets triggered by the user, glow should transfer the content of the code block to the script. It's up to the script to so something with the text. It might even just transfer the code to the clipboard, execute it in a terminal or whatever.
the destroy hook should be called when (1) glow exists or (2) loads another markdown document. This hook can be used to cleanup generated files/folders/whatever.
I hope you've got the whole idea.
This feature might empower glow to be usable for terminal based
interactive tutorials
setup documents
terminal based jupyter a like notebooks
and many many more.
I wouldn’t be surprised if it would be heavily used at universities because it’s so beautifully simple to use.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I would like to use glow as "jupyter for the poor" 😅.
I want to write regular markdown with some code blocks. The code should be executed step by the step by the user - but without copy/pasting the code to a terminal.
The easiest would be if the user could have a button or so, to trigger the code execution.
Just like this image shows (the "execute" button on each code block is missing, i hope you can imaging it :-)) :
Describe the solution you'd like
I would like to propose a generic and open solution resulting in endless use cases - configurable "hooks" for glow to provide custom interactive markdown documents. just like jupyter notebooks - but simpler and targeting just the terminal.
glow should support configurable hooks as cli arguments
individual markdown documents should even support glow hook declarations (defined in the markdown frontmatter section) to provide self contained "executable" markdown documents
the minimal initial hooks supported by glow should be :
the
init
hook for running a custom script configuring/creating the environment/dependencies to run the code blocks in the markdown document. this might be preparing a terminal window and checking the required software is already installed. if the script configured as init hook returns a status code != 0 glow should disable code block execution an just show up the stderr console output of the init hook. If glow hooks are configured, glow should initially ask the user for confirmation of hook execution is really safe for the user.the
onCode
hook for running script whenever the user clicks the code block's "execute" action (=> might be a button or whatever). The label of the action might be derived from the configured script (i.e. its name). Whenever the action gets triggered by the user, glow should transfer the content of the code block to the script. It's up to the script to so something with the text. It might even just transfer the code to the clipboard, execute it in a terminal or whatever.the
destroy
hook should be called when (1) glow exists or (2) loads another markdown document. This hook can be used to cleanup generated files/folders/whatever.I hope you've got the whole idea.
This feature might empower glow to be usable for terminal based
interactive tutorials
setup documents
terminal based jupyter a like notebooks
and many many more.
I wouldn’t be surprised if it would be heavily used at universities because it’s so beautifully simple to use.
The text was updated successfully, but these errors were encountered: