Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating API page #1088

Merged
merged 2 commits into from
Aug 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions docs/source/api/preprocessors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Preprocessors
=============

.. module:: nbconvert.preprocessors
:noindex:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was because sphinx gave me a warning that this was double-referenced


.. seealso::

Expand All @@ -19,23 +20,42 @@ Preprocessors
Specialized preprocessors
-------------------------

Converting and extracting figures
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: ConvertFiguresPreprocessor

.. autoclass:: SVG2PDFPreprocessor

.. autoclass:: ExtractOutputPreprocessor

Converting text
~~~~~~~~~~~~~~~

.. autoclass:: LatexPreprocessor

.. autoclass:: HighlightMagicsPreprocessor

Metadata and header control
~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: ClearMetadataPreprocessor

.. autoclass:: CSSHTMLHeaderPreprocessor

.. autoclass:: HighlightMagicsPreprocessor
Removing cells, inputs, and outputs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: ClearOutputPreprocessor

.. autoclass:: RegexRemovePreprocessor

.. autoclass:: TagRemovePreprocessor

Executing Notebooks
~~~~~~~~~~~~~~~~~~~

.. autoclass:: ExecutePreprocessor
:members:

.. autofunction:: coalesce_streams
.. autofunction:: coalesce_streams
2 changes: 1 addition & 1 deletion nbconvert/exporters/templateexporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def __init__(self, config=None, **kw):
extra_loaders : list[of Jinja Loaders]
ordered list of Jinja loader to find templates. Will be tried in order
before the default FileSystem ones.
template : str (optional, kw arg)
template_file : str (optional, kw arg)
Template to use when exporting.
"""
super(TemplateExporter, self).__init__(config=config, **kw)
Expand Down
30 changes: 19 additions & 11 deletions nbconvert/preprocessors/tagremove.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,25 @@

class TagRemovePreprocessor(ClearOutputPreprocessor):
"""
Removes cells from a notebook that have tags that designate they are to be
removed prior to exporting the notebook.

Traitlets:
----------
remove_cell_tags: removes cells tagged with these values
remove_all_output_tags: removes entire output areas on cells
tagged with these values
remove_single_output_tags: removes individual output objects on
outputs tagged with these values
remove_input_tags: removes inputs tagged with these values
Removes inputs, outputs, or cells from a notebook that
have tags that designate they are to be removed prior to exporting
the notebook.

Traitlets
---------
remove_cell_tags
removes cells tagged with these values
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this fixes the rST formatting in the final docs, before it was treating the indentations weirdly so this gets the block quotes rendering properly


remove_all_output_tags
removes entire output areas on cells
tagged with these values

remove_single_output_tags
removes individual output objects on
outputs tagged with these values

remove_input_tags
removes inputs tagged with these values

"""

Expand Down