asg017 / dataflow

An experimental self-hosted Observable notebook editor, with support for FileAttachments, Secrets, custom standard libraries, and more!
https://alexgarcia.xyz/dataflow/
MIT License
402 stars 24 forks source link

Add Cell Menus for downloading cell values #21

Open asg017 opened 3 years ago

asg017 commented 3 years ago

For every cell, include an dropdown option in the left margin of a cell that allows readers to download the values of a given cell.

For example, if you have a cell that has a value of some JSON array, then the menu option will let you 1) download that JSON as a file or 2) copy that JSON value to your clipboard.

I'd imagine downloading and copying are the only operations you would care about. Maybe there could be some "caching" operation that lets you transform some data then include it in a notebook "pre-compiled" or "pre-rendered", but that would be out of scope for now.

Could also have some builtin cells that create "Download as X" buttons for a given data variable. That was the original workflow for observablehq.com notebook for download cells, before the cell menu was updated.