VisiData v2.0 (2020-10-14)
This is a major milestone. After almost 2 years of development, version 2.0 of VisiData is finally released. It's got several major improvements, a bunch of new loaders, and tons of new features and quality of life improvements. And, most importantly, an API specification for plugins.
1. Licensing Changes
[tl;dr: no more MIT vdtui; GPL3 for everything]
Previously, there was a core vdtui single-file library that I licensed as MIT, as I thought it might be a platform for a variety of apps like VisiData. Approximately no one showed interest in that though, and it became unwieldy to maintain, so over the course of developing VisiData 2.0, the vdtui library was thoroughly dismantled. It's now just the visidata module as a whole, which I'm releasing under GPL3. The last released version of vdtui.py under MIT was 1.5.2 if anyone wants to use that.
2. Plugin API
[tl;dr: "2.0" has a stable documented API; expect a growing ecosystem of plugins for a wide variety of use cases.]
To be honest, this is what held off the 2.0 release for so long. I knew I wanted to go through every function and decide whether I wanted to include it in the 2.0 API to be supported for the rest of the 2.x lifecycle, which might be years. (We don't intend to strictly adhere to "semver", but it's still important to try to maintain backwards compatibility within a major version number.) So now, we have an API spec with over 200 functions, which will be of interest if you want to customize VisiData, or create a plugin for it, or just to know more about its internal components.
Take a look at the actual API, at visidata.org/docs/api. It still needs a bit more polish, but the meat and bones are there.
3. Undo and Redo
This is a "game changer" according to @jsvine.
Undo and redo, along with the new
guard-sheet command, make it much easier to rely on VisiData for data cleaning and data entry.
If you upgrade to 2.0 and learn nothing else about it, your life will be better for knowing Shift+U (undo) and Shift+R (redo).
4. Deferred modifications
[tl;dr: if you add/edit/delete rows on a few specific sheets, the changes won't take place right away; you'll have to press z Ctrl+S]
Certain sheets which know how to incrementally update their source--notably, the DirSheet and SqliteSheet--defer changes made to them, requiring an explicit save/commit step with commit-sheet (z Ctrl+S).
These changes are colorized on the screen and can be saved as data (or not saved, in the case of deletes) with save-sheet (Ctrl+S), even if they haven't been committed back to the original source with commit-sheet.
This means vd can work quite naturally as an interactive file manager, or as a sqlite database editor. I've been using it to manage my mp3 collection and my personal contacts database, which was a tsv file until I wanted to add a multiline "notes" field, so I saved it as a .json file and used that for a few months, and now I've been using it in an sqlite database. Of course they all look the same in VisiData so I can go back and forth without any friction.
5. Split Window
Press Shift+Z to split the terminal window into a top panel and bottom panel.
One panel contains the current/top sheet, the other panel contains the sheet "under" the top sheet. Press Tab or Ctrl+^ to go between them.
The fancy chooser (now the default for choosing aggregators or jointypes) uses this split window, and I have many other ideas for it as well.
It may not seem like much now, but I predict that this becomes a sleeper hit.
[previously blogged at: visidata.org/blog/2020/splitwin)]
6. So many other features
Here's curated list of highlights, the ones that seemed like people would be interested to know about:
- more visibility for long values, with "v" to toggle multi-line rows and and z+hjkl to adjust cell offset
- [iota] the "i" family of commands to add an increment column
- [unfurl] zM, which does row-wise expansion of iterables in a column (very useful with nested data)
- [join] add "merge" jointype
- [numeric binning] ranged binning for numeric columns
- [cli] custom options parsing allows for per-sheet options
- [cli] pipe and redirect to stdout; use as an interactive chooser
- [input] Ctrl+Y paste from cell clipboard and other improvements
- Alt+ as new keyboard layer for user keybindings
And, as with every release, there are a bunch of new loaders, including MIME, recutils, vcard, imap, mysql, pdf, npy/npz, and more! See the new /formats page for a full list of supported formats, in tidy tabular form.
Then if you still haven't seen enough, you can see the CHANGELOG for the complete list of bugfixes and changes.
Okay, that about wraps it up for this release. If anything I've written about here sounds interesting and you'd like me to cover it first, or more in-depth, let me know! Send me an email, or tweet @VisiData, or open a github issue, or chat with us on Freenode #visidata; however you want to get in touch, we'd love to hear from you.