nbcommands bring the goodness of Unix commands to Jupyter notebooks.

Overview

nbcommands

image image image image

nbcommands bring the goodness of Unix commands to Jupyter notebooks.

Installation

You can simply use pip to install nbcommands:

$ pip install nbcommands

or conda:

$ conda install -c conda-forge nbcommands

Usage

nbcommands installs the following commands which let you interact with your Jupyter notebooks without spinning up a notebook server.

  • nbtouch: Update the access and modification times of each Jupyter notebook to the current time.

      $ nbtouch notebook1.ipynb notebook2.ipynb

    nbtouch

  • nbgrep: Search for a pattern in Jupyter notebooks.

      $ nbgrep "os" notebook1.ipynb notebook2.ipynb
      $ nbgrep "os" directory/

    nbgrep

  • nbhead: Print the first 5 cells of a Jupyter notebook to standard output.

      $ nbhead notebook1.ipynb

    nbhead

    Note: You can also specify the number of cells you want to print using the -n option.

      $ nbhead -n 10 notebook1.ipynb
  • nbtail: Print the last 5 cells of a Jupyter notebook to standard output.

      $ nbtail notebook2.ipynb

    nbtail

    Note: You can also specify the number of cells you want to print using the -n option.

      $ nbtail -n 10 notebook2.ipynb
  • nbcat: Concatenate Jupyter notebooks to standard output.

      $ nbcat notebook1.ipynb notebook2.ipynb

    nbcat

    Note: You can create a new notebook by concatenating multiple notebooks using the -o option.

      $ nbcat notebook1.ipynb notebook2.ipynb -o notebook3.ipynb
  • nbless: Print a Jupyter notebook using a pager program.

      $ nbless notebook1.ipynb

    nbless

And some non-Unix goodness,

  • nbblack: Blacken Jupyter notebooks.

      $ nbblack notebook1.ipynb notebook2.ipynb

    nbblack


Planned enhancements:

  • nbstrip: Strip outputs from Jupyter notebooks.
  • nbdiff: Find the diff between two Jupyter notebooks.
  • nbecho: Add a code cell to a Jupyter notebook.
  • nbedit: Interactively edit a Jupyter notebook.
  • 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.

Owner
Vinayak Mehta
Working on open source tools
Vinayak Mehta
🌍 Harness the power of whatsmydns from the command-line.

chkdns Harness the power of whatsmydns from the command-line. Installing with pip pip install chkdns Run chkdns --host github.com Alternatively you ca

Craig Gumbley 3 Oct 29, 2022
GDBIGtools: A command line tools for GDBIG varaints browser

GDBIGtools: A command line tools for GDBIG varaints browser Introduction Born in Guangzhou Cohort Study Genome Research Database is based on thousands

广州市出生队列基因组学研究(The genomics study of BIGCS) 7 Sep 14, 2022
touch command for Windows

Touch touch command for Windows Setup: Clone the repository git clone https://github.com/g-paras/touch.git cd touch Install touch module python setup.

Paras Gupta 5 Jan 04, 2022
My dotfiles -My configuration, with installations steps.

.dotfiles My configuration, with installations steps. Installation Oh My ZSH Install with this command: sh -c "$(curl -fsSL https://raw.githubusercont

Luca Angioloni 4 Dec 14, 2022
Easily handle day to day CLI operation via Python instead of regular Bash programs.

pz Ever wished to use Python in Bash? Would you choose the Python syntax over sed, awk, ...? Should you exactly know what command would you use in Pyt

CZ.NIC 697 Jan 03, 2023
A command line tool to query source code from your current Python env

wxc wxc (pronounced "which") allows you to inspect source code in your Python environment from the command line. It is based on the inspect module fro

Clément Robert 13 Nov 08, 2022
Present - A terminal-based presentation tool with colors and effects.

present A terminal-based presentation tool with colors and effects. You can also play a codio (pre-recorded code block) on a slide. present is built o

Vinayak Mehta 4.2k Jan 03, 2023
Key-control - A tool for add keys to your Termux app

Key-Control Is a tool for add keys to your Termux app. Cara Penginstalan $ pkg u

Beereva.id 1 Feb 14, 2022
Bryce Geiser 4 Aug 04, 2022
Euporie is a text-based user interface for running and editing Jupyter notebooks

Euporie is a text-based user interface for running and editing Jupyter notebooks

781 Jan 01, 2023
GoSearch for anything from your terminal

GoSearch for anything from your terminal Requirements pip install beautifulsoup4

Malik Mouhiidine 1 Oct 02, 2021
🎈 A Mini CLI-based Operating System simulator

Mini OS Simulator Summary 🎈 A Mini CLI-based Operating System simulator, well, not really. It simulates a file system with songs and movies and stuff

Jaiyank S. 3 Feb 14, 2022
Python wrapper and CLI utility to render LaTeX markup and equations as SVG using dvisvgm and svgo.

latex2svg Python wrapper and CLI utility to render LaTeX markup and equations as SVG using dvisvgm and svgo. Based on the original work by Tino Wagner

Matthias C. Hormann 4 Feb 18, 2022
A command line tool (and Python library) for archiving Twitter JSON

A command line tool (and Python library) for archiving Twitter JSON

Documenting the Now 1.3k Dec 28, 2022
Dark powered asynchronous completion framework for neovim/Vim8

deoplete.nvim Dark powered asynchronous completion framework for neovim/Vim8 Note: The development of this plugin is finished. Accepts minor patches a

Shougo 5.9k Dec 30, 2022
Tiny command-line utility for mapping broken keys to other positions.

brokenkey Tiny command-line utility for mapping broken keys to other positions. Installation Clone this repository using git: git clone https://github

0 Oct 04, 2021
Modern line-oriented terminal emulator without support for TUIs.

Modern line-oriented terminal emulator without support for TUIs.

10 Jun 12, 2022
Un module simple pour demander l'accord de l'utilisateur dans une CLI.

Demande de confirmation utilisateur pour CLI Présentation ask_lib est un module pour le langage Python proposant une seule fonction; ask(). Le but pri

CallMePixelMan 7 May 09, 2022
A minimalist Vim plugin manager.

A minimalist Vim plugin manager. Pros. Easy to set up: Single file. No boilerplate code required. Easy to use: Concise, intuitive syntax Super-fast pa

Junegunn Choi 30.2k Jan 08, 2023
Simple Digital Ocean CLI by python.

Simple Digital Ocean CLI by python.

Chiro 2 Jan 01, 2023