Skip to content

Commit 36341de

Browse files
committed
Update README
1 parent 703f28f commit 36341de

File tree

3 files changed

+28
-20
lines changed

3 files changed

+28
-20
lines changed

README.md

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,29 @@ This should automatically enable the extension. If it is not listed in `jupyter
2121
jupyter serverextension enable --py jupyter_offlinenotebook --sys-prefix
2222

2323

24+
Usage
25+
-----
26+
27+
![Offline notebook buttons](./offline-notebook-buttons.png)
28+
29+
You should see up to five new buttons depending on your configuration and where you are running the notebook:
30+
- download the in-memory (browser) state of the notebook
31+
- save the in-memory state of the notebook to local-storage
32+
- load a notebook from local-storage
33+
- open the permanent URL of the repository containing this notebook
34+
- copy the permanent mybinder URL to share this repository
35+
36+
Saving and loading uses the repository ID and the path of the current notebook.
37+
38+
You should always see the `Download` button.
39+
If you are running this on mybinder all buttons should be visible.
40+
See the configuration section below to enable the other buttons on other systems.
41+
42+
If you don't see the buttons check the Javascript console log.
43+
44+
See [example.ipynb](./example.ipynb)
45+
46+
2447
Configuration
2548
-------------
2649

@@ -36,23 +59,8 @@ This extension can be configured in `jupyter_notebook_config.py` by setting the
3659
A callable that returns the repository reference URL.
3760
Default is the values of the `BINDER_LAUNCH_HOST` and
3861
`BINDER_PERSISTENT_REQUEST` environment variables.
39-
40-
41-
42-
Usage
43-
-----
44-
45-
![Offline notebook buttons](./offline-notebook-buttons.png)
46-
47-
There are three new icons to:
48-
- download the in-memory (browser) state of the notebook
49-
- save the in-memory state of the notebook to local-storage
50-
- load a notebook from local-storage
51-
52-
Saving and loading uses the repository ID and the path of the current notebook.
53-
If you don't see the buttons check the Javascritp console log, it may mean no repository ID was found.
54-
55-
See [example.ipynb](./example.ipynb)
62+
- `binder_repo_label`:
63+
A callable that returns the label used to link to the repository.
5664

5765

5866
**WARNING**

example.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
"source": [
1717
"1. Make some changes to this notebook (or run it to update the output).\n",
1818
"2. Do not save the notebook. You can even disconnect from the Jupyter server or your network.\n",
19-
"3. Click the first button (`first aid kit`). This should prompt you to download the notebook.\n",
20-
"4. Click the middle button (`download`). This should save the current notebook into your browser's [local-storage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage).\n",
19+
"3. Click the first button (`Download`). This should prompt you to download the notebook.\n",
20+
"4. Click the second button (`cloud download`). This should save the current notebook into your browser's [local-storage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage).\n",
2121
"5. Start a new instance of Jupyter, and open the original version of this notebook.\n",
22-
"6. Click the third button (`upload`). This should restore the copy of the notebook from your browser's local-storage."
22+
"6. Click the third button (`cloud upload`). This should restore the copy of the notebook from your browser's local-storage."
2323
]
2424
},
2525
{

offline-notebook-buttons.png

6.73 KB
Loading

0 commit comments

Comments
 (0)