Skip to content

Commit

Permalink
Document config options
Browse files Browse the repository at this point in the history
  • Loading branch information
takluyver committed Jun 8, 2015
1 parent f58c542 commit 796505b
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ build
dist
_build
docs/gh-pages
docs/config_options.rst
*.py[co]
__pycache__
*.egg-info
Expand Down
6 changes: 5 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,15 @@ help:
clean:
rm -rf $(BUILDDIR)/*

html:
html: config_options.rst
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."

config_options.rst:
python3 autogen_config.py
@echo "Created docs for config options"

dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
Expand Down
18 changes: 18 additions & 0 deletions docs/autogen_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env python

import os.path
from jupyter_console.app import ZMQTerminalIPythonApp

header = """\
Configuration options
=====================
These options can be set in ``~/.jupyter/jupyter_console_config.py``, or
at the command line when you start it.
"""

destination = os.path.join(os.path.dirname(__file__), 'config_options.rst')

with open(destination, 'w') as f:
f.write(header)
f.write(ZMQTerminalIPythonApp().document_config_options())
3 changes: 3 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
Jupyter console |version|
=========================

The Jupyter console is a terminal frontend for kernels using the Jupyter protocol.

Contents:

.. toctree::
:maxdepth: 2

config_options


Indices and tables
Expand Down

0 comments on commit 796505b

Please sign in to comment.