diff --git a/README.md b/README.md index 2d951862..6ed86d5b 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,17 @@ $ databooks assert [OPTIONS] PATHS... ![databooks assert demo](https://raw.githubusercontent.com/datarootsio/databooks/main/docs/images/databooks-assert.gif) +### Show rich notebook + +Instead of launching Jupyter and opening the browser to inspect notebooks, have a quick +look at them in the terminal. All you need is to specify the path(s) of the notebook(s). + +```console +$ databooks show [OPTIONS] PATHS... +``` + +![databooks show demo](https://raw.githubusercontent.com/datarootsio/databooks/main/docs/images/databooks-show.gif) + ## License This project is licensed under the terms of the MIT license. diff --git a/docs/images/databooks-show.gif b/docs/images/databooks-show.gif new file mode 100644 index 00000000..256dfc4f Binary files /dev/null and b/docs/images/databooks-show.gif differ diff --git a/docs/usage/overview.md b/docs/usage/overview.md index e1b0bdf8..5d8549c4 100644 --- a/docs/usage/overview.md +++ b/docs/usage/overview.md @@ -11,9 +11,10 @@ The package currently has 3 main features, exposed as CLI commands 1. `databooks meta`: to remove unnecessary notebook metadata that can cause git conflicts 2. `databooks fix`: to fix conflicts after they've occurred, by parsing versions of the conflicting file and computing its difference in a Jupyter-friendly way, so you (user) can -manually resolve them in the Jupyter terminal +manually resolve them in the Jupyter interface 3. `databooks assert`: to assert that the notebook metadata actually conforms to desired values - ensure that notebook has sequential execution count, tags, etc. +4. `databooks show`: to show a rich representation of the notebooks in the terminal ## `databooks meta` @@ -228,3 +229,15 @@ cog.out("\n".join(DOC_TEMPLATE.format(recipe=recipe) for recipe in recipe_docs)) If your use case is more complex and cannot be translated into a single expression, you can always download `databooks` and use it as a part of your script! + +## `databooks show` + +Sometimes we may want to quickly visualize the notebook. However, it can be a bit +cumbersome to start the Jupyter server, navigate to the file that we'd like inspect and +open it in the terminal. Moreover, by opening the file in Jupyter we may already modify +the notebook metadata. + +This is where `databooks show` comes in place. Simply specify the +path(s) to the notebook(s) to visualize them in the terminal. You can optionally pass +`pager` to open a scrollable window that won't actually print the notebook contents in +the terminal.