visidata

A terminal spreadsheet multitool for discovering and arranging data

GPL-3.0 License

Downloads
9.8K
Stars
7.5K
Committers
91

Bot releases are hidden (Show)

visidata - v2.1.1

Published by anjakefala almost 4 years ago

This release may be a small one, but it contains a handful of meaningful bugfixes that we wanted to get out the door.

Happy New Year, everyone!

- [macros] allow macro interfaces to be longnames (thanks @frosencrantz #787)
- [save] better default save filename for url sheets (thanks @geekscrapy #824)

Bugfixes

- [cmdlog] record column, sheet, and row info for open-cell
- [cmdlog] catch case of 'override' sheet for set-option
- [expr-col] `curcol` now works for multiple invocations (thanks @geekscrapy #659)
- [loaders postgres] account for postgres_schema when rendering Postgres tables (thanks @jdormit for PR #852)
- [loaders url] fail unknown URL scheme (thanks @geekscrapy for PR #84)
- [pyobj] fix Pyobj Sheets for lists (thanks @brookskindle #843)
- [pipe] handle broken pipes gracefully (thanks @robdmc #851)
- [scroll] fix issue with jagged scrolling down (thanks @uoee #832)
- [sort] fix bug where total progress in sorting is (100 * # of columns to sort) (thanks @cwarden)
visidata - v2.1

Published by saulpw almost 4 years ago

v2.1

This release fixes several bugs in 2.0 and fills in some of the gaps. Please see the CHANGELOG for the complete list of changes and bugfixes.

  1. options.some_selected_rows

Some commands, like setcol-expr (g=) operate on the selected rows. Before 2.0, if no rows were selected, these commands would fall back to operating over all rows. This is intuitive and helpful, but can cause problems with non-interactive script replay: sometimes there are legitimately no selected rows, and so the command should not do anything (but also not fail).

So the behavior was changed in 2.0 to have reliable and deterministic results. It's reasonably easy to work around: select all rows with gs, repeat the command, and maybe unselect them all with gu. But this turned out to be ultimately disappointing for interactive use.

So, in 2.1, there is now an option some_selected_rows, which if True, causes these commands to operate on all rows, if none are selected:

  • setcol-expr (g=)
  • setcol-iter (gz=)
  • setcol-subst (g*)
  • setcol-subst-all (gz*)

This option applies only to interactive mode, and not to batch mode. In batch mode, commands that operate on selected rows will always use the list of selected rows, even if there are none (and so it won't do anything). Be careful about saving .vd scripts from sessions in which this option was set; the results when replaying in batch mode may not be as expected.

  1. options.numeric_binning

For 2.0, ranged binning of numeric columns was implemented, and allowed to be disabled by setting options.numeric_binning to False.
(By default it was set to True.)

In 2.1, this option is now disabled by default, and must be enabled (whether globally or per-sheet) by setting it to True.

  1. Shift+Arrow within edit-cell to move cursor and re-enter edit mode

By popular demand, pressing Shift+Arrow when editing a cell, will save the current value, move the cursor one row or column in the given direction, and re-enter edit mode. This makes it easier to enter data, either row-wise or column-wise.

This feature obsoletes options.cmd_after_edit, which was always a terrible hack. It has no effect now.

  1. Expression can access column attributes

In 2.0, expressions could use attributes on the vd singleton or the current sheet object, and had sheet and row special variables to refer to the sheet and row objects themselves.

In 2.1, expressions can also use attributes of the expression column, and col can be used to refer to the column object directly. (So col.width and width both refer to the width of the expression column itself, if there are no columns named width.)

  1. Differentiate select-equal- and select-exact-.

Previously, select-equal- (bound to ,) matched on the typed value. Now, select-equal- matches on the displayed value. New commands select-exact-cell/-row that match on typed value are bound to z, and gz, (the display value may be rounded or formatted with less precision, so using the typed value is "more precise".

(Thanks @geekscrapy for noticing)

  1. New macro system

A new command macro-record (bound to m) starts recording commands for use in a macro. The same command stops recording and prompts for a keystroke to bind the macro to. When the given keystroke is pressed, the macro will be executed. All macros run their commands on the current (row, column, sheet), regardless of the cursor position when the macro was recorded.

The new command macro-sheet (bound to gm) opens an index of all current macros. A macro on this sheet can be viewed with Enter and then modified, saving changes with Ctrl+S

This feature obsoletes the older iteration of macro system, and removes the deprecated z Ctrl+D command.

(Thanks @bob-u for the suggestion)

  1. Other Additions and Improvements
  • Add mode and stdev aggregators.
  • Add sort-order indicator in column header.
  • Unset options with d on options sheet (also add options.unset() API function).
  • .vdj scripts are now hashbangable. Put #!vd -p at the start of the .vdj file and watch it go! (Note: extension must still be .vdj for now.)
  • The floatsi type (z%) can now parse SI strings like "2.3M" (thanks @anjakefala for sponsoring).
  • Regex capture (;) will use capture names as column names, if available (thanks @tsibley).
  1. Format-specific improvements
  • [http] auto-paginate by continuing with the given links.next.url from the response.

  • [json] 50% speedup for loading (thanks @lxcode).

  • [pdf] options.pdf_tables to parse tables from pdf with tabular.

  • [sqlite] Use internal rowid to update and delete rows (WITHOUT ROWID sqlite tables can no longer be modified).

  • [zip] Add extract-file, extract-selected, extract-file-to, extract-selected-to commands (bound to x, gx, zx, and gzx on the ZipSheet).

  • [fixed] Add fixed-width saver (uses col.width).

  • [clickhouse] Add plugin for clickhouse loader.

visidata - VisiData v2.0.1

Published by saulpw about 4 years ago

VisiData 2.0.1

major changes since 1.5.2 (last official release)

  1. Plugin API
  2. Undo/Redo
  3. Deferred changes
  4. Split Window

highlighted features added since 1.5.2

  • [iota] add i family of commands (iota/increment)
  • [unfurl-col] zM, which does row-wise expansion of iterables in a column
  • [join] add merge jointype (thanks @sfranky for feature request #405)
  • [freq/pivot] range binning for numeric columns
  • [options] options parsing rewrite allows for per-sheet options
  • [cli] stdout pipe/redirect
  • more visibility for long values, with multi-line rows and offset scrolling
  • add Alt/Esc as prefix for user keybindings
  • [input] Ctrl+Y paste from cell clipboard and other improvements

new loaders since 1.5.2

  • MIME (.eml) (2.-5)
  • recutils (.rec) (2.-5)
  • VCard (.vcf) (2.-5)
  • IMAP (email)
  • MySQL (thanks @p3k)
  • PDF (text only)
  • numPY (.npy/.npz)
  • Unicode Separated Value (.usv)
  • Excel 2007-2010 binary fomat (.xlsb) (suggested by @woutervdijke #246)
  • feather, gbq, orc, parquet, pickle, sas, stata via pandas (thanks @khughitt for bug report #460)
  • postgres support for connecting directly to rds (thanks @danielcynerio for PR #536)

For the full list, see below along with release notes from previous pre-releases, or view the CHANGELOG

changes since pre-release v2.-4

  • Additions and Improvements

    • [aggregators] allow custom aggregators in plugins/visidatarc (thanks @geekscrapy for the feature request #651)
    • [loaders xlsx] automatically clean sheet name when saving; warn if sheet name changes (thanks @geekscrapy for the request #594)
    • [columns] unhide height attribute by default (thanks @frosencrantz for feature request #660)
    • add .vcf (VCard) loader
    • [sqlite] remove name of db from an SqliteSheet's name, only tablename
    • [syspaste] make syspaste- replayable and undoable (note that syspaste- value will be recorded in CommandLog)
    • [savers] many text saver filetypes via tabulate library (thanks @jsvine for original vdtabulate plugin)
    • [calc] ExprColumn no longer cached by default
    • [loaders rec] add new .rec file loader and multisheet saver (recutils)
    • [savers] implemented multisheet saver for both json and jsonl
    • [loaders eml] add new .eml file loader for email files with attachments
  • Options

    • add options.incr_base (thanks @chocolateboy for the suggestion #647)
    • (former) options.force_valid_colnames renamed to options.clean_names
      • applies to Sheets and Columns now (thanks @geekscrapy for the request #594)
    • for --X=Y, do not replace - with _ in Y (thanks @forensicdave for bug report #657)
    • add options.default_height for visibility toggle (thanks @frosencrantz for feature request #660)
    • add support for -- option-ending option on CLI.
    • [input] default now fancy_chooser = True
      • when fancy_chooser enabled, aggregators and jointype are chosen with a ChoiceSheet.
      • s to select, Enter to choose current row, g Enter to choose selected rows, q to not choose any
    • numeric_binning is now True by default (enables numeric binning on PivotSheet and FreqTable for numeric columns
  • Command changes and additions
    - (former) setcol-range (gz=) renamed to setcol-iter
    - (former) addcol-range-step (i) renamed to addcol-incr-step
    - (former) setcol-range (gi) renamed to setcol-incr
    - (former) addcol-range-step (zi) renamed to addcol-incr-step
    - (former) setcol-range-step (gzi) renamed to setcol-incr-step
    - add scroll-cells-* to scroll display of cells while remaining in a Column; bind to [g]z{hjkl}
    - (former) unbind z{hjkl} from scroll-col (thanks @geekscrapy for feature request #662)
    - add type-floatsi bound to z% (#661)
    - reload-selected now reloads all Sheets if none selected (thanks @geekscrapy for PR #685)
    - add customdate with fixed fmtstr for parsing (use z@ and input a fmtstr compatible with strptime (thanks @suntzuisafterU for feature request #677)

  • Bugfixes

    • [DirSheet] use changed ext as filetype when loading files (thanks @frosencrantz for bug report #645)
    • [slide] several major improvements to column sliding; key column sliding now works (thanks much to @geekscrapy for bug hunting #640)
    • [open-row] Sheets Sheet should be removed from stack upon open-row (thanks @cwarden for the bug report)
    • [cli] re-add --version (thanks @mlawren for bug report #674)
    • [open-config] fix gO (thanks @geekscrapy for bug report #676)
    • [splitwin] handle swap case for single sheet (thanks @geekscrapy for bug report #679)
    • [loaders xlsx] handle None column names for all Sequence Sheet loaders (thanks @jsvine for bug report #680)
    • [settings] retrieve from cache for top sheet if obj is None (thanks @aborruso for the bug report #675)
    • [settings] check if option is set on specific sheet before falling back to override
    • [describe] have DescribeSheet use source column's sheet's options.null_value to calculate its null column (thanks @aborruso for the bug report #675)
    • [undo] ensure that undos for complex commands (like expand-cols) are set more frequently (thanks @frosencrantz for the bug report #668)
      • it is still possible to find race conditions if the user presses commands fast enough, however they should happen far less frequently
    • [vlen] fix numeric binning for vlen() (thanks @frosencrantz for bug report #690)
    • [pivot] fix pivot case where no aggregator is set
    • [pyobj] fix filtering for PyobjSheet
    • [DirSheet] fix sorting for directory column of DirSheet (thanks @frosencrantz for bug report #691)
    • [json] fix bug saving cells with nested date values (thanks @ajkerrigan for PR #709)
    • [input] fix Ctrl+W bug when erasing word at beginning of line
    • [plugins] import .visidata/plugins by default
    • [pandas] use a safer reset_index() to avoid losing data when updating a pandas index (thanks @ajkerrigan for PR #710)
    • [threads] disable add-row on ThreadsSheet (thanks @geekscrapy for bug report #713)
  • deprecated

    • complete removal of status and statuses from deprecated (thanks @frosencrantz for bug report #621)
      • longnames are now open-status and show-status
    • remove cursorColIndex
  • API and Interface

    • Sheet(*names, **kwargs) autojoins list of name parts
    • openSource(), aggregator(), and aggregators are now part of vdobj
    • set_option is now setOption
    • move isError to Column.isError
    • deprecate load_pyobj, now PyobjSheet
    • add .getall('foo_') which returns all options prefixed with 'foo_'; deprecated options('foo_')
    • nSelected is now nSelectedRows
    • make Column.width property, so setting is same as Column.setWidth
    • evalexpr is now evalExpr
    • format is now formatValue
    • SettableColumn.cache is now ._store
    • vdtype() is now vd.addType()
    • add addColumnAtCursor (thanks @geekscrapy for bug report #714)
  • Plugins

    • update sparkline (thanks @layertwo #696)
    • plugin dependencies now install into plugins-deps (former plugin-deps)
  • Dev niceties

    • Fully automate dev setup with Gitpod.io (thanks @ajkerrigan for PR #673)
visidata - v2.-4 pre-release

Published by saulpw about 4 years ago

New Features (v2.-4)

1. reintegrate deferred mods; save with z Ctrl+S

First and foremost, the 'defermods' feature has been reintegrated into core VisiData.
It was added in v2.-1, but it caused some headaches, so we separated it out into a plugin for v2.-2, along with vls for the DirSheet.
Then we found that we really missed having the functionality right in vd alongside everything else, and not having to reach for a specialized tool.
@anjakefala got to the bottom of our headaches and did the heavy lifting to make sure that everything works properly now.
So now the DirSheet and SqliteSheets are once again able to 'defer' their modifications and deletions, until saved to the source with z Ctrl+S. Ctrl+S saves the sheet to a regular data file as usual.

See also the defermods page.

Thanks to @anjakefala for her diligence and hard work on this!

2. unfurl a column (unfurl-col bound to zM)

As suggested by @jsvine, unfurl is a row-wise expansion of a column with containers.

  • expand-col does a column-wise expansion: 1 column is added for each key/value in the containers (assumes mostly homogenous data)
  • melt converts non-key columns into rows (on a new melted sheet)
  • unfurl-col is kind of like a shortcut for an expand followed by a melt (demo on twitter)

In my mind, unfurl is conceptually closer to expand-col, but since it pushes a new sheet, putting it on a Shift+ command feels more natural.
The unfurl-col command feels like a focused melt--melting lists or dicts in the cursor column, instead of the individual values of the non-key columns as melt does.
So it's now bound to z Shift+M.

3. 'i'ncrement and family

Generating a range of numbers turns out to be surprisingly handy.

Previously, if you wanted to make a column with a list of numbers, you'd have to use za to create a column, gs to select all the rows (losing your previous selection) gz= (setcol-range
array languages, the 'increment' operator generates a sequence of integers from whole cloth.

In fact there was a version of this in the rownum plugin, and another version in @jsvine's unfurl plugin.
So we added equivalent commands to stock VisiData.
Because of the tradition of using i-like characters in APL notation ('ι' in APL and 'i.' in J), and the coincidence
that i has remained one of the few unbound keystrokes, I decided to develop this set of increment concepts, and bind them to the i family of commands.
See below for the new commands.

4. cli options improved; set sheet-specific options from CLI

We had a couple of open issues with command line options, and finally I bit the bullet and just wrote a custom cmdline args parser, instead of using Python's argparse. It was actually about the same amount of code, but now the syntax is more regular, more permissive, and can set sheet-specific options multiple times and differently for different sheets.
Thanks to @tsibley for patient testing and precise bug reports.

See /options#cli for details on how the command line interface works.

Also the visidata_dir option (default $HOME/.visidata) can now be set via the environment variable $VD_DIR.
Likewise config can be set via $VD_CONFIG.

5. fancy_chooser

Setting the fancy_chooser option to True enables a fancy selection menu for adding aggregators and choosing jointypes.
Help text is included for each item; press Enter to choose a single item, or select multiple rows and press g Enter, or q to abort.
This uses the splitpane functionality from the previous release.

6. column format strings

Python has multiple syntaxes for formatting numbers within strings: %.02f which used with the % format operator, and {:.02f} used with .format().
Which should you use for in the fmtstr attribute on the Columns sheet? A Twitter poll was evenly split, and @tsibley suggested ¿porque no los dos?](https://twitter.com/trs/status/1182390622507827202)
So as of v2.-4, you can use either format mechanism! If you want thousands separators though, you have to use {:,.02f}. See /blog/fmtstr for details.

new and improved loaders

  • IMAP (email): open an imap:// url and it'll download all your email, which you can then save to .jsonl like I did

  • basic MySQL loader (requires ..; thanks @ )

  • basic PDF text extractor (requires pdfminer)

  • improved loaders: csv hdf5 html http json jsonl pandas pcap postgres xls yaml

Thanks to @ajkerrigan for actively following up on the pandas and json bug reports, and all of his work in making them better.

new commands

  • z Shift+M unfurl-col

  • i addcol-range adds a column with integer values reflecting the current row order.

  • gi setcol-range sets values in the current column for selected rows

  • zi addcol-range-step adds a column with values

  • gzi setcol-range-step sets values

  • x (Canvas) resize-x-input sets x axis dimensions on a plot

  • y (Canvas) resize-y-input sets y axis dimensions on a plot

  • (unbound) select-error

  • (unbound) select-error-col

  • (unbound) mouse-enable and mouse-disable

  • (unbound) guard-sheet sets quitguard on current sheet

lots more improvements and bugfixes

And of course there are tons of bugfixes and smaller improvements throughout. For a more complete list, see the CHANGELOG.

visidata - v1.5.2: a few bugfixes

Published by saulpw almost 6 years ago

We are starting off the New Year with a very small patch for a few bugs.

Briefly,

  1. Fixed g*
    • thanks to both @jsvine and @layertwo for noticing and notifying us.
  2. If suspended during editline (with Ctrl+Z), VisiData will now correctly resume in the editline.
  3. Ctrl+W on an empty value in editline does not error out of the editline.

And that's it.

Happy new year, everyone!

visidata - v1.5.1: Bugfixes and user feedback

Published by anjakefala almost 6 years ago

The initial motivation for this patch was to fix an idle performance regression. In the interim, though, we have received a bunch of feedback for improvements and a couple of feature requests.

So thanks for all of your ongoing engagement and for continuing to share VisiData with the world. We hope you enjoy this final release of 2018!

A brief overview:

  1. Improvements to the pandas loader.

    • thanks to @nickray for the bughunting
  2. When set to True options.bulk_select_clear bulk select commands (|, g|, ,, etc) will clear the previously selected rows.

    • the default is set to False and exhibits the current behaviour of retaining the already selected rows
    • thanks to @aborruso for the suggestion
  3. Shift+O once again pushes the global options sheet. You can find the sheet options by pressing zO. gO now opens the .visidatarc which can be edited and saved from within the VisiData interface.

  4. Sorting is now asynchronous, per user request. Please let us know how you find it.

    • thanks to @apnewberry for starting that conversation
  5. gz^ now renames all visible columns to contents of selected rows and gz* substitutes over all visible columns

    • thanks, once again, to @aborruso for both suggestions

As usual, the complete list of changes can be found in the Changelog.

visidata - v1.5: plugins, saving errors, and bugfixes

Published by saulpw almost 6 years ago

For the most part, this is a bugfix release. A few other improvements are here as well:

  1. Basic plugin support

    • ~/.visidata added to sys.path on startup
    • copy plugin to e.g. ~/.visidata/vdfoo.py
    • add import vdfoo to .visidatarc to activate
  2. Error saving

    • for tsv and json, errors are saved as options.safe_error string (default #ERR)
    • if that option is an empty string, error message is saved instead
  3. Mouse improvements

    • click now moves to column also
    • right-click to edit cell, rename column, or rename sheet, depending on where clicked.
  4. xls/xlsx loaders now use options.header to determine number of rows used to set column names (default is 1).

See the CHANGELOG for a more complete list of bugfixes and changes.

visidata - v1.4: bugfixes and performance improvements

Published by saulpw about 6 years ago

This is largely a bugfix and performance release. It was originally planned as a patch release (v1.3.2), but some features and interface changes crept in, so it is officially v1.4.

  • [pyobj] visidata.view(obj) and visidata.view_pandas(df)
  • [pandas] -f pandas loads file with pandas.read_<ext>
  • [date] date minus date now gives float number of days instead of seconds
  • [vdtui] internal colorizer API changed significantly
  • [vdtui] timeout and redraw only if other threads active

As usual, a more complete list of changes and features is in the CHANGELOG.

See the ROADMAP for the planned future direction of VisiData.

visidata - v1.3.1: patch for aggregator issues

Published by saulpw about 6 years ago

We found some issues with 1.3 (aggregators interacting with nulls/errors, primarily) that we didn't want to let sit until 1.4. So we fixed those issues and a couple others, and added a few 'minor' features. This patch version should be a definitive improvement over the base 1.3 version.

The complete list of changes is in the CHANGELOG. Here are the new options and features:

  • new extend join type keeps the type of the first sheet, extending it with columns from the other sheets
  • rename-sheet command (thanks to @jsvine for suggestion; what default keybinding should it have?)
  • [DirSheet] add reload-rows (gz^R) to undo modifications on all selected rows
  • remove all options.foo_is_null and add options.null_value
  • options.save_errors (default True) to include errors when saving
  • add options.json_indent for json pretty-printing

v1.3

It's been a productive 3 months since v1.2. The largest effort in this release was a commands/options reworking, which will hopefully pay dividends in the future. Many other so-called improvements were made as well. Here's a list of most of them:

commands

  • All commands were thoughtfully renamed, and the command longnames should be largely stable now.
  • commands.tsv is an exhaustive list of commands and their attributes and side effects.
  • The manpage has moved to Ctrl+H, which should be its final resting place.
    • F1 will still open the manpage if the terminal doesn't intercept it.
    • but z? has been repurposed (see below).
    • Note that because iTerm reports Ctrl+H as Backspace, these help commands are also available by using Backspace (backspace for help, a new trend).
  • z Ctrl+H opens a list of commands available on this sheet.
  • Keybindings and longnames are separated out. The cmdlog now records longnames as well.
  • See the new keyboard layouts page (thanks to @deinspanjer for inspiration).

changes to existing commands and options

  • The experimental menu system (was Space) has been removed.
  • Now Space (exec-longname) executes the command for the input longname (tab completion of available commands is supported). (This function was previously bound to Ctrl+A).
  • options.wrap (for TextSheet wrapping of lines) now defaults to False.
  • R (random-sheet) opens a new sheet instead of selecting random rows (reverting to former behavior).
  • za (addcol-empty) asks for column name
  • zd (delete-cell) moves value to clipboard ("cut", like other delete commands)

options

  • options can now be set on specific sheet types or even individual sheets. Shift+O opens options for the current sheet type, and g Shift+O opens the global options sheet.
  • See available colors by pressing Space and then typing the longname colors.

new safety options

  • Error messages are sorted before informational status messages, and colored by color_error and color_warning (thanks to @jsvine for suggestion)
  • options.quitguard (default False to keep old behavior) if True, will confirm before quitting last sheet.
  • The sheets-graveyard (gS) command opens a sheet that shows all discarded (but "precious") sheets. These are stored as weak references so they will be garbage collected eventually, but can be resurrected from the graveyard sheet until then.
  • options.safety_first (default False) makes loading/saving more robust, likely at the cost of performance which can become significant in large files.
    • Currently, only removes NULs from csv input.
  • options.tsv_safe_char is split into tsv_safe_newline and tsv_safe_tab.

new power features

  • z; (addcol-sh) adds new columns for stdout/stderr of a bash command, which uses $colname to substitute values from other columns (whole arguments only, so far).
  • z| (select-expr) and z\ (unselect-expr) select/unselect by Python expression (thanks to @jsvine for suggestion).
  • z/ (search-expr) and z? (searchr-expr) to search forward/backward by Python expression.
  • gI (describe-all) describes all columns in all sheeets (like gC (columns-all)).

nice things

  • The g(, z(, and gz( variants of ( ('expand-column') are filled out.
  • z# sets type of current column to len.

new loaders

  • yaml loader (thanks to @robcarrington, @JKiely, @anjakefala at PyCon Sprints for making this happen)
  • pcap loader (thanks to @vbrown608 and @TemperedNetworks)
  • xml loader
  • jsonl saver
  • [json loader] no more incremental display (need a better json parser than the Python stdlib offers)
  • pandas adapter (thanks to @jjzmajic for issue #162)

minor changes

  • System clipboard command detection is more portable (thanks to @chocolateboy for the PR).
  • date supports adding a number of days (or like foo+6*hours, foo+9*months, etc).
  • Hidden columns are darkened on columns sheet.
  • Exceptions are rolled up properly.
  • options.motd_url now uses https by default (thanks to @jsvine for the warning).
  • [DirSheet] mode is editable (set to octal like 0o0644).
  • [internal dev] ProfileSheet is improved.

known issues

  • cmdlog replay with a Ctrl+S (save-sheet) to an existing file gets stuck in an infinite loop when options.confirm_overwrite is on.
  • After renaming a file on a DirSheet, Ctrl+R (reload-sheet) is required to refresh the ext column for that row.
  • n/N (next-search/prev-search) won't continue a previous search-expr and searchr-expr.
  • show-aggregate with mean errors on int columns.
  • Contracting (with )) a previously expanded column on a dup-ed (with ") sheet results it in disappearing on the source sheet.

Thanks to everyone who contributed to this release! As always, feedback and suggestions are welcome and appreciated.

visidata - Python 3.7 compatibility patch

Published by saulpw over 6 years ago

@deinspanjer (issue #164) discovered that VisiData doesn't work with Python3.7 due to our use of the 'async' identifier, which is now off-limits as it is a formal keyword as of 3.7. The only change in 1.2.1 is changing 'async' to 'asyncthread' in order to work with Python 3.7.

Thanks to the illustrious @anjakefala for getting this release out quickly and without incident (knock on wood).

visidata - v1.2: DirSheet++, multisave, macros

Published by saulpw over 6 years ago

Here are the major feature enhancements for v1.2. Please see the CHANGELOG for the complete list.

Major features

  • DirSheet enhancements (modify file metadata, move/delete files)
  • multisave (single file multisave to html, md, and txt format, or into a directory for other formats)
  • prototype macro system with z^S on the commandlog
  • New conda package

New commands and options

  • T to push derived sheet with transposed rows/columns
  • zs/zt/zu to select/unselect/toggle rows from top of sheet to cursor (thanks @SteveJSteiner for the suggestion)
  • gzs/gzt/gzu to select/unselect/toggle rows from bottom to cursor
  • gv to unhide all columns
  • gM to melt into multiple value columns
  • g* to transform selected rows in place
  • z</`z>' to move up/down to next null cell
  • ^A to execute a command by its longname
  • gD to open the directory at options.visidata_dir (default ~/.visidata)

options

  • options.cmdlog_histfile to specify a file to auto-append commandlog to (default empty means disabled)
  • options.tsv_safe_char to replace tabs and newlines when writing .tsv format (default empty means disabled, for faster saving)
  • options.error_is_null to count errors as null (default false)

New supported formats and sources

  • sas7bda (SAS; requires sas7bdat)
  • xpt (SAS; requires xport)
  • sav (SPSS; requires savReaderWriter)
  • dta (Stata; requires pandas)
  • bz2 and xz (LZMA) compression (thanks @jpgrayson)
visidata - v1.1: menus and more

Published by saulpw over 6 years ago

This is the first release since 1.0. The major additions and changes:

  • All external loader dependencies have been removed from the PyPI, brew, and Debian packages. This will make for much faster initial installation.

    • The json, csv, tsv, and sqlite loaders are still available with the base installation as they are supported by the Python standard library. Other loaders will need their dependencies to be installed manually. See requirements.txt for which external packages to install for each loader.
  • An experimental command menu is now available via Space. The goal is to make it easier for people to explore the available functionality, and to try commands without knowing their keybindings.

    • Use the standard VisiData movement keys (h/l/Arrows, q to back out)
    • The help strings are shown during navigation, along with the available keybindings, so this will hopefully help people learn the keybindings as they use commands, without having to break their flow to refer to the manpage.
    • Commands are organized in a hierarchy according to their longnames. This hierarchy may change in future releases, so these longnames are not yet stable enough to use for command aliases or in cmdlog replay. The actual command keys are more stable and should be preferred for the time being.
    • If you play with the menu system, please let me know what did or didn't work for you!
  • The Y command series was added to copy ("yank") to the system clipboard (with options.clipboard_copy_cmd, set to pbclip for MacOS by default) to conveniently paste data in any supported text output format.

    • Y copies the current row, zY copies the current cell, and gY copies all selected rows (or all rows).
    • This mirrors the existing y command series, which yanks to VisiData's internal clipboard.
  • - now works as a filename to specify stdin/stdout. Useful especially in batch mode to dump final sheet to stdout (-b -o -).

New supported formats:

  • markdown (md) is now supported for saving (but not loading, yet) to an org-mode compatible table format.

  • .png files can now be loaded and saved, and crudely viewed on the canvas with an overloaded .. The pixels can be edited on the source sheet like any other data.

  • .ttf and .otf (font) files can be loaded and viewed on the canvas. This is super useful for just about no one, but it was a great excuse to implement Canvas.qcurve().

These commands have been added or changed, and are expected to stay in future versions:

  • The za command adds an empty, editable column to any sheet. gza adds N new columns.

  • The ( and ) commands will expand/collapse list/dict columns (e.g. in nested json).

  • In the canvas, d deletes points from source sheet that are contained within the cursor. gd deletes all points shown on the screen.

  • The !@#$%-_ special actions on the Columns Sheet and Describe Sheet have been removed. They were sometimes convenient, but more often made it difficult to interact with the Columns Sheet itself.

    • The g forms of these commands are still available and will operate on the source columns (with the exception of g_, which now works consistently on all sheets as expected).
  • The Shift+Arrows are aliased to HJKL (though these may not work in all environments).

These additions are more experimental and may not stay in future versions:

  • The Backspace command drops the current sheet (like q), and also scrubs its history from the cmdlog.

  • ENTER is now aliased to modify-edit-cell by default.

Other minor changes:

  • search and select with no input now uses the most recent input. n/N do this already for row search (as before), but the new behavior works more like standard vim/less/etc tools, and also applies to non-row search (like c).

  • Many sheets (pivot, describe, melt, and many loaders) have improvements and bugfixes to make them even better.

Finally, some other news:

  • VisiData has been accepted into Debian for the next release! It is currently available if you've added the unstable repo; install with apt install visidata.

  • Jeremy Singer-Vine has put together a great tutorial for people who want a smoother path to start using VisiData.

Thanks to everyone who contributed to this release! As always, feedback and suggestions are welcome and appreciated.

visidata - v1.0 official release!

Published by saulpw over 6 years ago

VisiData v1.0 (2018-01-25)

VisiData 1.0 has been officially released! Changes since the 0.99 release candidate:

  • a complete overhaul of the website and documentation;
  • a 2x across-the-board performance improvement for async threads (from disabling profiling by default);
  • removed support for .visidatarc in the current directory and via XDG; only $HOME/.visidatarc is used now;
  • many bugfixes, both functional and cosmetic;
  • removed the "visidata[full]" package from PyPI;
  • a homebrew package (so you can now do brew install saulpw/vd/visidata on MacOS), and an apt package that is under review for inclusion in Debian.

This is a huge milestone for VisiData. I devoted my sabbatical (the entire year of 2017) to creating an open-source tool that would be useful for myself and other terminal users, and it was very important for me to release a stable and lasting 1.0 so that it could be set aside when I resumed working.

We could have gotten away without certain features and with fewer supported formats, but there is such breadth and depth included in 1.0 (as shown by demos like this one at the PyCascades 2018 conference), that I'm hard-pressed to choose which features should have been omitted.

I owe a great deal to many people who have helped and supported me through this process. VisiData would not be what it is without them. The list of contributors includes everyone who has submitted to the repository, but there are some other groups to whom VisiData and I are eternally indebted:

  • the Recurse Center, for maintaining an awesome space and incredibly supportive community that I am lucky to have become a part of;
  • Office Nomads, my local co-working space where I could work without turning into Jack Torrance;
  • and the Python community, for creating such a broadly useful language and ecosystem, without which VisiData would not be nearly as powerful.

Finally, a very special thanks to Anja for her incredible help in putting together the website, documentation, tests, and various releases.

Share and enjoy!

Saul

visidata - Release Candidate for v1.0

Published by saulpw almost 7 years ago

No changes will be made on stable before 1.0 except for targeted bugfixes with minimal likelihood of regressing anything else. If there are any more bugfixes to be applied, they will be cherry-picked from continuing develop. Either v0.99 or v0.99.1 will become the formal 1.0 in a few weeks.

User-facing changes in this version:

  • tab completion for filename and python expressions
  • load .html table elements (requires lxml)
    • http urls are now usable as sources (requires requests)
  • save as .json
  • ^W to erase a word in the line editor
  • gC views all columns on all sheets
  • median aggregator
  • v now 'visibility toggle' (moved from w)
  • --version (thanks to @jsvine)
  • options.use_default_colors (thanks to @wavexx)
visidata - Introducing the "visidata[full]" package on PyPI

Published by saulpw almost 7 years ago

v0.98.1 is a patch release that fixes a couple of minor bugs. The primary change in this release, however, is that the 'visidata' package on PyPI no longer includes all of the loaders' dependencies by default.

This is a minor hassle for first-time users if they want to use certain formats, but since the goal is eventually supporting every possible data format, installing all dependencies for all users by default is not tenable. The base VisiData already includes support for tsv, csv, fixed width, sqlite, graphs, and more. Most users will only need one or two additional dependencies for their data sources.

To install VisiData with all dependencies for all loaders:

pip3 install "visidata[full]"

Of course, you can install just the dependencies you need. See "SUPPORTED SOURCES" in the manpage for which packages to install.

visidata - VisiData v0.98, now with graphs and maps (experimental)

Published by saulpw almost 7 years ago

When I announced that v0.97 was "feature complete", I must have been talking about vdtui.
vdtui has been pretty stable, even as VisiData has added a low-resolution pixel canvas
(using Braille unicode characters) to draw graphs and maps. In fact, apart from a few bug
fixes and small API changes, the only addition to vdtui in v0.98 is basic mouse support.

Here's a list of what's new in VisiData v0.98:

  • visidata.org revamp

  • [canvas] graphs and maps!

    • . or g. to push a graph or a map from the current sheet (dot=plot)
    • supports .shp and vector .mbtiles
    • mouse left-click/drag to set cursor
    • mouse right-click/drag to scroll canvas
    • scrollwheel to zoom in/out on a canvas
    • s/u to select/unselect rows at canvas cursor
    • ENTER to push source sheet with only rows at canvas cursor
    • 1-9 to toggle display of 'layers' (colors)
    • _ to zoom out to full width
    • disp_pixel_random option chooses pixel attrs at random (weighted), instead of most common
    • +/- to zoom in/out via keyboard
  • Updates to commands

    • Remove ` (backtick) command
    • Remove most zscroll commands (zs/ze)
      • zz moves cursor to center, uncertain about the future of zt due to conflict with t for toggle
    • ga adds N new rows
    • gz= sets value for selected/all rows to a Python sequence in this column
    • z_ sets column width to given value
    • z- cuts column width in half
    • P is now "paste before" (like vim); R now pushes a random sample
    • ^Z now sends SIGSTOP; ^O "opens" the external $EDITOR (from builtin line editor)
    • [ColumnsSheet] Added ~!@#$ commands back, to set type of source columns
    • w is becoming a more universal "visibility toggle"
      • [TextSheet] w toggles wordwrap
      • [canvas] w toggles display of the labels
      • [pyobj] w toggles hidden properties and methods
  • Updates to command line args and options

    • set initial row/col with +<row#>:<col#> (numeric only)
    • --delimiter/-d option (separate from --csv-delimiter) sets delimiter for tsv filetype
    • --replay-wait/-w renamed from --delay/-d
    • disp_date_fmt option for date display format string (default is date-only)
    • zero_is_null/empty_is_null/none_is_null/false_is_null set which values are considered null (previously was aggr_null_filter)
    • --skiplines option renamed to --skip, and --headerlines to --header
  • Design improvements

    • Add specific rowtype for each sheet (see right status)
    • dates are a kind of numeric type (useful for graphing as the x-axis)
    • use_default_colors (at behest of @wavexx)
    • more robust Progress indicator
    • populate DescribeSheet in async thread
    • remove default names for unnamed columns
    • history up/down in edit widget now feels right
  • API changes

    • change main Column API to getter(col, row) and setter(col, row, val)
    • move Path and subclasses out of vdtui
    • TextSheet source is any iterable of strings
    • Sheet.filetype provides default save filename extension

visidata - FC patch 1

Published by saulpw almost 7 years ago

It's VisiData's 1st birthday! I started working on VisiData 1 year ago today (Oct 29).

v0.97.1 has only a few small patches:

  • Fixed help manpage on OS/X (man has no --local-file option)
  • Fixed Postgres (incomplete lazy import)
  • Fixed ENTER on SheetsSheet on SheetsSheet to be no-op
  • Fixed readthedocs redirect to visidata.org
visidata - Feature complete

Published by saulpw about 7 years ago

Important If you like VisiData, sign up for the newsletter: https://tinyletter.com/visidata

Community

  • I'm hanging out in #visidata on freenode! Come by and say hi if you use VisiData. I'd love to know how you're using it!

  • r/visidata (on reddit) is the forum for longer-form discussion.

  • See the new webpage at visidata.org! We migrated away from RTD, as it was too much hassle and limited our functionality.

  • We have some example tours generated from our automated tests. See visidata.org/tour. More will be coming with the next release!

v0.97 has been released

The main themes for this release are:

  1. commandlog replay fully operational (now running both automated tests and generating tours)
  2. a quick ref guide in man page format (available in visidata via F1, and also online at visidata.org/man)
  3. visidata.org is now the primary home page (we've transitioned away from readthedocs)

There are also the usual suspects: new loaders, new commands, new options, and too many improvements and bugfixes to name. It is getting ever easier to write a new command or loader in a few minutes and have it just work.

With this release, VisiData is feature complete. There will still be many reworkings, interface changes, added commands, tweaks, embellishments, arguments, and explanations, but as far as I can see, all of the functionality is now there. We are inching ever closer to a v1.0 that will hopefully stand the test of time.

The main goals for the next release (v0.98) are 1) a set of great tours, and 2) documentation of the internal architecture: design decisions, implementation guidelines, and API references.

Here are some more detailed descriptions of what comes with this release:

New Loaders

  • simple remote postgres loader (vd postgres://user:[email protected]:6254/database)

  • fixed width column detection (ls -al | vd -f fixed --skiplines 1)

New Commands and Options

  • F1 launches man page quick ref (gF1 now opens the command sheet)

  • vd --diff A B shows B with changes from A in red

  • a Describe Sheet with 'I' shows basic stats for every column!

  • streamlined commandlog (previously called editlog) functionality

  • ^D to quickly save the current cmdlog; vd -p cmdlog-1.vd to replay it

  • removed movement commands (use --replay-movement to reinsert movements)

  • player piano with --delay (used to make the tours on the website)

  • advanced editing, can now make new sheets from whole cloth!

  • 'A' to add a new sheet with some number of columns

  • 'a' to add a new empty row

  • 'gz=' set this column in selected rows to values from a python list expression

  • 'Del'/gDel to clear a cell (set a value to None)

  • 'y' to yank/delete row; 'p' to paste

  • 'zy' to yank (copy) cell contents; 'zp' to paste ('gzp' to paste to all selected rows)

  • 'f' to fill null cells with the previous non-null value

End

visidata - v0.93

Published by saulpw about 7 years ago

  • Fix display/feel bugs in editText
  • Remove BACKSPACE for editlog undo
  • Fix colorizer API
  • Add ctrl-u command to toggle profiling of main thread
  • Fix Column statistics (options.col_stats still disabled by default)
Package Rankings
Top 1.83% on Pypi.org
Top 4.22% on Proxy.golang.org
Top 24.89% on Conda-forge.org
Badges
Extracted from project README
Tests Gitpod ready-to-code discord mastodon @visidata@fosstodon.org twitter @VisiData