mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-05 09:01:40 -05:00
Add ein:notebook-to-json (not yet tested)
This commit is contained in:
parent
0c8857d044
commit
85c27f1727
1 changed files with 11 additions and 0 deletions
|
@ -335,6 +335,17 @@ Note that SLOT should not be quoted."
|
|||
(puthash msg-id (ein:$cell-cell-id cell) (ein:@notebook msg-cell-map)))
|
||||
(setf (ein:@notebook dirty) t)))
|
||||
|
||||
|
||||
;;; Persistance and loading
|
||||
|
||||
(defun ein:notebook-to-json (notebook)
|
||||
"Return json-ready plist."
|
||||
(list
|
||||
:worksheets
|
||||
(list :cells (mapcar #'ein:cell-to-json (ein:notebook-get-cells notebook)))
|
||||
;; FIXME: Make sure metadata is set at load time! Currently it's not.
|
||||
:metadata (ein:$notebook-metadata notebook)))
|
||||
|
||||
|
||||
;;; Notebook mode
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue