Skip to content

Commit

Permalink
Update for VisiData 3.x
Browse files Browse the repository at this point in the history
- Refresh the terminal-shots
- Tweak some sign-posting re. interface changes
- Tweak instructions re. addcol-split and addcol-capture
- Adjust distinctive-birds pre/post-join steps re. freq-count rename bug
  • Loading branch information
jsvine committed Mar 8, 2024
1 parent fbe9248 commit e4efa74
Show file tree
Hide file tree
Showing 52 changed files with 2,628 additions and 76,094 deletions.
Binary file modified .doctrees/advanced/configuring-visidata.doctree
Binary file not shown.
Binary file modified .doctrees/advanced/debugging-visidata.doctree
Binary file not shown.
Binary file modified .doctrees/advanced/extending-visidata.doctree
Binary file not shown.
Binary file modified .doctrees/advanced/the-command-log.doctree
Binary file not shown.
Binary file modified .doctrees/basics/navigating-visidata.doctree
Binary file not shown.
Binary file modified .doctrees/basics/opening-files.doctree
Binary file not shown.
Binary file modified .doctrees/basics/sorting-and-filtering.doctree
Binary file not shown.
Binary file modified .doctrees/basics/summarizing-data.doctree
Binary file not shown.
Binary file modified .doctrees/basics/understanding-columns.doctree
Binary file not shown.
Binary file modified .doctrees/basics/understanding-rows.doctree
Binary file not shown.
Binary file modified .doctrees/basics/understanding-sheets.doctree
Binary file not shown.
Binary file modified .doctrees/index.doctree
Binary file not shown.
Binary file modified .doctrees/intermediate/creating-new-columns.doctree
Binary file not shown.
Binary file modified .doctrees/intermediate/large-cells.doctree
Binary file not shown.
Binary file modified .doctrees/intermediate/reshaping-data.doctree
Binary file not shown.
Binary file modified .doctrees/practical/distinctive-birds.doctree
Binary file not shown.
Binary file modified .doctrees/practical/high-flying-birds.doctree
Binary file not shown.
Binary file modified .doctrees/the-big-picture/installation.doctree
Binary file not shown.
Binary file modified .doctrees/the-big-picture/visidata-in-60-seconds.doctree
Binary file not shown.

This file was deleted.

73,510 changes: 0 additions & 73,510 deletions _downloads/83e70cf67e909f3ac177575439e5f3c5/faa-wildlife-strikes.csv

This file was deleted.

2 changes: 1 addition & 1 deletion _sources/advanced/configuring-visidata.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ For instance, to tell VisiData to ignore the first three lines of your input fil
vd my-spreadsheet.csv --skip 3

To see the full list of configurable options, run ``vd -h``:
To see the full list of configurable options, run ``vd -h | less``:


.. raw:: html
Expand Down
4 changes: 2 additions & 2 deletions _sources/advanced/debugging-visidata.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ The error sheet is like any other sheet in VisiData, so you can quit it and retu
Examining general errors
------------------------

Let's try creating a general error on purpose. Say we want to find all ``OPERATOR`` values with parentheses in them. We might navigate over to that column, press :kbd:`|` to select rows by a pattern, and type ``(`` at the prompt. If we did so, we'd be greeted by an error message at the bottom of the screen:
Let's try creating a general error on purpose. Let's press :kbd:`=` to create a new column, and type ``(`` at the prompt, and then :kbd:`Enter`. We'll be greeted by an error message at the bottom of the screen:


.. raw:: html
:file: ../../terminal/output/debugging-02-general-error-status.output.html


Why's that? In Python, these patterns ("regular expressions") treat parentheses as special characters that group other characters, rather than literal parentheses. For every opening parenthesis, valid patterns require a closing parenthesis to match it. Hence, the error message we see at the bottom of the screen, suggesting that we have an "unterminated" pattern that lacks a closing parenthesis. (Python's built-in module for processing regular expressions is named ``re``, hence the ``re.error`` in the message.)
Why's that? In Python, all open parentheses need to be closed.

