Skip to content

options changes, persistent input history, .vds format, and more

Compare
Choose a tag to compare
@saulpw saulpw released this 31 Jan 07:32
· 3378 commits to stable since this release
4a3a2bd

This release adds new features and changes some existing behavior. Please see the CHANGELOG for the complete list of changes and bugfixes.

  1. The interpretation of "global" vs. "sheet-specific" CLI options has changed.

In v2.0 and v2.1, options given on the command-line were "sheet-specific" and only applied to files on the command-line, and -g (--global) had to be specified to make them apply to sheets created after launch. Now, options are "global" by default (affecting all sheets which don't have a sheet-specific override), and -n indicates that subsequent CLI options are sheet-specific. The -g option is now basically a no-op (though it can be given after -n (--nonglobal) to return to the default behavior after specifying some sheet-specific options). This fixes a few things that users (including myself) were consistently misinterpreting or getting frustrated with, and hopefully does not affect anyone adversely.

  1. New feature: persistent input history

By popular demand, VisiData can now store user-provided input values so they persist between sessions. This is currently disabled by default, as it may have surprising privacy or security implications in some environments. Enable persistent input history by adding the following to visidatarc:

options.input_history='previnputs'
  1. New type: floatlocale

The VisiData float type uses the Python builtin float, which only parses numbers in "international" notation. To parse locale-specific numbers (which use e.g. a decimal comma instead of a decimal point), there is now the floatlocale type, which parses numbers based on the LC_NUMERIC environment variable (which must be set before starting vd). A separate type was created because locale-based parsing was measured as 20x slower than the base float type. The type-floatlocale and type-floatlocale-selected (on ColumnsSheet) commands were added without keybindings; users who need this functionality will probably want to add the following to their visidatarc:

bindkey('%', 'type-floatlocale')
bindkey('g%', 'type-floatlocale-selected')
  1. Option change: Fancy Chooser now disabled by default

The "fancy chooser", a tabular menu with helpstrings for choosing e.g. aggregators and jointypes, is now disabled by default. Choosing an aggregator or jointype now (again) uses the status/input line, and requires entering the value manually. To invoke the fancy chooser, use Ctrl+X. If the fancy chooser is preferred by default, set options.fancy_chooser=True.

  1. New format: .vds (VisiData Sheet)

This new single-file format can store typed data and column information from multiple sheets. Use g Ctrl+S (save-all or save-selected) to invoke the multisheet saver, and then specify a filename with a .vds extension. When you load the file into vd, the Column typing and formatting will be the same!

  1. New loader (and saver): geojson

Thanks @dracos for PR #876 implementing geojson loading and saving!

  1. Several other improvements and bugfixes