Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
trinhminhtriet committed Nov 8, 2024
1 parent de78b3f commit 41893e2
Showing 1 changed file with 76 additions and 3 deletions.
79 changes: 76 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,86 @@ source ~/.bashrc

## 💡 Usage

Run **tabler** with the following command to start cleaning your filesystem:
Start Tabler with `tabler`

```sh
./tabler [options] [path]
```bash
tabler <path_to_csv(s)>
```

Options:

- `--no-header`: Use this option if the CSV file does not contain a header row.
- `--ignore-errors`: Ignore parsing errors while loading the CSV file.
- `--infer-schema`: Set the schema inference method. Options are no, fast, full, and safe.
- `--quote-char`: Set the quote character.
- `--separator`: Set the separator character.
- `--theme`: Set the theme.

To open TSV file(s), use:

```bash
tabler <path_to_tsv(s)> --separator $'\t' --no-header
```

To open parquet file(s), use:

```bash
tabler <path_to_parquet(s)> -f parquet
```

## Tutorial

For a guide on using Tabler, including instructions on opening files, navigating tables, performing queries, and using inline queries, kindly visit the [tutorial page](https://github.com/trinhminhtriet/tabler/blob/master/tutorial/tutorial.md).

## Keybindings️

| Key Combination | Functionality |
| ----------------------- | --------------------------------------------------- |
| `v` | Switch view |
| `k` or `Arrow Up` | Move up in the table or scroll up in sheet view |
| `j` or `Arrow Down` | Move down in the table or scroll down in sheet view |
| `h` or `Arrow Left` | Move to the previous item in sheet view |
| `l` or `Arrow Right` | Move to the next item in sheet view |
| `Page Up` or `Ctrl+b` | Move one page up |
| `Page Down` or `Ctrl+f` | Move one page down |
| `H` | Select previous tab |
| `L` | Select next tab |
| `Ctrl+u` | Move up half a page |
| `Ctrl+d` | Move down half a page |
| `Home` or `g` | Move to the first row |
| `End` or `G` | Move to the last row |
| `R` | Select a random row |
| `q` | Close current tab |
| `:` | Command mode |

## Commands

| Command | Example | Description |
| ----------------- | ----------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| `:Q` or `:query` | `:Q SELECT * FROM df` | Query the data in Structured Query Language(SQL). The table name is the file name without extension |
| `:S` or `:select` | `:S price, area, bedrooms, parking` | Query current data frame for columns/functions |
| `:F` or `:filter` | `:F price < 20000 AND bedrooms > 4` | Filter current data frame, keeping rows were the condition(s) match |
| `:O` or `:order` | `:O area` | Sort current data frame by column(s) |
| `:tabn` | `:tabn SELECT * FORM user WHERE balance > 1000` | Create a new tab with the given query |
| `:q` or `:quit` | `:q` | Return to table from sheet view otherwise quit |
| `:schema` | `:schema` | Show loaded data frame(s) alongside their path(s) |
| `:reset` | `:reset` | Reset the table to the original data frame |
| `:help` | `:help` | Show help menu |

## Themes

### Monokai (default):

![Image Alt text](/images/theme-monokai.png "Monokai")

### Argonaut:

![Image Alt text](/images/theme-argonaut.png "Argonaut")

### Terminal:

![Image Alt text](/images/theme-terminal.png "Terminal")

## 🗑️ Uninstallation

Running the below command will globally uninstall the `tabler` binary.
Expand Down

0 comments on commit 41893e2

Please sign in to comment.