aaren / notedown

Markdown <=> IPython Notebook
BSD 2-Clause "Simplified" License
854 stars 115 forks source link

support of cell metadata in markdown #59

Closed cleemesser closed 6 years ago

cleemesser commented 7 years ago

I am interested in supporting notebook cell metadata in the markdown file.This would have benefits:

I am not sure about the best way to do this, but I can imagine abusing markdown links somewhat

each markdown cell would be allowed to have a "comment:"

[//]: # ( "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide"} } )
### The markdown content level three header
content plain text...

The code blocks would be handled as they are in notedown, but would add an optional metadata tag:

```{.python, "metadata" : {"collapsed": false, "slideshow": { "slide_type": "fragment"} } }
import numpy, pandas
y = 3 * 4
```

This may be an answer to #47 I am not married to the idea of using this particular system, but it would seem it would be ignored by a typical common-mark/markdown renderer and would not be too hard to implement.

sje30 commented 7 years ago

hi @cleemesser - I have other reasons for working on this project (supporting Julia, R), so roundtripping sounds like a great idea to me. joint project?!?

sje30 commented 7 years ago

p.s. you know more python than me!

cleemesser commented 7 years ago

Sounds good. I have forked aaren's code and am messing with it as a prototype.

Will implement ipynb -> markdown first as this is easiest using aaren's code. See https://github.com/cleemesser/notedown metadata branch

aaren commented 6 years ago

I'm not really sure about the best way to do this, and I'm a bit reluctant as I have very little time to maintain this any more, but things to consider are Pandoc's header_attributes and fenced_divs http://pandoc.org/MANUAL.html

Closing for now.