Skip to main content

View jupyter notebooks (with images) from the command line

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

NBTui

demo

An interactive viewer for Jupyter notebooks from the command line.

It should work for any terminal, but you will only be able to view plots when using Kitty, or any terminal that implements the Kitty graphics protocol.

This is a work in progress, and things may break. Bug reports and general constructive criticism about implementation details are welcome.

Install

pip install nbtui

nbtui {NOTEBOOK}.ipynb

Or, you can directly pull this folder from master (this is recommended, since there are most likely still going to be some issues):

python -m nbtui {NOTEBOOK}.ipynb

Features

  • Vim-style keybindings for scrolling and movement
  • Regex searching
  • View images and plots
  • Automatic file-change detection and refresh (somewhat experimental)

Usage

Movement and scrolling is based on vim keybindings - j to scroll down, k to scroll up, C-D to scroll down by 15 lines, C-U to scroll up by 15 lines. Press g and G to go to the beginning and end of the notebook, respectively, press / to start searching, and press q to close.

NOTE: currently, displaying images is done in a quite inefficient way. I plan to update this logic soon to take advantage of new features from the Kitty graphics protocol, once Kitty version 0.19.3 has been out for a little while longer.

In the meantime, prefer using C-D and C-U to scrolling when many images are on the screen, to avoid large slowdowns.

Planned features

For obvious reasons, rich output formats like HTML, PDF, Javascript, videos, audio, and hyperlinks are not planned to be implemented.

  • Support other display data formats
    • Plot backends besides just png
    • Latex in markdown cells
    • Linking of images (JPEG, SVG)
    • Progress bars
  • Better handling of multiple outputs for a single cell. We should show these things in a single large output cell instead of breaking it up.
  • Better configurability. Users should be able to configure things like themes for syntax highlighting, padding, etc.
  • Fix slow scrolling with images by utilizing Kitty placement ids
  • Folding

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nbtui-0.0.3.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nbtui-0.0.3-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file nbtui-0.0.3.tar.gz.

File metadata

  • Download URL: nbtui-0.0.3.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

File hashes

Hashes for nbtui-0.0.3.tar.gz
Algorithm Hash digest
SHA256 6fb3a698a10dafef9fafb14a9d128af771a02447a4c2fc73f90888946f65fc24
MD5 e5f92fb8d7931b47ead080df4fc5fff0
BLAKE2b-256 83f494df321b75a28f28c03aa83f48dbc9f0a4eb0743968559683526b5867fe5

See more details on using hashes here.

File details

Details for the file nbtui-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: nbtui-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

File hashes

Hashes for nbtui-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6e825264cbb2ad69df16d9fc414cce55f24b8a2b709f2f7ac487ebb663d0078f
MD5 feeb9e38e5320a8fde48bf3b8f5aa3f9
BLAKE2b-256 0d6d186fe1896a89130ae15c4c4bcc0ddc35a9c1fe05dd28bd53ad69a35280fd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page