mwouts / jupytext

Jupyter Notebooks as Markdown Documents, Julia, Python or R scripts
https://jupytext.readthedocs.io
MIT License
6.65k stars 386 forks source link

Add gnuplot support #998

Closed razimantv closed 2 years ago

razimantv commented 2 years ago

Added gnuplot support based on has2k1's gnuplot kernel.

The kernel supports % line magics. These are treated correctly when exporting to script and percent. But when exporting to hydrogen, the line magic remains as a line starting with % so that it is not a valid gnuplot line anymore. But I suppose that is how hydrogen works?

mwouts commented 2 years ago

Hi @razimantv , thank you so much for your PR! Sorry by the way for not responding before, I have been busy with a few other projects recently...

Yes the PR seems alright at first sight. And indeed the hydrogen format is the same as percent except that by default the magic commands are not commented out (because hydrogen executed the code with Jupyter, but I am not sure if that is still much used nowadays).

There are a few errors on the CI, and I think I have fixed them recently on main, would you like to rebase your PR on main ?

razimantv commented 2 years ago

Sorry, a bit new to this. I merged the main branch, would this be enough?

mwouts commented 2 years ago

Yes it should work - let's see what the CI says!

mwouts commented 2 years ago

Awesome, thanks!