Permalink
Browse files

small tweaks to docs and updates to the doc build process.

  • Loading branch information...
anjakefala committed Sep 23, 2017
1 parent 059a005 commit c2bf1f57b61c722e40081313563be94f94b25523
View
@@ -8,5 +8,3 @@ visidata.egg-info/
*.swo
*dist
*_build
*_static
*_templates
View
@@ -35,9 +35,12 @@ To replay a [.vd script](https://github.com/saulpw/visidata/tree/develop/tests)
$ vd [<options>] --play <script.vd> [<format>=<value> ...]
```
## [User's Reference Manual](http://visidata.org/man/vd)
## [User Reference Manual](http://visidata.org/man/vd)
The comprehensive user reference is the [man page](http://visidata.org/man/vd), accessible from the terminal with:
```
$ export MANPATH=~/.local/man # PEP370 or wherever installed
$ man vd
```
View
@@ -0,0 +1,34 @@
#!/bin/sh
set -e
VD=~/git/visidata
BUILD=$VD/_build
WWW=$VD/_build/www
MAN=$VD/docs/man
mkdir -p $WWW/man/vd
export PYTHONPATH=$VD:$VD/visidata
export PATH=$VD/bin:$PATH
### build manpage
cp $MAN/* $BUILD/
$MAN/parse_options.py $BUILD/vd-cli.inc $BUILD/vd-opts.inc
soelim -I $BUILD $BUILD/vd-skel.1 > $BUILD/vd-pre.1
preconv -e utf8 $BUILD/vd-pre.1 > $MAN/vd.1 # checked in
gzip -c $MAN/vd.1 > $BUILD/vd.1.gz
MAN_KEEP_FORMATTING=1 COLUMNS=100 man $MAN/vd.1 | ul | aha > $WWW/man/vd/index.html
### build front page from README
markdown $VD/README.md > $WWW/index.html
# add analytics to .html files
for fn in `find $WWW -name '*.html'` ; do
sed -i -e "/<head>/I{r $VD/docs/analytics.thtml" -e 'd}' $fn
done
View
@@ -0,0 +1,10 @@
<head>
<!-- Global Site Tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-105741007-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments)};
gtag('js', new Date());
gtag('config', 'UA-105741007-1');
</script>
View
@@ -1,23 +1,15 @@
#!/usr/bin/env python3
# Usage: $0 visidata-cli.inc visidata-opts.inc
import sys
import vdtui
import visidata
try:
man = sys.argv[1]
except:
man = 'vdtui'
if man == 'vdtui':
vd = vdtui
elif man in ['vd', 'visidata']:
vd = visidata
else:
sys.exit()
fncli, fnopts = sys.argv[1:]
print(vd.__version__)
print(visidata.__version__)
padding = 26
options_cli_skel = '''.It Sy --{cli_optname} Ns = Ns Ar "{type}" No "{default}"
@@ -28,19 +20,19 @@
{description}
'''
with open('{0}-cli.inc'.format(man), 'w') as cliOut:
with open('{0}-menu.inc'.format(man), 'w') as menuOut:
opts = vd.baseOptions.keys()
with open(fncli, 'w') as cliOut:
with open(fnopts, 'w') as menuOut:
opts = visidata.baseOptions.keys()
colwidth = max((len(optname)+len(str(default))) for optname, default, _, _ in vd.baseOptions.values())
colwidth = max((len(optname)+len(str(default))) for optname, default, _, _ in visidata.baseOptions.values())
menuOut.write('.Bl -tag -width %s -compact\n' % ('X'*(colwidth+3)))
cliwidth = max(padding+len(str(default)) for _, default, _, _ in vd.baseOptions.values())
cliwidth = max(padding+len(str(default)) for _, default, _, _ in visidata.baseOptions.values())
cliOut.write('.Bl -tag -width %s -compact\n' % ('X'*(cliwidth+3)))
for optname in opts:
optname, default, value, desc = vd.baseOptions[optname]
if optname[:5] in ['color', 'disp_'] or man == 'vdtui':
optname, default, value, desc = visidata.baseOptions[optname]
if optname[:5] in ['color', 'disp_']:
options_menu = options_menu_skel.format(optname=optname,type=type(value).__name__,default = str(default), description = desc)
menuOut.write(options_menu)
else:
View

This file was deleted.

Oops, something went wrong.
View
@@ -20,7 +20,7 @@
.It Columns are autodetected from the first 1000 rows (adjustable with Sy --fixed-rows Ns ).
.El
.Pp
.Bl -compact -offset xxx
.Bl -inset -compact -offset xxx
.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
@@ -31,7 +31,4 @@
.It Sy xls No (requires Sy xlrd Ns )
.It Sy hdf5 No (requires Sy h5py Ns )
.It Sy postgres No (requires Sy psycopg2 Ns ):
.Sy postgres:// Ns Ar username Ns Sy "\&:" Ns Ar password Ns Sy @ Ns Ar hostname Ns Sy "\&:" Ns Ar port Ns Sy / Ns Ar database
.El
.Bl -inset -compact -offset xxxxxx
.El
View
@@ -56,16 +56,15 @@ opens a frozen copy of current sheet with all visible columns evaluated
.It Ic " a"
appends a blank row
.It Ic " d gd"
deletes current/all selected row(s) and appends to clipboard
deletes current/all selected row(s) and writes to clipboard
.It Ic " y gy"
copies current/all selected row(s) to clipboard
.It Ic " p"
pastes clipboard rows after current row
pastes most recent clipboard rows after current row
.It Ic " ^Z"
undoes most recent delete
.
.so vdtui-editing.inc
.El
.
.Ss Data Toolkit
.Bl -tag -width XXXXXXXXXXXXXXX -compact
@@ -129,9 +128,8 @@ opens sheet of current row/cell as Python object
.El
.Ss METASHEETS
.Ss Columns Sheet (Shift-C)
Properties of columns on the source sheet can be changed with standard editing commands
.No ( 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.
.Bl -tag -width XXXXXXXXXXXXXXX -compact
.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 (sheet-specific commands)
.El
.Bl -tag -width XXXXXXXXXXXXXXX -compact -offset XXX
@@ -152,7 +150,7 @@ sets type of selected columns to str/int/float/currency/date
.El
.
.Ss Sheets Sheet (Shift-S)
.Bl -tag -width XXXXXXXXXXXXXXX -compact
.Bl -inset -compact
.It (sheet-specific commands)
.El
.Bl -tag -width XXXXXXXXXXXXXXX -compact -offset XXX
@@ -175,7 +173,7 @@ jumps to sheet referenced in current row
.El
.
.Ss Options Sheet (Shift-O)
.Bl -tag -width XXXXXXXXXXXXXXX -compact
.Bl -inset -compact
.It (sheet-specific commands)
.El
.Bl -tag -width XXXXXXXXXXXXXXX -compact -offset XXX
@@ -184,7 +182,7 @@ edits option
.El
.
.Ss Commandlog (Shift-D)
.Bl -tag -width XXXXXXXXXXXXXXX -compact
.Bl -inset -compact
.It (sheet-specific commands)
.El
.Bl -tag -width XXXXXXXXXXXXXXX -compact -offset XXX
@@ -196,8 +194,8 @@ replays contents of entire commandlog
.
.Ss DERIVED SHEETS
.Ss Frequency Table (Shift-F)
.No A Sy Frequency Table No groups rows by one or more columns, and includes summary columns for those with aggregators.
.Bl -tag -width XXXXXXXXXXXXXXX -compact
.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
@@ -208,7 +206,7 @@ opens a one-line summary for selected rows
.El
.
.Ss Describe Sheet (Shift-I)
.Bl -tag -width XXXXXXXXXXXXXXX -compact
.Bl -inset -compact
.It (sheet-specific commands)
.El
.Bl -tag -width XXXXXXXXXXXXXXX -compact -offset XXX
@@ -221,18 +219,20 @@ opens copy of source sheet with rows described in current cell
.El
.
.Ss Pivot Table (Shift-W)
Set key column(s) and aggregators on column(s) before pressing Sy Shift-W No on the column to pivot.
.Bl -tag -width XXXXXXXXXXXXXXX -compact
.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 which comprise current pivot cell
.El
.Ss Melted Sheet (Shift-M)
Opens melted sheet (unpivot), with all non-key columns reduced to Variable-Value rows.
Opens sheet of source rows which comprise current pivot cell
.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)
.Bl -tag -width XXXXXXXXXXXXXXX -compact
.Bl -inset -compact
.It (sheet-specific commands)
.El
.Bl -tag -width XXXXXXXXXXXXXXX -compact -offset XXX
View
No changes.
View

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit c2bf1f5

Please sign in to comment.