-
-
Notifications
You must be signed in to change notification settings - Fork 278
/
vd.1
824 lines (821 loc) · 26.2 KB
/
vd.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
.Dd October 5, 2017
.Dt vd \&1 "Quick Reference Guide"
.Os Linux/MacOS
.
.\" Long option with arg: .Lo f filetype format
.\" Long flag: .Lo f filetype
.de Lo
.It Cm -\\$1 Ns , Cm --\\$2 Ns = Ns Ar \\$3
..
.de Lf
.It Cm -\\$1 Ns , Cm --\\$2
..
.Sh NAME
.
.Nm VisiData
.Nd a terminal utility for exploring and arranging tabular data
.
.Sh SYNOPSIS
.
.Nm vd
.Op Ar options
.Op Ar input No ...
.
.Nm vd
.Op Ar options
.Cm --play Ar cmdlog
.Op Cm -w Ar waitsecs
.Op Cm --batch
.Op Cm -o Ar output
.Op Ar field Ns Cm = Ns Ar value No ...
.
.Sh DESCRIPTION
.Nm VisiData
is a multipurpose tool for exploring, cleaning, editing, and restructuring data.
Rows can be selected, filtered, and grouped; columns can be rearranged, transformed, and derived via regex or Python expressions; workflows can be saved, documented, and replayed.
.Nm VisiData No is built on the Sy vdtui No platform.
.
.Ss REPLAY MODE
.Bl -tag -width XXXXXXXXXXXXXXXXXXXXXX -compact
.Lo p play cmdlog
.No replays a saved Ar cmdlog No within the interface
.
.Lo w replay-wait seconds
.No waits Ar seconds No between commands
.
.Lf b batch
replays in batch mode (with no interface)
.
.Lo o output file
.No saves final visible sheet to Ar file No as .tsv
.
.It Sy --replay-movement= Ns Ar bool
.No toggles Sy --play No to move cursor cell-by-cell
.It Ar field Ns Cm = Ns Ar value
.No replaces \&"{ Ns Ar field Ns }\&" in Ar cmdlog No contents with Ar value
.El
.
.Ss Commands During Replay
.Bl -tag -width XXXXXXXXXXXXXXXXXXX -compact -offset XXX
.It Sy ^U
pauses/resumes replay
.It Sy Tab
executes next row in replaying sheet
.It Sy ^K
cancels current replay
.El
.
.Ss GLOBAL COMMANDS
In most cases, commands that affect 'selected rows' will affect all rows if no rows are selected.
.Pp
.Ss Keystrokes For The Cautious
.Bl -tag -width XXXXXXXXXXXXXXX -compact
.It Ic " F1 z?"
views this man page
.It Ic "gF1 gz?"
views all commands available on current sheet
.It Ic ^Q
aborts program immediately
.It Ic ^C
cancels user input or aborts all async threads on current sheet
.It Ic " q"
quits current sheet
.It Ic "gq"
quits all sheets (clean exit)
.El
.Ss "Cursor Movement"
.
.Bl -tag -width XXXXXXXXXXXXXXX -compact
.
.It Ic "Arrow PgUp Home"
moves as expected
.It Ic " h j k l"
moves left/down/up/right
.It Ic "gh gj gk gl"
moves all the way to the left/bottom/top/right
.It Ic " G gg"
moves all the way to the bottom/top
.It Ic "^B ^F"
scrolls one page back/forward
.Pp
.It Ic " / ?" Ar regex
.No searches for Ar regex No forward/backward in current column
.It Ic "g/ g?" Ar regex
.No searches for Ar regex No forward/backward over all visible columns
.It Ic " n N"
moves to next/previous match from last search
.Pp
.It Ic " < >"
moves up/down the current column to the next value
.It Ic " { }"
moves up/down the current column to the next selected row
.
.El
.Pp
.Bl -tag -width XXXXXXXXXXXXXXX -compact
.Pp
.It Ic " c" Ar regex
.No moves to the next column with name matching Ar regex
.It Ic " r" Ar regex
.No moves to the next row with key matching Ar regex
.It Ic "zc zr" Ar number
.No moves to given column/row Ar number
.Pp
.It Ic " H J K L"
slides current row/column left/down/up/right
.It Ic "gH gJ gK gL"
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 " zt zz zb "
scrolls current row to top/center/bottom of screen
.El
.
.Ss Column Manipulation
.
.Bl -tag -width XXXXXXXXXXXXXXX -compact
.
.It Ic " _" Ns " (underscore)"
adjusts width of current column
.It Ic "g_"
adjusts width of all visible columns
.It Ic "z_" Ar number
.No adjusts width of current column to Ar number
.Pp
.It Ic " -" Ns " (hyphen)"
hides current column (to unhide, go to
.Sy C Ns olumns sheet and Sy e Ns dit its width)
.It Ic "z-" Ns
reduces width of current column by half
.Pp
.It Ic \&! Ns
pins current column on the left as a key column
.It Ic "~ # % $ @"
sets type of current column to untyped/int/float/currency/date
.It Ic " ^"
edits name of current column
.It Ic " g^"
sets names of all unnamed visible columns to contents of selected rows (or 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 column for selected rows (or current row)
.Pp
.It Ic " =" Ar expr
.No creates new column from Python Ar expr Ns , with column names as variables
.It Ic " g=" Ar expr
.No sets current column for selected rows to result of Python Ar expr
.It Ic "gz=" Ar expr
.No sets current column for selected rows to the items in result of Python sequence Ar expr
.It Ic " z=" Ar expr
.No sets current cell to result of evaluated Python Ar expr No on current row
.El
.Bl -tag -width XXXXXXXXXXXXXXX -compact
.It Ic " '" Ns " (tick)"
adds a frozen copy of current column with all cells evaluated
.It Ic "g'"
opens a frozen copy of current sheet with all visible columns evaluated
.It Ic "z' gz'"
adds/resets cache for current/all visible column(s)
.Pp
.It Ic "\&:" Ar regex
.No adds new columns from Ar regex No split; number of columns determined by example row at cursor
.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 replaces Ar regex No with Ar subst Ns , which may include backreferences ( Ns Sy \e1 No etc)
.El
.Ss Row Selection
.
.Bl -tag -width XXXXXXXXXXXXXXX -compact
.
.It Ic " s t u"
selects/toggles/unselects current row
.It Ic "gs gt gu"
selects/toggles/unselects all rows
.It Ic " | \e\ " Ns Ar regex
.No selects/unselects rows matching Ar regex No in current column
.It Ic "g| g\e\ " Ns Ar regex
.No selects/unselects rows matching Ar regex No in any visible column
.It Ic " \&," Ns " (comma)"
selects rows matching current cell in current column
.It Ic "g\&,"
selects rows matching this row in all visible columns
.
.El
.
.
.Ss Row Sorting/Filtering
.
.Bl -tag -width XXXXXXXXXXXXXXX -compact
.
.It Ic " [ ]"
sorts ascending/descending by current column
.It Ic "g[ g]"
sorts ascending/descending by all key columns
.It Ic " \&""
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
.
.Bl -tag -width XXXXXXXXXXXXXXX -compact
.It Ic " a"
appends a blank row
.It Ic " ga" Ar number
.No appends Ar number No blank rows
.It Ic " d gd"
deletes current/all selected row(s) and moves to clipboard
.It Ic " y gy"
copies current/all selected row(s) to clipboard
.It Ic " zy"
copies current cell to clipboard
.It Ic " p P"
pastes clipboard rows after/before current row
.It Ic " zp gzp"
sets contents of current column for current/all selected row(s) to last clipboard value
.It Ic " f"
fills null cells in current column with contents of non-null cells up the current column
.
.
.It Ic " e" Ar text
edits contents of current cell
.It Ic " ge" Ar text
.No sets contents of current column for selected rows to Ar text
.It Ic " zd Del"
.No sets contents of current cell to Sy None
.It Ic "gzd gDel"
.No sets contents of cells in current column to Sy None No for selected rows
.
.El
.
.Ss " Commands While Editing Input"
.Bl -tag -width XXXXXXXXXXXXXXX -compact -offset XXX
.It Ic "Enter ^C"
accepts/aborts input
.It Ic ^O
opens external $EDITOR to edit contents
.It Ic ^R
reloads initial value
.It Ic "^A ^E"
moves to beginning/end of line
.It Ic "^B ^F"
moves back/forward one character
.It Ic "^H ^D"
deletes previous/current character
.It Ic ^T
transposes previous and current characters
.It Ic "^U ^K"
clears from cursor to beginning/end of line
.It Ic "Backspace Del"
deletes previous/current character
.It Ic Insert
toggles insert mode
.It Ic "Up Down"
sets contents to previous/next in history
.It Ic "Tab Shift-Tab"
autocompletes input (when available)
.
.El
.
.Ss Data Toolkit
.Bl -tag -width XXXXXXXXXXXXXXX -compact
.It Ic " o" Ar input
opens
.Ar input No in Sy VisiData
.It Ic "^S" Ar filename
.No saves current sheet to Ar filename No in format determined by extension (default .tsv)
.It Ic "^D" Ar filename.vd
.No saves CommandLog to Ar filename.vd No file
.It Ic "A" Ar number
.No opens new blank sheet with Ar number No columns
.It Ic "R" Ar number
opens duplicate sheet with a random population subset of
.Ar number No rows
.Pp
.It Ic " +" Ar aggregator
.No adds Ar aggregator No to current column (see Sy "Frequency Table" Ns )
.It Ic "z+" Ar aggregator
.No displays result of Ar aggregator No over values in selected rows for current column
.Pp
.El
.Ss Data Visualization
.Bl -tag -width XXXXXXXXXXXXX -compact
.It Ic " ." No (dot)
.No plots current numeric column vs key columns. Numeric key column is used for the x-axis; categorical key column values determine color.
.It Ic "g."
.No plots a graph of all visible numeric columns vs key columns.
.Pp
.El
.No If rows on the current sheet represent plottable coordinates (as in .shp or vector .mbtiles sources),
.Ic " ." No plots the current row, and Ic "g." No plots all selected rows (or all rows if none selected).
.Ss " Canvas-specific Commands"
.Bl -tag -width XXXXXXXXXXXXXXXXXX -compact -offset XXX
.It Ic " + -"
increases/decreases zoomlevel, centered on cursor
.It Ic " _" No (underscore)
zooms to fit full extent
.It Ic " s t u"
selects/toggles/unselects rows on source sheet contained within canvas cursor
.It Ic "gs gt gu"
selects/toggles/unselects rows visible on screen
.It Ic " Enter"
opens sheet of source rows contained within canvas cursor
.It Ic "gEnter"
opens sheet of source rows visible on screen
.It Ic " 1" No - Ic "9"
toggles display of layers
.It Ic "^L"
redraws all pixels on canvas
.It Ic " w"
.No toggles Ic show_graph_labels No option
.It Ic "mouse scrollwheel"
zooms in/out of canvas
.It Ic "left click-drag"
sets canvas cursor
.It Ic "right click-drag"
scrolls canvas
.El
.Ss Other Commands
.
.Bl -tag -width XXXXXXXXXXXXXXX -compact
.
.It Ic V
views contents of current cell in a new TextSheet
.El
.Bl -tag -width XXXXXXXXXXXXXXX -compact -offset xxx
.It Ic "v"
toggles visibility (text wrap on TextSheet, legends/axes on Graph)
.El
.Bl -tag -width XXXXXXXXXXXXXXX -compact
.It Ic " ^^" No (Ctrl-^)
jumps to previous sheet (swaps with current sheet)
.It Ic " ^E"
views traceback for most recent error
.It Ic "g^E"
views traceback for most recent errors
.It Ic "z^E"
views traceback for error in current cell
.It Ic " ^L"
refreshes screen
.It Ic " ^G"
shows cursor position and bounds of current sheet on status line
.It Ic " ^V"
shows version information on status line
.It Ic " ^R"
reloads current sheet
.It Ic "z^R"
clears cache for current column
.It Ic " ^Z"
suspends VisiData process
.It Ic " ^P"
.No opens Sy Status History
.
.El
.Pp
.Bl -tag -width XXXXXXXXXXXXXXX -compact
.It Ic " ^Y z^Y g^Y"
opens current row/cell/sheet as Python object
.It Ic " ^X" Ar expr
.No evaluates Python Ar expr No and opens result as python object
.It Ic "z^X" Ar expr
.No evaluates Python Ar expr No on current row and shows result on status line
.It Ic "g^X" Ar stmt
.No executes Python Ar stmt No in the global scope
.El
.
.Ss Internal Sheets List
.Bl -tag -width Xx -compact
.It " "
.It Sy Metasheets
.It Sy " \&."
.Sy Columns Sheet No (Shift-C) " edit column properties"
.It Sy " \&."
.Sy Sheets Sheet No (Shift-S) " jump between sheets or join them together"
.It Sy " \&."
.Sy Options Sheet No (Shift-O) " edit all configurable options"
.It Sy " \&."
.Sy Commandlog No (Shift-D) " modify and save commands for replay"
.It Sy " \&."
.Sy Error Sheet No (^E) " view last error"
.It Sy " \&."
.Sy Status History No (^P) " view history of status messages"
.It Sy " \&."
.Sy Threads Sheet No (^T) " view, cancel, and profile asynchronous threads"
.Pp
.It Sy Derived Sheets
.It Sy " \&."
.Sy Frequency Table No (Shift-F) " group rows by column value, with aggregations of other columns"
.It Sy " \&."
.Sy Describe Sheet No (Shift-I) " view summary statistics for each column"
.It Sy " \&."
.Sy Pivot Table No (Shift-W) " group rows by key and summarize current column"
.It Sy " \&."
.Sy Melted Sheet No (Shift-M) " unpivot non-key columns into variable/value columns"
.El
.Ss METASHEETS
.Ss Columns Sheet (Shift-C)
.Bl -inset -compact
.It Properties of columns on the source sheet can be changed with standard editing commands ( Ns Sy e ge g= Del Ns ) on the Sy Columns Sheet Ns . Multiple aggregators can be set by listing them (separated by spaces) in the aggregators column. The 'g' commands affect the selected rows, which are actually the literal columns on the source sheet.
.It (global commands)
.El
.Bl -tag -width XXXXXXXXXXXXXXX -compact -offset XXX
.It Ic gC
.No opens Sy Columns Sheet No with all columns from all sheets
.It (sheet-specific commands)
.El
.Bl -tag -width XXXXXXXXXXXXXXX -compact -offset XXX
.It Ic " &"
adds column from concatenating selected source columns
.It Ic " !"
pins current column on the left as a key column on source sheet
.It Ic "g!"
pins selected columns on the left as key columns on source sheet
.It Ic "g+"
adds aggregator to selected source columns
.It Ic "g_" No (underscore)
adjusts widths of selected columns on source sheet
.It Ic "g-" No (hyphen)
hides selected columns on source sheet
.It Ic " ~ # % $ @"
sets type of current column on source sheet to str/int/float/currency/date
.It Ic "g~ g# g% g$ g@"
sets type of selected columns on source sheet to str/int/float/currency/date
.It Ic "z~ gz~"
sets type of current/selected column(s) on source sheet to anytype
.It Ic " Enter"
.No opens a Sy Frequency Table No sheet grouped on column referenced in current row
.El
.
.Ss Sheets Sheet (Shift-S)
.Bl -inset -compact
.It (sheet-specific commands)
.El
.Bl -tag -width XXXXXXXXXXXXXXX -compact -offset XXX
.It Ic "Enter"
jumps to sheet referenced in current row
.It Ic "gC"
.No opens Sy Columns Sheet No with all columns from selected sheets
.It Ic "&" Ar jointype
.No merges selected sheets with visible columns from all, keeping rows according to Ar jointype Ns :
.El
.Bl -tag -width x -compact -offset XXXXXXXXXXXXXXXXXXXX
.It Sy "\&."
.Sy inner No " keeps only rows which match keys on all sheets"
.It Sy "\&."
.Sy left No " keeps all rows from first selected sheet"
.It Sy "\&."
.Sy full No " keeps all rows from all sheets (union)"
.It Sy "\&."
.Sy diff No " keeps only rows NOT in all sheets"
.It Sy "\&."
.Sy append No "keeps all rows from all sheets (concatenation)"
.El
.
.Ss Options Sheet (Shift-O)
.Bl -inset -compact
.It (sheet-specific commands)
.El
.Bl -tag -width XXXXXXXXXXXXXXX -compact -offset XXX
.It Ic "Enter"
edits option
.El
.
.Ss CommandLog (Shift-D)
.Bl -inset -compact
.It (sheet-specific commands)
.El
.Bl -tag -width XXXXXXXXXXXXXXX -compact -offset XXX
.It Ic " x"
replays command in current row
.It Ic "gx"
replays contents of entire CommandLog
.It Ic " ^C"
aborts replay
.El
.
.Ss DERIVED SHEETS
.Ss Frequency Table (Shift-F)
.Bl -inset -compact
.It A Sy Frequency Table No groups rows by one or more columns, and includes summary columns for those with aggregators.
.It (global commands)
.El
.Bl -tag -width XXXXXXXXXXXXXXX -compact -offset XXX
.It Ic gF
opens Frequency Table, grouped by all key columns on source sheet
.It Ic zF
opens one-line summary for selected rows
.It (sheet-specific commands)
.It Ic " s t u"
selects/toggles/unselects these entries in source sheet
.It Ic " Enter"
opens sheet of source rows which are grouped in current cell
.El
.
.Ss Describe Sheet (Shift-I)
.Bl -inset -compact
.It (sheet-specific commands)
.El
.Bl -tag -width XXXXXXXXXXXXXXX -compact -offset XXX
.It Ic "zs zu"
selects/unselects rows on source sheet which are being described in current cell
.It Ic " !"
pins current column on the left as a key column on source sheet
.It Ic " Enter"
.No opens a Sy Frequency Table No sheet grouped on column referenced in current row
.It Ic "zEnter"
opens copy of source sheet with rows described in current cell
.El
.
.Ss Pivot Table (Shift-W)
.Bl -inset -compact
.It Set key column(s) and aggregators on column(s) before pressing Sy Shift-W No on the column to pivot.
.It (sheet-specific commands)
.El
.Bl -tag -width XXXXXXXXXXXXXXX -compact -offset XXX
.It Ic " Enter"
opens sheet of source rows aggregated in current pivot row
.It Ic "zEnter"
opens sheet of source rows aggregated in current pivot cell
.El
.Ss Melted Sheet (Shift-M)
.Bl -inset -compact
.It Opens melted sheet (unpivot), with all non-key columns reduced to Variable-Value rows.
.El
.Ss Python Object Sheet (^X ^Y g^Y z^Y)
.Bl -inset -compact
.It (sheet-specific commands)
.El
.Bl -tag -width XXXXXXXXXXXXXXX -compact -offset XXX
.It Ic "Enter"
dives further into Python object
.It Ic "e"
edits contents of current cell
.It Ic "w"
toggles whether methods and hidden properties are shown
.El
.
.Sh OPTIONS
.Bl -tag -width XXXXXXXXXXXXXXXXXXXXXXXXXXX -compact
.
.Lo f filetype filetype
.No "tsv "
uses loader for
.Ar filetype
instead of file extension
.
.Lo y confirm-overwrite F
.No "True "
overwrites existing files without confirmation
.
.It Cm --diff Ns = Ns Ar base
.No "None "
.No adds colorizer for all sheets against Ar base
.
.El
.Bl -tag -width XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -compact
.It Sy --encoding Ns = Ns Ar "str " No "utf-8"
as passed to codecs.open
.It Sy --encoding-errors Ns = Ns Ar "str " No "surrogateescape"
as passed to codecs.open
.It Sy --regex-flags Ns = Ns Ar "str " No "I"
flags to pass to re.compile() [AILMSUX]
.It Sy --default-width Ns = Ns Ar "int " No "20"
default column width
.It Sy --wrap Ns = Ns Ar "bool " No "False"
wrap text to fit window width on TextSheet
.It Sy --cmd-after-edit Ns = Ns Ar "str " No "j"
command keystroke to execute after successful edit
.It Sy --cmdlog-longname Ns = Ns Ar "bool " No "False"
Use command longname in cmdlog if available
.It Sy --none-is-null Ns = Ns Ar "bool " No "True"
if Python None counts as null
.It Sy --empty-is-null Ns = Ns Ar "bool " No "False"
if empty string counts as null
.It Sy --false-is-null Ns = Ns Ar "bool " No "False"
if Python False counts as null
.It Sy --zero-is-null Ns = Ns Ar "bool " No "False"
if integer 0 counts as null
.It Sy --force-valid-colnames Ns = Ns Ar "bool " No "False"
clean column names to be valid Python identifiers
.It Sy --debug Ns = Ns Ar "bool " No "False"
exit on error and display stacktrace
.It Sy --curses-timeout Ns = Ns Ar "int " No "100"
curses timeout in ms
.It Sy --force-256-colors Ns = Ns Ar "bool " No "False"
use 256 colors even if curses reports fewer
.It Sy --use-default-colors Ns = Ns Ar "bool " No "False"
set curses to use default terminal colors
.It Sy --note-pending Ns = Ns Ar "str " No "\[u231B]"
note to display for pending cells
.It Sy --note-format-exc Ns = Ns Ar "str " No "?"
cell note for an exception during type conversion or formatting
.It Sy --note-getter-exc Ns = Ns Ar "str " No "!"
cell note for an exception during computation
.It Sy --scroll-incr Ns = Ns Ar "int " No "3"
amount to scroll with scrollwheel
.It Sy --skip Ns = Ns Ar "int " No "0"
skip first N lines of text input
.It Sy --profile-threads Ns = Ns Ar "bool " No "True"
profile async threads
.It Sy --min-memory-mb Ns = Ns Ar "int " No "0"
minimum memory to continue loading and async processing
.It Sy --confirm-overwrite Ns = Ns Ar "bool " No "True"
whether to prompt for overwrite confirmation on save
.It Sy --header Ns = Ns Ar "int " No "1"
parse first N rows of .csv/.tsv as column names
.It Sy --delimiter Ns = Ns Ar "str " No " "
delimiter to use for tsv filetype
.It Sy --filetype Ns = Ns Ar "str " No ""
specify file type
.It Sy --pyobj-show-hidden Ns = Ns Ar "bool " No "False"
show methods and _private properties
.It Sy --replay-wait Ns = Ns Ar "float " No "0.0"
time to wait between replayed commands, in seconds
.It Sy --replay-movement Ns = Ns Ar "bool " No "False"
insert movements during replay
.It Sy --rowkey-prefix Ns = Ns Ar "str " No "\[u30AD]"
string prefix for rowkey in the cmdlog
.It Sy --regex-maxsplit Ns = Ns Ar "int " No "0"
maxsplit to pass to regex.split
.It Sy --show-graph-labels Ns = Ns Ar "bool " No "True"
show axes and legend on graph
.It Sy --plot-colors Ns = Ns Ar "str " No ""
list of distinct colors to use for plotting distinct objects
.It Sy --zoom-incr Ns = Ns Ar "float " No "2.0"
amount to multiply current zoomlevel by when zooming
.It Sy --csv-dialect Ns = Ns Ar "str " No "excel"
dialect passed to csv.reader
.It Sy --csv-delimiter Ns = Ns Ar "str " No ","
delimiter passed to csv.reader
.It Sy --csv-quotechar Ns = Ns Ar "str " No """
quotechar passed to csv.reader
.It Sy --csv-skipinitialspace Ns = Ns Ar "bool " No "True"
skipinitialspace passed to csv.reader
.It Sy --fixed-rows Ns = Ns Ar "int " No "1000"
number of rows to check for fixed width columns
.El
.
.Ss DISPLAY OPTIONS
.No Display options can only be set via the Sx Options Sheet No or a config file (see Sx FILES Ns ).
.Pp
.
.Bl -tag -width XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -compact
.It Sy "disp_none " No ""
visible contents of a cell whose value was None
.It Sy "disp_date_fmt " No "%Y-%m-%d"
default fmtstr to strftime for date values
.It Sy "disp_truncator " No "\[u2026]"
indicator that the contents are only partially visible
.It Sy "disp_oddspace " No "\[u00B7]"
displayable character for odd whitespace
.It Sy "disp_unprintable " No "."
substitute character for unprintables
.It Sy "disp_column_sep " No "|"
separator between columns
.It Sy "disp_keycol_sep " No "\[u2016]"
separator between keys and rest of columns
.It Sy "disp_status_fmt " No "{sheet.name}| "
status line prefix
.It Sy "disp_status_sep " No " | "
separator between statuses
.It Sy "disp_edit_fill " No "_"
edit field fill character
.It Sy "disp_more_left " No "<"
header note indicating more columns to the left
.It Sy "disp_more_right " No ">"
header note indicating more columns to the right
.It Sy "disp_error_val " No "\[u00BF]"
displayed contents for computation exception
.It Sy "disp_ambig_width " No "1"
width to use for unicode chars marked ambiguous
.It Sy "color_default " No "normal"
the default color
.It Sy "color_default_hdr " No "bold underline"
color of the column headers
.It Sy "color_current_row " No "reverse"
color of the cursor row
.It Sy "color_current_col " No "bold"
color of the cursor column
.It Sy "color_current_hdr " No "reverse underline"
color of the header for the cursor column
.It Sy "color_column_sep " No "246 blue"
color of column separators
.It Sy "color_key_col " No "81 cyan"
color of key columns
.It Sy "color_selected_row " No "215 yellow"
color of selected rows
.It Sy "color_status " No "bold"
status line color
.It Sy "color_edit_cell " No "normal"
edit cell color
.It Sy "disp_pending " No ""
string to display in pending cells
.It Sy "color_note_pending " No "bold magenta"
color of note of pending cells
.It Sy "color_note_type " No "226 green"
cell note for numeric types in anytype columns
.It Sy "color_format_exc " No "48 bold yellow"
color of formatting exception note
.It Sy "color_getter_exc " No "red bold"
color of computation exception note
.It Sy "disp_histogram " No "*"
histogram element character
.It Sy "disp_histolen " No "80"
width of histogram column
.It Sy "disp_replay_play " No "\[u25B6]"
status indicator for active replay
.It Sy "disp_replay_pause " No "\[u2016]"
status indicator for paused replay
.It Sy "disp_pixel_random " No "False"
randomly choose attr from set of pixels instead of most common
.It Sy "color_graph_hidden " No "238 blue"
color of legend for hidden attribute
.It Sy "color_graph_axis " No "bold"
color for graph axis labels
.El
.
.Sh EXAMPLES
.Dl Nm vd Cm foo.tsv
.Pp
.Dl Nm vd Cm -f sqlite bar.db
.Pp
.Dl Nm vd Cm postgres:// Ns Ar username Ns Sy "\&:" Ns Ar password Ns Sy @ Ns Ar hostname Ns Sy "\&:" Ns Ar port Ns Sy / Ns Ar database
.Pp
.Dl Nm vd Cm --play tests/pivot.vd --replay-wait 1 --output tests/pivot.tsv
.Pp
.Dl Ic ls -l | Nm vd Cm -f fixed --skip 1 --header 0
.Pp
.Dl Nm vd --diff foo.tsv bar.tsv
.Pp
.Sh FILES
At the start of every session,
.Sy VisiData No looks for, in order, Pa $PWD/.visidatarc Ns , Pa $XDG_CONFIG_HOME/visidata/config Ns , or Pa $HOME/.visidatarc Ns , and calls Python exec() on its contents.
For example:
.Bd -literal
options.min_memory_mb=100 # stop processing without 100MB free
globalCommand('0', 'gh') # alias '0' to move to first column, like vim
def median(values):
L = sorted(values)
return L[len(L)//2]
aggregator('median', median)
.Ed
.
.Sh SUPPORTED SOURCES
These are the supported sources:
.
.Bl -inset -compact -offset xxx
.It Sy tsv No (tab-separated value)
.Bl -inset -compact -offset xxx
.It Plain and simple. Nm VisiData No writes tsv format by default. See the Sy --delimiter No option.
.El
.El
.Pp
.Bl -inset -compact -offset xxx
.It Sy csv No (comma-separated value)
.Bl -inset -compact -offset xxx
.It .csv files are a scourge upon the earth, and still regrettably common.
.It See the Sy --csv-dialect Ns , Sy --csv-delimiter Ns , Sy --csv-quotechar Ns , and Sy --csv-skipinitialspace No options.
.It Accepted dialects are Ic excel-tab Ns , Ic unix Ns , and Ic excel Ns .
.El
.El
.Pp
.Bl -inset -compact -offset xxx
.It Sy fixed No (fixed width text)
.Bl -inset -compact -offset xxx
.It Columns are autodetected from the first 1000 rows (adjustable with Sy --fixed-rows Ns ).
.El
.El
.Pp
.Bl -inset -compact -offset xxx
.It Sy json No (javascript object notation)
.Bl -inset -compact -offset xxx
.It Nested components of .json files are represented as cells containing lists ( Ns Sy [] Ns ). They can be further expanded with Sy z^Y.
.El
.El
.Pp
.Bl -inset -compact
.It For these multi-table sources, the first sheet is a directory of tables.
.It Sy Enter No loads the entire table into memory.
.El
.Pp
.Bl -inset -compact -offset xxx
.It Sy sqlite
.It Sy xlsx No (requires Sy openpyxl Ns )
.It Sy xls No (requires Sy xlrd Ns )
.It Sy hdf5 No (requires Sy h5py Ns )
.It Sy postgres No (requires Sy psycopg2 Ns )
.It Sy shp No (requires Sy pyshp Ns )
.It Sy mbtiles No (vector only, requires Sy mapbox-vector-tile Ns )
.It Sy http No (requires Sy requests Ns )
.It Sy html No (requires Sy lxml Ns )
.El
.
.Sh AUTHOR
.Nm VisiData
was conceived and implemented by
.An Saul Pwanson Aq Mt vd@saul.pw Ns .