Skip to content

rhasanm/csbee

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

csbee (CSV View)

Overview

csbee (CSV View) is a terminal user interface (TUI) application built with ratatui that allows users to view and interact with CSV files in a highly intuitive and user-friendly manner. This application provides a powerful way to inspect, filter, query, and order CSV data, all from within your terminal.

Tui App View

Features

  • CSV Schema Display: Displays the schema of the CSV file on one side of the interface, providing a clear view of the column names and their respective data types.
  • CSV Table View: Shows the contents of the CSV file as a table, allowing for easy navigation and inspection of data.
  • Filter Block: Allows users to filter the CSV data based on specific criteria.
  • Query Block: Provides SQL-like query capabilities to perform complex data retrieval operations.
  • Order By Block: Enables users to sort the CSV data based on specified columns.

Installation

  1. Clone the Repository:

    git clone https://github.com/rhasanm/csbee.git
    cd csbee
  2. Build the Project: Ensure you have Rust and Cargo installed. Then run:

    cargo build --release
  3. Run the Application:

    cargo run --release -- <path_to_csv_file>

Usage

Command Line

To open a CSV file with csbee, use the following command:

csbee <path_to_csv_file>

Keybindings

Normal Mode

  • F: Enter Filter mode.
  • Q: Enter Query mode.
  • O: Enter Order By mode.
  • T: Enter Table view mode.
  • S: Enter Schema view mode.
  • q: Quit the application.

Query Mode

use df as the table name when query with csbee.

  • Enter: Submit the query.
  • Any character: Add character to query input.
  • Backspace: Delete character from query input.
  • Left Arrow: Move cursor left in query input.
  • Right Arrow: Move cursor right in query input.
  • Esc: Exit query mode and return to Normal mode.

Filter Mode

  • Enter: Submit the filter.
  • Any character: Add character to filter input.
  • Backspace: Delete character from filter input.
  • Left Arrow: Move cursor left in filter input.
  • Right Arrow: Move cursor right in filter input.
  • Esc: Exit Filter mode and return to Normal mode.

Schema Mode

  • j / Down Arrow: Scroll down in the schema.
  • k / Up Arrow: Scroll up in the schema.
  • h / Left Arrow: Scroll left in the schema.
  • l / Right Arrow: Scroll right in the schema.
  • Esc: Exit Schema mode and return to Normal mode.

Blocks

  • Tab: Switch between different blocks (Schema, Table, Filter, Query, Order By).

Contributing

We welcome contributions from the community! If you find a bug or have a feature request, please open an issue on the GitHub repository. To contribute code, fork the repository, create a new branch with a descriptive name, make your changes, and open a pull request.

Development Setup

  1. Fork the Repository: Click the "Fork" button at the top of the repository page.
  2. Clone Your Fork:
    git clone https://github.com/rhasanm/csbee.git
    cd csbee
  3. Create a Branch:
    git checkout -b my-feature-branch
  4. Make Changes: Implement your changes or new features.
  5. Run Tests: Ensure all tests pass.
    cargo test
  6. Commit and Push:
    git add .
    git commit -m "Description of your changes"
    git push origin my-feature-branch
  7. Open a Pull Request: Go to the original repository and open a pull request from your fork.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

  • Built with ratatui, a Rust library for building terminal user interfaces.
  • Inspired by the need for efficient CSV data inspection and manipulation in terminal environments.

Thank you for using csbee! If you have any questions or need further assistance, feel free to open an issue on GitHub or contact us at [hasanrakibul.masum@gmail.com].

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages