Skip to content

Commit

Permalink
Improve documentation for notebook and cell metadata stripping
Browse files Browse the repository at this point in the history
* Clarify that extra keys may _only_ specify notebook and cell metadata to be stripped.
* Update metadata stripped by default.

Addresses #187
  • Loading branch information
kynan committed Dec 7, 2023
1 parent 749f431 commit 7b065ef
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,9 @@ Stripping metadata

The following metadata is stripped by default:

* Notebook metadata: ``signature``, ``widgets``
* Cell metadata: ``ExecuteTime``, ``collapsed``, ``execution``, ``scrolled``
* Notebook metadata: ``signature``, ``widgets``
* Cell metadata: ``ExecuteTime``, ``collapsed``, ``execution``,
``heading_collapsed``, ``hidden``, ``scrolled``

Additional metadata to be stripped can be configured via either

Expand All @@ -341,6 +342,10 @@ Additional metadata to be stripped can be configured via either

--extra-keys "metadata.celltoolbar cell.metadata.heading_collapsed"

Note: Only notebook and cell metadata is currently supported and every key
specified via ``filter.nbstripout.extrakeys`` or ``--extra-keys`` must start
with ``metadata.`` for notebook and ``cell.metadata.`` for cell metadata.

You can keep certain metadata with either

* ``git config (--global/--system) filter.nbstripout.keepmetadatakeys``, e.g. ::
Expand Down

0 comments on commit 7b065ef

Please sign in to comment.