Pluto.jl icon indicating copy to clipboard operation
Pluto.jl copied to clipboard

Idea for richer notebook format

Open j-fu opened this issue 3 years ago β€’ 4 comments

Hi, just a thought here for a possible modificatioon of the notebook format -- in case you are considering to extend the current format with more stored information:

I can imagine to use a special comment prefix and some standard way to store richer config information - Julia or (preferably) toml which you can parse to dicts using TOML.jl E.g. like this:

#═║ [PlutoNotebook]
#═║ format_version = "2.0"
#═║ pluto_version  = "1.20"



#═║ [PlutoCell]
#═║ uuid = "7f904dfe-b85e-4ff6-b463-dae2292396a8"
#═║ hidden = false
#═║ show_output=true
#═║ results_on_top=false
hack hack hack

#═║ [CellOrder]
#═║ order = [ 
#═║	      "uuid1",
#═║	      "uuid2"
#═║	   ]

(not sure if the Julia toml parser supports arrays).

This would give you the possibility to add richer meta information to the notebook in an extendable way.

Edit: this could be consistent also with some of the ideas in e.g. #142 .:

#═║ [PlutoProject] 
#═║   project.toml stuff here
#═║

Edit: I think an API for reading and writing notebooks could go into an extra package, thus allowing tools like Literate to write notebooks through this API and encourage the development of a large tooling ecosystem.

j-fu avatar Sep 13 '20 18:09 j-fu

Thanks!

#311

(I'll point out that you can use ; as the last character of a cell to toggle showing output.)

fonsp avatar Sep 14 '20 20:09 fonsp

I've put this on the notion page: https://www.notion.so/Flexible-notebook-format-61749c09aa1b450fa79f025d725bef4c

fonsp avatar Sep 14 '20 20:09 fonsp

On Mon, 14 Sep 2020 22:56:11 +0200, Fons van der Plas wrote:

(I'll point out that you can use ; as the last character of a cell to toggle showing output.)

... I had in mind the @with_output stuff, also with regard to https://julialang.zulipchat.com/#narrow/stream/243342-pluto.2Ejl/topic/print.20inside.20in.20the.20notebook.3F/near/209725305

Best regards JΓΌrgen

-- JΓΌrgen Fuhrmann Numerical Mathematics and Scientific Computing Weierstrass Institute for Applied Analysis and Stochastics Mohrenstr.39 10117 Berlin phone:+49 30 20372560 fax:+49 30 20372317 http://www.wias-berlin.de/~fuhrmann [email protected]

j-fu avatar Sep 14 '20 22:09 j-fu

For cell metadata, this is implemented in #1895

lungben avatar Mar 10 '22 12:03 lungben