Package: nbconflux
nbconfluxnbconflux converts Jupyter Notebooks toAtlassian Confluencepages usingnbconvert.Why?nbconflux is useful when:You use Jupyter notebooks to author computational narrativesYour organization uses Confluence to store institutional knowledgeYou want an easy way to publish your work in that knowledge baseFeaturesConverts most cell inputs and outputs to validConfluence storage formatAttaches image outputs (e.g., matplotlib PNGs) to a page, shows them inline,
and maintains the page-image association in the version historyAttaches the source notebook to a page, links to it from the page footer, and
maintains the page-notebook association in the version historySupports sweep-select Confluence comments over most input and output contentExcludes input, output, or entire cells based on notebook cell tagsnoinput,nooutput, ornocellLabels pages withnbconfluxto identify content that originated as notebooksInserts a table of contents macro at the top of the page based on notebook
headingsApplies the NBViewer stylesheet to pages to blend Confluence styling with
Jupyter notebook styling (requires the CSS macro)Enables MathJax rendering (requires theHTML macro)Supports raw-cell passthrough of Confluence storage format markup (e.g., to
include Confluence macros)Compatible with Confluence Cloud and Confluence ServerInstallationThe nbconflux library requires Python 3 to run andpipto install.
Once you've satisfied these prerequisites, run:pipinstallnbconflux(A conda package is coming soon.)UsageCreate or visit a page on your Confluence site.Copy the URL for the page.Run one of the following:In a shell:nbconflux/path/to/a.ipynbhttps://your/page/urlIn a Python script, Jupyter Notebook, etc.:importnbconfluxhtml,resources=nbconflux.notebook_to_page(nb_path,url)Enter your Confluence username and password when prompted.Visit the page to see your updates.If you receive an error, see the project issues for known limitations on what
you can post.Runnbconflux -hat the command line for additional options and help.usage: nbconflux [-h] [--exclude-toc] [--exclude-ipynb] [--exclude-style]
                 [--include-mathjax]
                 notebook url

Converts Jupyter Notebooks to Atlassian Confluence pages using nbconvert

positional arguments:
  notebook           Path to local notebook (ipynb)
  url                URL of Confluence page to update

optional arguments:
  -h, --help         show this help message and exit
  --exclude-toc      Do not generate a table of contents
  --exclude-ipynb    Do not attach the notebook to the page
  --exclude-style    Do not include the Jupyter base stylesheet
  --include-mathjax  Enable MathJax on the page
  --extra-labels EXTRA_LABELS [EXTRA_LABELS ...]
                     Additional labels to add to the page

Collects credentials from the following locations:
1. CONFLUENCE_USERNAME and CONFLUENCE_PASSWORD environment variables
2. ~/.nbconflux file in the format username:password
3. User promptsContributingWe welcome issues and pull requests that help improve the variety of notebook
content and Confluence installations nbconflux supports, its usability for
humans, and its reusability within other tools.We recommend creating a Python development environment usingcondaorvirtualenv, runningmake dev-envto install the runtime and development
requirements, and runningmake testto execute the unit test suite on your
local machine.FAQQ: Why not call it nbconfluence?A:https://atlassian.com/legal/trademarkQ: Why do I have to create a page on the site first?A: To avoid introducing the complexity of specifying a space, parent page, and
title into the package.LicenseCopyright (c) 2018 Valassis Digital under the terms of the BSD 3-Clause licenseDevelopmentTo run the tests:make dev-env
make testMaintenanceTo make a release:Meet all the requirements described inhttps://dustingram.com/articles/2018/03/16/markdown-descriptions-on-pypito support pushing the Markdown README as the long description on PyPI.git commit -m 'REL: 0.6.0' --allow-emptygit tag -a 0.6.0 -m 'REL: 0.6.0'git push origin masterandgit push origin master --tagsor use a PRRunmake release.Enter your PyPI creds when prompted.