Permalink
Browse files

Update docs and tests

  • Loading branch information...
anjakefala committed Oct 6, 2017
1 parent 4bd8b88 commit a3612a974e481d6adae00d5724a1b795d05ae67d
View
@@ -22,9 +22,11 @@
- add zr/zc to go to row/col number
- F1/z? now launches man page
- gF1/gz? now launches commands sheet
- add `f` command to fill null values down current column
- add `f` command to fill empty cells with the content of a non-empty cell up the current column
- add Del/gDel to set value(s) to None
- remove TAB/Shift-TAB sheet cycling
- add z^ command to set current column name to current cell value
- add gz^ to set current column name to cell values in selected rows
- add 'z=' to show computed expression over current row
- z' adds cache to current column (gz' for all columns)
- `gh` moves cursor to leftmost column (instead of leftmost non-key column)
@@ -42,8 +44,6 @@
- add g prefix to ~!@#$%^ to operate on all 'selected rows' on Columns sheet (thus modifying column parameters on source sheet)
- [textsheet]
- add 'w' command on TextSheets to toggle wrap
- add z^ command to set current column name to current cell value
- add gz^ to set current column name to cell values in selected rows
- [cmdlog]
- editlog renamed to cmdlog
- cmdlog has a new format which minimises recordings of movement commands
View
@@ -27,8 +27,9 @@ Use `-f <filetype>` to force a particular filetype.
## Documentation
* Quick reference: `F1` (or `z?`) within `vd` will open the man page ([online version](http://visidata.org/man)), which has a list of all commands and options.
* [visidata.org](http://visidata.org) has [tours](http://visidata.org/tour) and a [Developer's Guide](http://visidata.org/dev)
* Quick reference: `F1` (or `z?`) within `vd` will open the [man page](http://visidata.org/man), which has a list of all commands and options.
* [visidata.org](http://visidata.org) has some [tours](http://visidata.org/tour)
* [VisiData Architecture for Developers](docs/architecture.rst)
## Support
@@ -46,7 +47,7 @@ The core `vdtui.py` can be used to quickly create efficient terminal workflows.
- [vgit](https://github.com/saulpw/vgit): a git interface
- [vdgalcon](https://github.com/saulpw/vdgalcon): a port of the classic game [Galactic Conquest](https://www.galcon.com)
Other workflows should be created as separate [apps using vdtui](docs/architecture.rst). These apps can be very small; for example, see the included [viewtsv](bin/viewtsv).
Other workflows should also be created as separate apps using vdtui. These apps can be very small; for example, see the included [viewtsv](bin/viewtsv).
## License
@@ -1,10 +1,9 @@
VisiData docs
=============
##VisiData docs
VisiData documentation is now hosted [here](http://visidata.org).
User Guides
-----------
## User Guides
* [man](http://visidata.org/man), VisiData's manpage
View
@@ -0,0 +1,4 @@
aha # ascii-html adaptor
markdown
pyyaml
tox
View
@@ -0,0 +1,15 @@
sheet col row keystrokes input comment
o sample_data/sample.tsv open file
sample Units 0 # set type of current column to int
sample Unit_Cost 0 % set type of current column to float
sample Total 0 % set type of current column to float
sample Total 0 C open Columns Sheet
sample_columns name 4 s select current row
sample_columns name 6 s select current row
sample_columns name 6 g+ sum add aggregator to selected source columns
sample_columns aggregators 6 e sum avg edit contents of current cell
sample_columns aggregators 6 q quit current sheet
sample Item 0 F open Frequency Table grouped on current column
sample_Item_freq Item 0 C open Columns Sheet
sample_Item_freq_columns name 0 [ sort ascending by current column
sample_Item_freq_columns name 0 q quit current sheet
@@ -0,0 +1,6 @@
Item avg_Total count sum_Total sum_Units
Binder 638.51 15 9577.65 722
Pencil 164.24 13 2135.14 716
Pen Set 595.70 7 4169.87 395
Pen 409.04 5 2045.22 278
Desk 566.67 3 1700.00 10
@@ -1,6 +1,6 @@
Item avg_Total sum_Total sum_Unit_Cost sum_Units
Binder 638.51 9577.65 172.86 722
Pencil 164.24 2135.14 36.07 716
Pen Set 595.70 4169.87 83.39 395
Pen 409.04 2045.22 55.95 278
Desk 566.67 1700.00 525.00 10
Item avg_Total count sum_Total sum_Unit_Cost sum_Units
Binder 638.51 15 9577.65 172.86 722
Pencil 164.24 13 2135.14 36.07 716
Pen Set 595.70 7 4169.87 83.39 395
Pen 409.04 5 2045.22 55.95 278
Desk 566.67 3 1700.00 525.00 10
@@ -1,12 +1,12 @@
Rep sum_Total adj_sum_Total
Jones 2363.04 2000.01
Jardine 2812.19 2812.19
Gill 1749.87 1749.87
Kivell 3109.44 3109.44
Sorvino 1283.61 1283.61
Andrews 438.37 438.37
Morgan 1387.77 1387.77
Parent 3102.30 3102.30
Smith 1641.43 1641.43
Thompson 1203.11 1203.11
Howard 536.75 536.75
Rep count sum_Total adj_sum_Total
Jones 8 2363.04 2363.04
Jardine 5 2812.19 2812.19
Gill 5 1749.87 1749.87
Kivell 4 3109.44 3109.44
Sorvino 4 1283.61 1283.61
Andrews 4 438.37 438.37
Morgan 3 1387.77 1387.77
Parent 3 3102.30 3102.30
Smith 3 1641.43 1641.43
Thompson 2 1203.11 1203.11
Howard 2 536.75 536.75
@@ -1,5 +1,5 @@
Item count percent histogram
Binder 13 35.14 **************************************************************************
Pencil 12 32.43 ********************************************************************
Pen Set 7 18.92 ****************************************
Pen 5 13.51 ****************************
Binder 13 35.14 **********
Pencil 12 32.43 *********
Pen Set 7 18.92 *****
Pen 5 13.51 ****
No changes.
@@ -1,25 +1,25 @@
OrderDate Revenue
2016-01 1,188.55
2016-02 719.37
2016-03 167.44
2016-04 448.65
2016-05 512.78
2016-06 988.50
2016-07 1,676.90
2016-08 174.65
2016-09 505.84
2016-10 827.08
2016-11 778.89
2016-12 1,269.69
2017-01 413.54
2017-02 1,324.96
2017-03 389.43
2017-04 610.38
2017-05 787.57
2017-06 625.00
2017-07 996.33
2017-08 1,830.90
2017-09 160.27
2017-10 1,157.49
2017-11 54.89
2017-12 2,018.78
OrderDate count Revenue
2016-01 2 1,188.55
2016-02 2 719.37
2016-03 1 167.44
2016-04 2 448.65
2016-05 2 512.78
2016-06 2 988.50
2016-07 2 1,676.90
2016-08 1 174.65
2016-09 2 505.84
2016-10 2 827.08
2016-11 2 778.89
2016-12 2 1,269.69
2017-01 1 413.54
2017-02 2 1,324.96
2017-03 2 389.43
2017-04 2 610.38
2017-05 2 787.57
2017-06 1 625.00
2017-07 2 996.33
2017-08 2 1,830.90
2017-09 2 160.27
2017-10 2 1,157.49
2017-11 1 54.89
2017-12 2 2,018.78
View
@@ -31,9 +31,9 @@ class SheetFreqTable(Sheet):
'Generate frequency-table sheet on currently selected column.'
commands = [
# redefine these commands only to change the helpstr
Command('t', 'toggle([cursorRow]); cursorDown(1)', 'toggle these entries in the source sheet'),
Command('s', 'select([cursorRow]); cursorDown(1)', 'select these entries in the source sheet'),
Command('u', 'unselect([cursorRow]); cursorDown(1)', 'unselect these entries in the source sheet'),
Command('t', 'toggle([cursorRow]); cursorDown(1)', 'toggle these entries in source sheet'),
Command('s', 'select([cursorRow]); cursorDown(1)', 'select these entries in source sheet'),
Command('u', 'unselect([cursorRow]); cursorDown(1)', 'unselect these entries in source sheet'),
Command(ENTER, 'vs = copy(source); vs.name += "_"+valueNames(cursorRow[0]); vs.rows=copy(cursorRow[1]); vd.push(vs)', 'push new sheet with only source rows for this value'),
# Command('w', 'options.histogram_even_interval = not options.histogram_even_interval; reload()', 'toggle histogram_even_interval option')
@@ -2,8 +2,6 @@
.so vdtui-cursor.inc
.Pp
.Bl -tag -width XXXXXXXXXXXXXXX -compact
.It Ic "zHome zEnd"
moves to top/bottom row and leftmost/rightmost column
.Pp
.It Ic " c" Ar regex
.No moves to the next column with name matching Ar regex
@@ -19,11 +17,6 @@ slides current row/column all the way to the left/bottom/top/right of sheet
.Pp
.It Ic "zh zj zk zl"
scrolls one left/down/up/right
.It Ic "zH zL"
moves cursor one page left/right
.It Ic "zs ze"
scrolls sheet to leftmost/rightmost column
.Pp
.It Ic " zt zz zb "
scrolls current row to top/center/bottom of screen
.El
@@ -35,6 +28,10 @@ scrolls current row to top/center/bottom of screen
.Pp
.It Ic "g^"
sets names of all visible columns to contents of current row
.It Ic "z^"
sets name of current column to contents of current cell
.It Ic "gz^"
sets name of current column to combined contents of current cell in selected rows
.Pp
.It Ic " '" Ns " (tick)"
adds a frozen copy of current column with all cells evaluated
@@ -47,7 +44,7 @@ opens a frozen copy of current sheet with all visible columns evaluated
.It Ic "\&;" Ar regex
.No adds new columns from capture groups of Ar regex Ns ; also requires example row
.It Ic "*" Ar regex Ns Sy / Ns Ar subst
.No replace Ar regex No with Ar subst Ns , which may include backreferences ( Ns Sy \e1 No etc)
.No replaces Ar regex No with Ar subst Ns , which may include backreferences ( Ns Sy \e1 No etc)
.El
.so vdtui-row.inc
.Ss Editing Rows and Cells
@@ -61,8 +58,8 @@ deletes current/all selected row(s) and writes to clipboard
copies current/all selected row(s) to clipboard
.It Ic " p"
pastes most recent clipboard rows after current row
.It Ic " ^Z"
undoes most recent delete
.It Ic " f"
fills null cells in current column with content of non-null cells up the current column
.
.so vdtui-editing.inc
.
@@ -203,6 +200,9 @@ replays contents of entire commandlog
groups by all key columns on source sheet
.It Ic zF
opens a one-line summary for selected rows
.It (sheet-specific commands)
.It Ic " s t u"
selects/toggles/unselects these entries in source sheet
.El
.
.Ss Describe Sheet (Shift-I)
@@ -224,8 +224,10 @@ opens copy of source sheet with rows described in current cell
.It (sheet-specific commands)
.El
.Bl -tag -width XXXXXXXXXXXXXXX -compact -offset XXX
.It Ic Enter
Opens sheet of source rows which comprise current pivot cell
.It Ic " Enter"
opens sheet of source rows which comprise current pivot row
.It Ic "zEnter"
opens sheet of source rows which comprise current pivot cell
.El
.Ss Melted Sheet (Shift-M)
.Bl -inset -compact
View
@@ -61,6 +61,8 @@ replays in batch mode (with no interface)
pauses/resumes replay
.It Sy Space
executes next row in replaying sheet
.It Sy ^K
cancels current replay
.El
.
.Ss GLOBAL COMMANDS
View
@@ -61,6 +61,8 @@ replays in batch mode (with no interface)
pauses/resumes replay
.It Sy Space
executes next row in replaying sheet
.It Sy ^K
cancels current replay
.El
.
.Ss GLOBAL COMMANDS
@@ -111,8 +113,6 @@ moves up/down the current column to the next selected row
.El
.Pp
.Bl -tag -width XXXXXXXXXXXXXXX -compact
.It Ic "zHome zEnd"
moves to top/bottom row and leftmost/rightmost column
.Pp
.It Ic " c" Ar regex
.No moves to the next column with name matching Ar regex
@@ -128,11 +128,6 @@ slides current row/column all the way to the left/bottom/top/right of sheet
.Pp
.It Ic "zh zj zk zl"
scrolls one left/down/up/right
.It Ic "zH zL"
moves cursor one page left/right
.It Ic "zs ze"
scrolls sheet to leftmost/rightmost column
.Pp
.It Ic " zt zz zb "
scrolls current row to top/center/bottom of screen
.El
@@ -167,6 +162,10 @@ sets type of current column to str/int/float/currency/date
.Pp
.It Ic "g^"
sets names of all visible columns to contents of current row
.It Ic "z^"
sets name of current column to contents of current cell
.It Ic "gz^"
sets name of current column to combined contents of current cell in selected rows
.Pp
.It Ic " '" Ns " (tick)"
adds a frozen copy of current column with all cells evaluated
@@ -179,7 +178,7 @@ opens a frozen copy of current sheet with all visible columns evaluated
.It Ic "\&;" Ar regex
.No adds new columns from capture groups of Ar regex Ns ; also requires example row
.It Ic "*" Ar regex Ns Sy / Ns Ar subst
.No replace Ar regex No with Ar subst Ns , which may include backreferences ( Ns Sy \e1 No etc)
.No replaces Ar regex No with Ar subst Ns , which may include backreferences ( Ns Sy \e1 No etc)
.El
.Ss Row Selection
.
@@ -213,6 +212,8 @@ sorts ascending/descending by all key columns
opens duplicate sheet with only selected rows
.It Ic "g\&""
opens duplicate sheet with all rows
.It Ic "gz\&""
opens duplicate sheet with deepcopy of selected rows
.El
.Ss Editing Rows and Cells
.
@@ -225,8 +226,8 @@ deletes current/all selected row(s) and writes to clipboard
copies current/all selected row(s) to clipboard
.It Ic " p"
pastes most recent clipboard rows after current row
.It Ic " ^Z"
undoes most recent delete
.It Ic " f"
fills null cells in current column with content of non-null cells up the current column
.
.
.It Ic " e" Ar text
@@ -295,10 +296,14 @@ opens duplicate sheet with a random population subset of
.
.It Ic Shift-V
views contents of current cell in a new sheet
.El
.Bl -tag -width XXXXXXXXXXXXXXX -compact -offset xxx
.It Ic "w"
toggles text wrap for TextSheets
.El
.Bl -tag -width XXXXXXXXXXXXXXX -compact
.It Ic " ^^ (Ctrl-^)"
jumps to previous sheet (swaps with current sheet)
.It Ic " ` (backtick)"
opens source of current sheet
.It Ic " ^E"
views traceback for most recent error
.It Ic "g^E"
@@ -313,7 +318,7 @@ shows cursor position and bounds of current sheet on status line
shows version information on status line
.It Ic " ^R"
reloads current sheet
.It Ic "g^R"
.It Ic "z^R"
clears cache for current column
.
.El
@@ -433,6 +438,9 @@ replays contents of entire commandlog
groups by all key columns on source sheet
.It Ic zF
opens a one-line summary for selected rows
.It (sheet-specific commands)
.It Ic " s t u"
selects/toggles/unselects these entries in source sheet
.El
.
.Ss Describe Sheet (Shift-I)
@@ -454,8 +462,10 @@ opens copy of source sheet with rows described in current cell
.It (sheet-specific commands)
.El
.Bl -tag -width XXXXXXXXXXXXXXX -compact -offset XXX
.It Ic Enter
Opens sheet of source rows which comprise current pivot cell
.It Ic " Enter"
opens sheet of source rows which comprise current pivot row
.It Ic "zEnter"
opens sheet of source rows which comprise current pivot cell
.El
.Ss Melted Sheet (Shift-M)
.Bl -inset -compact
Oops, something went wrong.

0 comments on commit a3612a9

Please sign in to comment.