Skip to main content

Rich NcDump

Project description

PyPI PyPI Downloads Status Python Version License Read the documentation at https://ncdump-rich.readthedocs.io/ Tests Codecov pre-commit Black Ruff

Features

This project provides an easy way of previewing netCDF files with nicely formatted text in your terminal. The information extracted from the .nc files are obtained in a similar way to this example, with some modifications. The source code used on the website can be downloaded as netcdf_example.py with:

$ curl -O http://schubert.atmos.colostate.edu/~cslocum/code/netcdf_example.py

To make the output more readable it is formatted using the python library rich.

Requirements

The project depends on the python packages click, netCDF4 and rich. Installation via pip or pipx ensures that all dependencies are installed correctly.

Installation

You can install Rich NcDump via pip from PyPI:

$ pip install ncdump-rich

or perhaps even better via pipx:

$ pipx install ncdump-rich

Usage

Please see the Command-line Reference for details.

https://raw.githubusercontent.com/engeir/ncdump-rich/example-image/latest.png

Examples

Use the program as a previewer for .nc files, for example through stpv. My own fork provides additional support for previewing .nc files using this project.

Preview in lf

./demo/lf-demo.png

Similarly you can get preview of .nc files in nnn by including an option for the extension nc in the preview-tui plugin.

nc) fifo_pager ncdump-rich "$1" ;;

Preview in nnn

./demo/nnn-demo.png

Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

License

Distributed under the terms of the GPL 3.0 license, Rich NcDump is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Credits

This project was generated from @cjolowicz’s Hypermodern Python Cookiecutter template.

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

ncdump_rich-0.5.4.tar.gz (33.8 kB view details)

Uploaded Source

Built Distribution

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

ncdump_rich-0.5.4-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file ncdump_rich-0.5.4.tar.gz.

File metadata

  • Download URL: ncdump_rich-0.5.4.tar.gz
  • Upload date:
  • Size: 33.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for ncdump_rich-0.5.4.tar.gz
Algorithm Hash digest
SHA256 4655f645547fe140167c0ec0ac07d83e8d0649211d4cebe6c80e757e50c85282
MD5 77910bc1e4d90bffc5c4ef7129aae01b
BLAKE2b-256 7ba38fb0439e14908993e8c3639f3bd5feed5398517fb8f15d6359fde12e06f8

See more details on using hashes here.

File details

Details for the file ncdump_rich-0.5.4-py3-none-any.whl.

File metadata

  • Download URL: ncdump_rich-0.5.4-py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for ncdump_rich-0.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1e429909d10daa4a5c546d41e561e54510276de4f949c1697e544694aa2a80c1
MD5 0644e18ecf7772516736cfc2bd9002da
BLAKE2b-256 979241238e04b0866ea2eab93f78a1729ac8ed32b87f825fca27fe5b2192d8eb

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