For offline/local usage - clone this repository (git clone or better still - download) put it behind a webserver. That's it. No Ngnix, no npm, no node, no pip install, no apt-get install. DOWNLOAD LINK. This is a "nodeless" app because it doesn't require Node.js, npm, or a backend runtime to use.
For self-hosted use, you can put the folder in web directory of the server and use the link to index.html.
Several examples are available in the folder examples/ of this repository. Check the README in that folder for links. They can be used as boilerplates for further experimentation.
git clone https://github.com/gopi-suvanam/scribbler
cd scribbler
npx serve # Requires npx and a server package like 'serve' to be installed
Features
Cells:
The notebook consists of cells. Each cell will have user inputted doc/code and an output. There is a menu at the top right corner of the cell (or above the cell in case of smaller screens).
There are two types of cells: code and doc. The type of cell can be toggled using a switch in the cell menu.
For code cells input and output are both shown. For doc cells, input is hidden and opens up if you click the output.
Cell Buttons:
To get the output of a cell press play ► button on the cell menu (or Cmd/Ctrl-Enter on keyboard after selecting the cell).
The cell menu also has buttons for moving the cell up ↑, down ↓, adding a new cell ✛ and deleting the current cell ☓.
Saving and Opening:
A notebook can be saved from File->Save. This will save it in the browser storage.
You can open it using File->Open.
Note that if browser data is cleared the files will be lost.
Exporting and Importing:
A notebook can be downloaded as json (has a default extension of .jsnb). It can be loaded back into the app. The notebook or only the output can also be downloaded as html.
A .jsnb file can also be directly loaded into the app by suffixing the url of the file after "#" something like: https://app.scribbler.live/#link_to_file.jsnb. The url of the file should be accessible by the browser through GET method.
For details on Download/Upload, download as html/javascript, push to/pull from GitHub and GitLab. See DOCS for details
Special Functions & Features:
Scribbler offers several special functions to enhance interactivity. For a full list and details, please see the Special Functions Documentation.
Keyboard Shortcuts: Several keyboard shortcuts for running/dowloading/adding cells/deleting cells etc. See DOCS for details
External Libraries:
Plotly (for charting), and Scribbler's sister project DI-Libs are preloaded and can be used in the notebooks without seperately loading. They can also be reloaded using scrib.reloadScript.
For adding more functionality import an external library through dynamic import() or through scrib.loadScript(CDN_LINK).
HTML and CSS
You can write HTML and CSS also in cells using two ways.
In code cells you can start the cell with //> html or //> css or
In doc cell you can directly use HTML. For css in doc cell you can use tags
Use cases
For trying new libraries for testing and building
For building reproducible research and sharing the results with others
Not to be used for:
Production use cases
As an alternative to webapps
Working with sensitive data like personal information.
Collaboration
The tool does not store data on cloud as it is intended to be a fully open source product for self-hosting/use on local machines. A fully hosted solution with collaboration is in the Roadmap. Collaboration is still possible through:
Download and share .jsnb files.
Use GitHub or GitLab for storing .jsnb files. Make the repo public or add collaborators. The notebooks built on Scribbler can be directly be synced to GitHub/GitLab using an access token.
Map a cloud drive or LAN drive onto local machine and load from/download to the drive. Share the drive with collaborators.
How is Scribbler different
Scribbler is an open source application and hence can be downloaded, modified and used freely. Jsfiddle/codepen are cloud based platforms.
Scribbler can have multiple cells so it can create long documents.
Intended use is for experimenting and computing in javascript. HTML and CSS are secondary in the case of Scribbler. Whereas for Jsfiddle and codepen the main use case to test javascript along with html and css.
Scribbler can also be used for scientific computation using several open source javascript libraries.
ObservableHQ is similar in principle to Scribbler but it a walled garden and not an open source tool. Also it uses relies on React framework whereas Scribbler is framework agnostic.