A curses command-line CSV and list (tabular data) viewer
Project description
View a CSV file in a spreadsheet-like display.
Posted by Scott Hansen <firecat4153@gmail.com>
Original code forked from: http://www.amk.ca/files/simple/tabview.txt
Contributed by A.M. Kuchling <amk@amk.ca>
Other Contributors:
Matus Gura <matus.gura@gmail.com>
Nathan Typanski <ntypanski@gmail.com>
scls19fr <scls@pc9.home>
Yuri D’Elia <yuri.delia@eurac.edu>
The highlighted position is shown in the top-left corner of the screen; next to it are shown the contents of that cell.
Features:
Python 2.7+ and 3.x
Spreadsheet-like view for easily visualizing tabular data
Vim-like navigation (h,j,k,l, g(top), G(bottom), 12G goto line 12, m - mark, ‘ - goto mark, etc.)
Toggle persistent header row
Sort ascending or descending by any column. Dynamically change column width and gap
Sort in ‘natural order’ to improve numeric sorting
Full-text search, n and p to cycle between search results
‘Enter’ to view the full cell contents
Yank cell contents to the clipboard
File can be reloaded in-place if the data changes.
F1 or ? for keybindings
Can also use from python command line to visualize any tabular data (e.g. list-of-lists)
See the screenshots directory for some pictures.
Requires:
Python 2.7+ or 3.x
Xsel or xclip (Optional - only required for ‘yank’ to clipboard)
Installation:
pip install tabview OR
# python setup.py install OR
$ python setup.py install --user OR
Usage:
From command line: tabview <filename>
From python command line to view an object
import tabview as t a = [["a","b","c"], ["d","e","f"]] t.view(a)
From python command line to view a file
import tabview as t t.view(fn=<filename>)
Tests:
python tests/test_tabview.py
Keybindings:
F1 or ? |
Show this list of keybindings |
Cursor keys or h,j,k,l |
Move the highlighted cell, scrolling if required. |
Q or q |
Quit |
Home, 0 or ^ |
Move to the start of this line |
End or $ |
Move to the end of this line |
[num]| |
Goto column <num>, or first column if num not given |
PgUp/PgDn or J/K |
Move a page up or down |
H,L |
Page left or right |
g |
Goto top of current column |
[num]G |
Goto line <num> or bottom of current column if num not given |
Insert or m |
Memorize this position |
Delete or ‘ |
Return to memorized position (if any) |
Enter |
View full cell contents in pop-up window. |
/ |
Search |
n |
Next search result |
p |
Previous search result |
t |
Toggle fixed header row |
< > |
Decrease/Increase column width |
- + |
Decrease/Increase column gap |
s |
Sort the table by the current column (ascending) |
S |
Sort the table by the current column (descending) |
a |
‘Natural Sort’ the table (ascending) |
A |
‘Natural Sort’ the table (descending) |
r |
Reload file/data. Also resets sort order |
y |
Yank cell contents to the clipboard (requires xsel or xclip) |
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 Distribution
Built Distribution
Hashes for tabview-1.3.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 266796f4285d7e9819782b6e1f873c504cc44486835cc87c9ae15ebb0346191d |
|
MD5 | 330e75ff66c48d52e97a69b0b60423c4 |
|
BLAKE2b-256 | e29cd48991991593868b9432e955b008ca2ab93f5fe1f494efb2469fddb792c1 |