Closed Cadair closed 5 years ago
It is not currently possible, but it probably could be made possible. I am not real sure how you would do though. What syntax to annotate a code cell do you imagine using? I feel like it would look something like this:
#+ATTR_IPYNB: :key1 val1 :key2 val2
right above a cell. That would then be used to construct cell metadata. Would that do what you have in mind?
Yeah that was pretty much what I had in mind, do you see putting it above a SRC block working?
I thought so, but it turns out that won't work, those attributes don't export to a new org buffer which is the first step of exporting as of now. It might have to go in the src header. Can you give me some examples of what you would like to do?
I implemented a version of this in the cell-metadata branch.
Try it out like this:
#+ATTR_IPYNB: :key1 val1 :key2 val2
#+BEGIN_SRC ipython
print(6)
#+END_SRC
Hi John, could this branch be merged into the master. I would like to use this feature to export notebooks that can be used with RISE (https://github.com/damianavila/RISE)
Give 8d62d42 a try. It should allow metadata on src blocks and paragraphs.
I am not sure if this already supports this, my attempts at reading the source did not enlighten me.
I would very much like to be able to add metadata to individual cells, mainly code blocks, so that I can do extra post-processing on the notebook once I have exported it. Is this something you think is possible?
Thanks