Open aeturrell opened 3 years ago
Thanks for the feature request! We would use nbconvert to add this functionality, and we will discuss the prioritization of this feature at our weekly triage meeting. 😊
We should just add all formats.
That would be fantastic.
For context, in case it's interesting or useful to know, the main use case behind my issue is blogging. Jupyter has been, in my experience, the best option for exporting to markdown with good formatting and integrated figures suitable for blogging via eg Jekyll. I've also tried Rmarkdown, which didn't format code blocks very well, and codebraid, which is brilliant but lacks the automated figure export (for now).
Or, for those of us who write papers and collaborate with others who don't use jupyter, exporting to MS Word would rule. Perhaps markdown > pandoc > word?
What's silly is you can literally open-for-edit every cell, copy all, and paste into a new .md, and you only need to go through and separate the cells.
Not a great workaround… can someone let the new intern work on this?
code cells surrounded by three ` all cells separated by crlf --- crlf.
The root issue here is getting nbconvert to work. We've moved away from it for convert to python. Convert to html usually works. Convert to pdf almost never works. So adding more nbconvert options would be iffy.
Well markdown would seem to be foolproof, given it just does 4 spaces on code blocks. Would be cool to implement, and seems like it wouldn't be any more than adding the variable to the select list. ¯_(ツ)_/¯
If it's already fairly broken, not much risk. :)
$ jupyter nbconvert --to markdown notebook.ipynb
Are there any updates on this?
There is a great plugin for JupyterLab - JupyText that works great with the Lab to convert notebooks to MD, could anything similar be done with VS Code?
would also love to see this
It would be so powerful to help reporting issues in libraries for instance.
Even better: imagine an integration with GitHub: you write a notebook and can derive an issue from it, that is already well written and with repeatable code examples!
What's silly is you can literally open-for-edit every cell, copy all, and paste into a new .md, and you only need to go through and separate the cells.
Not a great workaround… can someone let the new intern work on this?
code cells surrounded by three ` all cells separated by crlf --- crlf.
code cells surrounded by three ` all cells separated by crlf --- crlf. could be set as an option, and the python code could be embedded in the format below
code
with "python" after the 3 `
When working directly with .ipynb files in VS Code, the current GUI export options are python script, HTML, and PDF.
It would be great if the VS Code Python extension had an export as markdown option too. Currently, users who want markdown have to re-open the .ipynb file in Jupyter notebook and use its export as markdown option, or use the command line converter.
Given the other export options are already implemented, my guess is that this would be relatively easy to implement too.