Skip to content

Commit

Permalink
Merge pull request #98 from yacchin1205/feature/ep_weave
Browse files Browse the repository at this point in the history
Add ep_weave support of sidestickies
  • Loading branch information
yacchin1205 committed Jul 4, 2023
2 parents c196398 + e594950 commit 03335f9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,18 @@ You may customize the execution of Docker container and the Notebook server cont

### Using sidestickies

You can use [sidestickies](https://github.com/NII-cloud-operation/sidestickies) by the following steps.
You can use [sidestickies](https://github.com/NII-cloud-operation/sidestickies) by either of the following steps.

Using Scrapbox https://scrapbox.io/:
- Add `-e SIDESTICKIES_SCRAPBOX_PROJECT_ID=value -e SIDESTICKIES_SCRAPBOX_COOKIE_CONNECT_SID=value` to docker options - Specify Scrapbox account to [sidestickies](https://github.com/NII-cloud-operation/sidestickies).
- Enable the sidestickies extension via the Nbextensions tab.
*Note: you need to enable both "Sidestickies for file tree" and "Sidestickies for notebook" nbextensions.*

Using ep_weave(Etherpad) https://github.com/NII-cloud-operation/ep_weave :
- Add `-e SIDESTICKIES_EP_WEAVE_URL=http://ep_weave:9001 -e SIDESTICKIES_EP_WEAVE_API_KEY=YOUR_ETHERPAD_APIKEY` to docker options.
- Enable the sidestickies extension via the Nbextensions tab.
*Note: you need to enable both "Sidestickies for file tree" and "Sidestickies for notebook" nbextensions.*

### Using NBSearch

You can use [NBSearch](https://github.com/NII-cloud-operation/nbsearch) by enabling the NBSearch extension via the Nbextensions tab.
Expand Down
12 changes: 12 additions & 0 deletions conf/jupyter_notebook_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@
if 'SIDESTICKIES_SCRAPBOX_PROJECT_ID' in os.environ:
c.ScrapboxAPI.project_id = os.environ['SIDESTICKIES_SCRAPBOX_PROJECT_ID']

if 'SIDESTICKIES_EP_WEAVE_URL' in os.environ:
# Enables EpWeaveAPI
c.SidestickiesAPI.api_class = "nbtags.api.EpWeaveAPI"
c.EpWeaveAPI.url = os.environ['SIDESTICKIES_EP_WEAVE_URL']

if 'SIDESTICKIES_EP_WEAVE_API_KEY' in os.environ:
c.EpWeaveAPI.apikey = os.environ['SIDESTICKIES_EP_WEAVE_API_KEY']
del os.environ['SIDESTICKIES_EP_WEAVE_API_KEY']

if 'SIDESTICKIES_EP_WEAVE_API_URL' in os.environ:
c.EpWeaveAPI.api_url = os.environ['SIDESTICKIES_EP_WEAVE_API_URL']

if 'NBSEARCHDB_SOLR_BASE_URL' in os.environ:
c.NBSearchDB.solr_base_url = os.environ['NBSEARCHDB_SOLR_BASE_URL']

Expand Down

0 comments on commit 03335f9

Please sign in to comment.