### Inno Setup Script for VisiData Installer (Windows) Source: https://github.com/saulpw/visidata/blob/develop/platform/windows/vdwin-installer.md This refers to the `vd.iss` script, which is an Inno Setup configuration file used to define the parameters for building the VisiData Windows installer. It specifies installation paths, files to include, and other installer properties. ```Inno Setup Script vd.iss ``` -------------------------------- ### Example VisiData Guide Content for Macros Source: https://github.com/saulpw/visidata/blob/develop/docs/api/guides.rst This snippet provides a complete example of the content for a VisiData guide, including the YAML front matter and the main body. It illustrates how to describe a feature (Macros), outline basic usage steps, and reference VisiData commands using the '{help.commands.command-name}' syntax for auto-completion and linking within the application. ```Markdown --- sheettype: Sheet --- # Macros Macros allow you to bind a command sequence to a keystroke or longname, to replay when that keystroke is pressed or the command is executed by longname. The basic usage is: 1. {help.commands.macro-record} 2. Execute a series of commands. 3. `m` again to complete the recording, and prompt for the keystroke or longname to bind it to. # The Macros Sheet - {help.commands.macro-sheet} - `d` (`delete-row`) to mark macros for deletion. - {help.commands.commit_sheet} - `Enter` (`open-row`) to open the macro in the current row, and view the series of commands composing it. ''' ``` -------------------------------- ### Installing VisiData with Test Dependencies (Shell) Source: https://github.com/saulpw/visidata/blob/develop/docs/test.md This command sequence clones the VisiData repository from GitHub, navigates into the directory, and then installs VisiData along with its specific test dependencies using pip3. This setup is essential before running any tests. ```Shell git clone https://github.com/saulpw/visidata.git cd visidata pip3 install ".[test]" ``` -------------------------------- ### Installing VisiData Develop Branch via pip (Windows) Source: https://github.com/saulpw/visidata/blob/develop/platform/windows/vdwin-installer.md This command installs the development version of VisiData directly from its Git repository's `develop` branch. It requires Git to be installed and is used for testing the latest features or contributing to the project. ```Shell pip3 install git+https://github.com/saulpw/visidata.git@develop ``` -------------------------------- ### Installing PyInstaller via pip (Windows) Source: https://github.com/saulpw/visidata/blob/develop/platform/windows/vdwin-installer.md This command installs PyInstaller, a tool used to bundle Python applications into standalone executables. It is a prerequisite for compiling VisiData into a single executable file for distribution. ```Shell ./Scripts/pip3.exe install pyinstaller ``` -------------------------------- ### Installing VisiData via pip (Windows) Source: https://github.com/saulpw/visidata/blob/develop/platform/windows/vdwin-installer.md This command uses the `pip3` package installer from the WinPY environment to install the stable version of VisiData. It ensures that VisiData and its core dependencies are available for use. ```Shell ./Scripts/pip3.exe install visidata ``` -------------------------------- ### Installing VisiData Latest Release (Python) Source: https://github.com/saulpw/visidata/blob/develop/README.md This command installs the latest stable release of VisiData from PyPi using pip3. It is the recommended way to get VisiData for general use and ensures you have the most recent stable features and bug fixes. ```Shell pip3 install visidata ``` -------------------------------- ### Initial Pivot Table Example in VisiData Source: https://github.com/saulpw/visidata/blob/develop/visidata/guides/MeltGuide.md This snippet shows an example of a pivot table in VisiData, created by pivoting columns `R`, `B` with `date` as the key, and using `sum` and `mean` aggregators. It serves as the starting point for melt operations. ```VisiData Table date sum_R mean_R sum_B mean_B ---------- ----- ------ ----- ------ 2024-09-01 30 30 0 2024-09-02 0 28 28 2024-09-03 100 100 132 66 ``` -------------------------------- ### Starting VisiData at Specific Sheet, Row, Column Source: https://github.com/saulpw/visidata/blob/develop/dev/checklists/manual-tests.md This command loads an XLSX file (`sample-sales-reps.xlsx`) and uses the `+:` syntax to specify an initial sheet (`sample-salesv4`), row (`2`), and column (`3`) to start at. This tests VisiData's ability to open a file at a precise location. ```Shell bin/vd +:sample-salesv4:2:3 sample_data/sample-sales-reps.xlsx ``` -------------------------------- ### Installing VisiData Develop Branch (Python) Source: https://github.com/saulpw/visidata/blob/develop/README.md This command installs the cutting-edge `develop` branch of VisiData directly from its GitHub repository. This version may contain the latest features and experimental changes but comes with no warranty and might be less stable. ```Shell pip3 install git+https://github.com/saulpw/visidata.git@develop ``` -------------------------------- ### Cloning VisiData Windows Installer Repository (Windows) Source: https://github.com/saulpw/visidata/blob/develop/platform/windows/vdwin-installer.md This command clones the `vdwin` repository, which contains scripts and resources specific to packaging VisiData for Windows, into the `WinPy/vdwin` directory. This repository is essential for the PyInstaller build process. ```Shell git clone https://github.com/saulpw/vdwin.git WinPy/vdwin ``` -------------------------------- ### Compiling VisiData Executable with PyInstaller (Windows) Source: https://github.com/saulpw/visidata/blob/develop/platform/windows/vdwin-installer.md This command uses PyInstaller to compile the VisiData application into a single executable file. It specifies the output name, an icon, and the main VisiData Python script, creating a standalone `visidata.exe`. ```Shell ./Scripts/pyinstaller.exe --onefile/-F --icon/-i ..\vdwin\vdicon.ico --name/-n VisiData ..\vdwin\visidata.py ``` -------------------------------- ### Installing Ibis PostgreSQL Backend Source: https://github.com/saulpw/visidata/blob/develop/visidata/apps/vdsql/README.md This command installs the PostgreSQL backend for Ibis, which is required for `vdsql` to connect to PostgreSQL databases. By default, only the SQLite backend is included, and other backends must be installed separately to enable their support. ```Shell pip install 'ibis-framework[postgres]' ``` -------------------------------- ### Installing vdsql Manually (Development Version) Source: https://github.com/saulpw/visidata/blob/develop/visidata/apps/vdsql/README.md These commands allow for a manual installation of the cutting-edge development version of `vdsql` directly from the VisiData Git repository. This method is suitable for developers or users who need the very latest features and are comfortable with a potentially less stable build. ```Shell git clone git@github.com:saulpw/visidata.git cd visidata/visidata/apps/vdsql pip3 install . ``` -------------------------------- ### Starting Galactic Conquest Server (Shell) Source: https://github.com/saulpw/visidata/blob/develop/visidata/apps/galcon/README.md This command starts the Galactic Conquest game server. The optional `-p` flag allows specifying a custom port; otherwise, it defaults to 8080. The server will output a URL for clients to connect. ```Shell ./galcon-server.py [-p ] ``` -------------------------------- ### Installing Windows Curses for VisiData (Windows) Source: https://github.com/saulpw/visidata/blob/develop/platform/windows/vdwin-installer.md This command installs the `windows-curses` library, which provides `curses` compatibility on Windows. This dependency is crucial for VisiData's terminal-based user interface to function correctly. ```Shell ./Scripts/pip3.exe install windows-curses ``` -------------------------------- ### Example Nested Data for VisiData Column Expansion Source: https://github.com/saulpw/visidata/blob/develop/docs/columns.md This JSON array provides an example of nested data structures, including arrays and objects, that VisiData's `(` family of commands can expand into top-level columns. It demonstrates various levels of nesting for testing expansion capabilities. ```JSON [ [ "short", "array" ], [ "slightly", "longer", "array" ], { "nested": "data" }, { "more": { "deeply": { "nested": "data" } } } ] ``` -------------------------------- ### Programmatically Setting Options in VisiData Source: https://github.com/saulpw/visidata/blob/develop/dev/design/169-settings.md Provides examples of programmatically setting options in VisiData, demonstrating how to set sheet-specific, global, or type-specific options. ```Python .options.my_option = "value" options.my_option = "global default" Canvas.options.my_option = 42 ``` -------------------------------- ### Navigating to WinPY Python Directory (Windows) Source: https://github.com/saulpw/visidata/blob/develop/platform/windows/vdwin-installer.md This command changes the current directory to the WinPY Python installation path, which is a prerequisite for running Python scripts and commands within the WinPython environment. ```Shell cd WinPY\python-3.9.4.amd64 ``` -------------------------------- ### Installing vdsql Latest Release Source: https://github.com/saulpw/visidata/blob/develop/visidata/apps/vdsql/README.md This command installs the latest stable release of `vdsql`, which includes the `vd` command with the `vdsql` plugin enabled and a dedicated `vdsql` script. It allows VisiData to use Ibis for database loading instead of its built-in loaders. ```Shell pip install vdsql ``` -------------------------------- ### Installing vgit via pip Source: https://github.com/saulpw/visidata/blob/develop/visidata/apps/vgit/README.md This command installs the vgit package directly from its GitHub repository using pip. It specifies the branch and subdirectory to ensure the correct module is installed, along with its VisiData dependency. ```Shell pip install git+https://github.com/saulpw/visidata.git@branch#subdirectory=visidata/apps/vgit ``` -------------------------------- ### Installing the rvisidata R Package (R) Source: https://github.com/saulpw/visidata/blob/develop/docs/loading.md This R command installs the 'rvisidata' package directly from GitHub using 'devtools::install_github()'. This package provides the bridge for opening R data frames within VisiData. ```R devtools::install_github('paulklemm/rvisidata') ``` -------------------------------- ### Accessing Command and Binding Dictionaries Source: https://github.com/saulpw/visidata/blob/develop/dev/design/169-settings.md Provides examples of how to access dictionaries containing all available commands and keybindings, either globally or specific to a SheetType or the VisiData (vs) object. ```Python commands SheetType.commands vs.commands bindings SheetType.bindings ``` -------------------------------- ### Starting New Branch (vgit) Source: https://github.com/saulpw/visidata/blob/develop/visidata/apps/vgit/vgit-guide.md Creates a new Git branch. This action is equivalent to `git branch `. ```Git git branch ``` -------------------------------- ### Example: Filtering Rows by Item and Units in VisiData Source: https://github.com/saulpw/visidata/blob/develop/docs/rows.md Demonstrates a specific workflow to filter rows based on multiple conditions (Item and Units) using VisiData's `z|` command and then open a new sheet with the filtered results. Requires setting column type. ```VisiData # z| Item == 'Binder' and Units < 10 " ``` -------------------------------- ### Defining and Binding a Custom VisiData Command (Python) Source: https://github.com/saulpw/visidata/blob/develop/docs/api/commands.rst This example illustrates how to create a custom API method (`show_hello`) for VisiData sheets, register it as a command (`show-hello`), and then bind multiple keyboard shortcuts (Shift+H, Ctrl+H, Alt+H) to execute this command. It shows the full lifecycle from function definition to user interaction via keybindings. ```Python @Sheet.api def show_hello(sheet): vd.status(sheet.options.disp_hello) # `sheet` members and `vd` members are available in the execstr scope BaseSheet.addCommand(None, 'show-hello', 'show_hello()', 'show a warm greeting') # bind Shift+H, Ctrl+H, and Alt+H to this command BaseSheet.bindkey('H', 'show-hello') BaseSheet.bindkey('^H', 'show-hello') BaseSheet.bindkey(ALT+'h', 'show-hello') ``` -------------------------------- ### Documenting VisiData Options Source: https://github.com/saulpw/visidata/blob/develop/docs/api/style.rst This pattern outlines the standard format for documenting VisiData options. It includes a clickable link to the options sheet, the option's name formatted as code, its help string, and its default value. This structure ensures comprehensive and interactive documentation for VisiData configuration options. ```VisiData Documentation Pattern [:onclick options-sheet