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

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.2.tar.gz (3.8 MB view details)

Uploaded Source

Built Distribution

ncdump_rich-0.5.2-py2.py3-none-any.whl (18.7 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: ncdump_rich-0.5.2.tar.gz
  • Upload date:
  • Size: 3.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.8

File hashes

Hashes for ncdump_rich-0.5.2.tar.gz
Algorithm Hash digest
SHA256 8ba4cc32bda110d966c691750105291c434ec1722c3517776ee6dea4ad6e509d
MD5 7df4335b38b3feb4ec29c3cdc10a5084
BLAKE2b-256 91377020d21d67373ca33829ef79da8e93aa976c5799668c399a204ad2a41e05

See more details on using hashes here.

File details

Details for the file ncdump_rich-0.5.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for ncdump_rich-0.5.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a2760dd9b9eabf1640e1fce06b88dfe8033541a13dd13eb1eea37a7424eae318
MD5 ef671973cf19193f47832dbcd0b1f2ad
BLAKE2b-256 ceb8995a2f485ea49aa14a4dc136e88f98f40dc76ae28deec4e99086c1103563

See more details on using hashes here.

Supported by

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