To examine this general error in greater detail, we can press :kbd:`Control-e` — now, or at any point until you trigger another error — to reveal its full traceback in a VisiData text sheet:

Expand Down
18 changes: 4 additions & 14 deletions _sources/advanced/extending-visidata.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,11 @@ Extending VisiData With Plugins

VisiData allows users to extend the program's functionality through plugins. You can `write your own <https://www.visidata.org/docs/api/>`_, or use plugins other people have written. This chapter focuses on incorporating already-written plugins.

Using VisiData's plugin installer
---------------------------------

VisiData provides an interface for installing certain plugins. To open the interface, press :kbd:`Space` to raise the longname-command prompt, type ``open-plugins``, and press :kbd:`Enter`:
How to install a plugin
-----------------------

.. raw:: html
:file: ../../terminal/output/extending-03-installer.output.html

To install and *activate* any of these plugins, navigate to its row and press :kbd:`a`. To *deactivate* a plugin, navigate to its row and press :kbd:`d`.


How to install a plugin manually
--------------------------------

You can also manually install plugins that are not available through the installer. Doing so involves two steps:
Installing a plugin so involves two steps:

- First, make the plugin available to VisiData. Depending on the plugin, you'll do this either by saving the plugin file to your ``~/.visidata/`` directory, or by running ``pip install [plugin_package_name]``.

Expand Down Expand Up @@ -59,7 +49,7 @@ Press :kbd:`Enter` to execute the command. Now you should see a new copy of the
Where to find plugins
---------------------

Plugin support is a relatively new feature of VisiData, so there aren't many public plugins yet available. Here is a (likely incomplete) list of resources:
Here is a (likely incomplete) list of resources:

- `jsvine/visidata-plugins <https://github.com/jsvine/visidata-plugins>`_
- `ajkerrigan/visidata-plugins <https://github.com/ajkerrigan/visidata-plugins>`_
Expand Down
2 changes: 1 addition & 1 deletion _sources/basics/navigating-visidata.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Keystroke(s) Action

Some VisiData commands, like the ones directly above, will prompt you to enter some text.

