From 7b065ef1af9bac07b9cd1d6161491fd0ce0f8f45 Mon Sep 17 00:00:00 2001 From: Florian Rathgeber Date: Thu, 7 Dec 2023 21:51:48 +0100 Subject: [PATCH] Improve documentation for notebook and cell metadata stripping * Clarify that extra keys may _only_ specify notebook and cell metadata to be stripped. * Update metadata stripped by default. Addresses #187 --- README.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 3d97290..5e3161b 100644 --- a/README.rst +++ b/README.rst @@ -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 @@ -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. ::