Unix commands for Jupyter notebooks!
Project description
nbcommands
nbcommands bring the goodness of Unix commands to Jupyter notebooks.
Installation
You can simply use pip to install nbcommands:
$ pip install nbcommands
Usage
nbcommands gives you the following commands to interact with your Jupyter notebooks.
-
nbtouch
: Update the access and modification times of each Jupyter notebook to the current time.$ nbtouch notebook1.ipynb notebook2.ipynb
-
nbgrep
: Search for a pattern in Jupyter notebooks.$ nbgrep "os" notebook.ipynb
-
nbhead
: Print the first 5 cells of a Jupyter notebook to standard output.$ nbhead notebook.ipynb
Note: You can also specify the number of cells you want to print using the
-n
option.$ nbhead -n 10 notebook.ipynb
-
nbtail
: Print the last 5 cells of a Jupyter notebook to standard output.$ nbtail notebook.ipynb
Note: You can also specify the number of cells you want to print using the
-n
option.$ nbtail -n 10 notebook.ipynb
-
nbcat
: Concatenate Jupyter notebooks to standard output.$ nbcat notebook.ipynb notebook2.ipynb
Note: You can create a new notebook by concatenating multiple notebooks using the
-o
option.$ nbcat notebook1.ipynb notebook2.ipynb -o notebook3.ipynb
Future enhancements:
nbblack
: Blacken each cell in Jupyter notebooks.nbstrip
: Strip outputs from Jupyter notebooks.nbecho
: Add a code cell to a Jupyter notebook.nbdiff
: Find the diff between two Jupyter notebooks.nbtime
: Run and time a Jupyter notebook.nbwc
: Print word count for a Jupyter notebook.
Versioning
nbcommands uses Semantic Versioning. For the available versions, see the tags on this repository.
License
This project is licensed under the Apache License, see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for nbcommands-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85285d01774d0f0b8531312a49b3d4815990f629920f0ca3de7207dec156e70a |
|
MD5 | 7a0391e704db90dbae5081b4d4a1336c |
|
BLAKE2b-256 | e8b9acd78808832e9af9acbcef374fe79bb344e1acdbde860b8045517c994b12 |