To demonstrate, move to the first column of the FAA dataset (if you're not already there) and type :kbd:`/`. At the bottom-left of the screen, you'll see a ``/``:
To demonstrate, move to the first column of the FAA dataset (if you're not already there) and type :kbd:`/`. At the bottom-left of the screen, you'll see a prompt that says ``search regex:``:

.. raw:: html
:file: ../../terminal/output/navigation-02-search-prompt.output.html
Expand Down
4 changes: 3 additions & 1 deletion _sources/basics/opening-files.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ Let's break it down:

- **Top row** (directly below the menu): This displays your dataset's columns — at least as many as can fit on your screen.

- **Bottom row**: This tells you what dataset you're viewing (``faa-wildlife-strikes`` on the far left), some status information, the number of rows loaded (73,448), and (after the ```` character) the number of rows selected (zero).
- **Sidebar** (the green box): This contains status messages based on what you have just done or usage guidance for multi-step commands.

- **Bottom row**: This tells you what dataset you're viewing (``faa-wildlife-strikes`` on the far left), often some status information, the number of rows loaded (73,448).

- **Highlighted column and row**: These indicate your current position in the dataset.

Expand Down
2 changes: 1 addition & 1 deletion _sources/basics/understanding-rows.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ For instance, pressing :kbd:`s` while on the second row of the FAA dataset shoul
.. raw:: html
:file: ../../terminal/output/rows-00-select-single.output.html

VisiData has highlighted that row and incremented the selection indicator (in the bottom-right corner) from ``•0`` to ``•1``.
VisiData has highlighted that row and indicated the number of selected rows (the ``•1`` in the bottom-right corner).

All rows at the same time
^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
4 changes: 2 additions & 2 deletions _sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ Tutorial Status
^^^^^^^^^^^^^^^

====================== ================
Tutorial last updated ``2022-03-30``
VisiData version ``2.8``
Tutorial last updated ``2024-03-08``
VisiData version ``3.0.2``
====================== ================

About the author
Expand Down
7 changes: 5 additions & 2 deletions _sources/intermediate/creating-new-columns.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,11 @@ Once you do that, you should see something like this:
.. raw:: html
:file: ../../terminal/output/newcols-02-split.output.html

.. note::
Each value in the new column is a list of the pieces that resulted from the split. But you probably want them each piece in its own column. To do that press :kbd:`(`, which is the "expand column" command. Now you should see something like this:

.. raw:: html
:file: ../../terminal/output/newcols-02a-split-expanded.output.html

The number of new columns created will be determined by split-size of the values in the 100 rows surrounding the cursor. (That 100 number is `configurable <../../advanced/configuring-visidata/>`_ via the ``default_sample_size`` option.)


How to create a new column by "capturing" it from another column
Expand All @@ -98,6 +100,7 @@ For instance, if you want to extract the first string of numbers from each aircr
- Navigate to the ``ATYPE`` column
- Press :kbd:`;`
- At the prompt, type ``(\d+)`` (with one set of parentheses for each capture group), and then hit :kbd:`Enter`
- Press :kbd:`(` to expand the new column's lists

Once you do that, you should see something like this:

Expand Down
15 changes: 8 additions & 7 deletions _sources/practical/distinctive-birds.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,9 @@ Then, to create a frequency table for the column, press :kbd:`Shift-F`. Once you
Spruce up the frequency table
-----------------------------

Because we'll later be joining this sheet to another sheet, let's spruce it up a bit by doing the following:
Because we'll later be joining this sheet to another sheet, let's hide the ``percent`` and ``histogram`` columns by navigating to each and pressing :kbd:`-`.

- Navigate to the ``count`` column. Rename it by pressing :kbd:`^`, typing ``state_total``, and then pressing :kbd:`Enter`
- Press :kbd:`_` to resize column slightly, so that the full column name can be seen
- Hide the ``percent`` and ``histogram`` columns by navigating to each and pressing :kbd:`-`.

After those steps, the sheet should look something like this:
Now the sheet should look something like this:

.. raw:: html
:file: ../../terminal/output/practical-distinctive-07-state-freq-trimmed.output.html
Expand Down Expand Up @@ -170,7 +166,12 @@ Type ``inner`` and press :kbd:`Enter` to complete the action. After that, you sh
.. raw:: html
:file: ../../terminal/output/practical-distinctive-15-sheets-joined.output.html

Finally, give the sheet a shorter name:
The columns that had previously been called ``count`` in both sheets have been auto-prefixed with the name of their source sheet. Let's clarify things by using the :kbd:`^` shortcut to rename them to ``count`` and ``state_total``, respectively. On the ``state_total`` column, press :kbd:`_` to expand the width to see the full name:

.. raw:: html
:file: ../../terminal/output/practical-distinctive-15b-columns-renamed.output.html

Finally, let's give the sheet a shorter name:

- Press :kbd:`Space` to raise the type-a-command prompt
- Type ``rename-sheet`` and press :kbd:`Enter`
Expand Down
2 changes: 1 addition & 1 deletion _sources/practical/high-flying-birds.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ First, type :kbd:`z|` to raise the "select by expression" prompt. Then, type ``c
.. raw:: html
:file: ../../terminal/output/practical-hfb-08-select-expr-input.output.html

Next, press :kbd:`Enter` to complete the action. Because there are no high-count species in the visible part of the sheet, you won't notice much of effect at first; just a confirmation in the status bar at the bottom:
Next, press :kbd:`Enter` to complete the action. Because there are no high-count species in the visible part of the sheet, you won't notice much of effect at first; just some status messages in the sidebar:

.. raw:: html
:file: ../../terminal/output/practical-hfb-09-select-expr-result.output.html
Expand Down
6 changes: 6 additions & 0 deletions _static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -1164,3 +1164,9 @@ kbd {
.inv38-255 { background: #eeeeee; }
.ansi48-255 { background: #eeeeee; }
.inv48-255 { color: #eeeeee; }

/* OVERRIDES */
.ansi48-68 { background: #4696de; }
.inv48-68 { color: #4696de; }

.ansi38-215 { color: #ff9900; }
Loading

0 comments on commit e4efa74

Please sign in to comment.