{"id":46349156,"url":"https://github.com/ribbondz/rsv","last_synced_at":"2026-03-04T22:31:05.161Z","repository":{"id":65281982,"uuid":"584666731","full_name":"ribbondz/rsv","owner":"ribbondz","description":"A command-line tool written in Rust for analyzing CSV, TXT, and Excel files.","archived":false,"fork":false,"pushed_at":"2026-01-09T13:56:32.000Z","size":2766,"stargazers_count":190,"open_issues_count":6,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-02-15T06:03:01.089Z","etag":null,"topics":["cli","command-line","csv","excel","parser","rust","txt","xlsx"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ribbondz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-01-03T07:46:49.000Z","updated_at":"2026-01-26T23:25:22.000Z","dependencies_parsed_at":"2024-05-10T12:42:04.932Z","dependency_job_id":"86cb45ab-ad57-488a-8cb3-8fb486161e87","html_url":"https://github.com/ribbondz/rsv","commit_stats":{"total_commits":146,"total_committers":2,"mean_commits":73.0,"dds":0.4794520547945206,"last_synced_commit":"7ff5b8d8efe258a204e403ccf7f013b9b64c91fd"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/ribbondz/rsv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ribbondz%2Frsv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ribbondz%2Frsv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ribbondz%2Frsv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ribbondz%2Frsv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ribbondz","download_url":"https://codeload.github.com/ribbondz/rsv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ribbondz%2Frsv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30096726,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T21:59:23.547Z","status":"ssl_error","status_checked_at":"2026-03-04T21:57:50.415Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","command-line","csv","excel","parser","rust","txt","xlsx"],"created_at":"2026-03-04T22:31:04.081Z","updated_at":"2026-03-04T22:31:05.076Z","avatar_url":"https://github.com/ribbondz.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# csv, excel toolkit written in Rust\n\n**rsv** is a command-line tool for handling both large and small CSV, TXT, EXCEL files efficiently. Key features include:\n\n- written in Rust\n- fast and parallel data processing (based on Rayon)\n- real-time progress bar\n- simple usage\n- support command pipelines\n\n## Usage\n\ndownload **rsv.exe** from the Release tab, and add it to system path.\n\n## Available commands\n\n- **head** - Show head n lines of CSV, TXT or EXCEL file.\n- **tail** - Show tail n lines of CSV, TXT or EXCEL file.\n- **header** - Show file headers.\n- **count** - Count the number of lines of file 🏃.\n- **estimate** - Fast estimate the number of lines.\n- **clean** - Clean file with escape char (e.g. \") or other strings 🏃.\n- **unique** - Drop duplicates of data.\n- **frequency** - Show frequency table for column(s) 🏃 ⭐️.\n- **split** - Split file into separate files sequentially or based on column value 🏃 ⭐️.\n- **select** - Select rows and columns by filter 🏃.\n- **flatten** - Prints flattened records to view records one by one.\n- **slice** - Prints a slice of rows from file.\n- **search** - Search with regexes 🏃 ⭐️.\n- **sort** - In-memory data sorting, support for at most two columns ⭐️.\n- **sample** - Data sampling based on priority queue.\n- **stats** - Statistics for column(s), including min, max, mean, unique, null 🏃 ⭐️.\n- **excel2csv** - Convert excel to csv.\n- **to** - Save command output data to disk, can be one of TXT, CSV, TSV, XLSX or XLS.\n- **table** - Format data as an aligned table.\n\nTips 1:\n\n- 🏃 indicates support for a real-time progress bar.\n- ⭐️ indicates support for parallel data processing.\n\nTips 2:\n\nAll commands, except \"clean\" and \"excel2csv\", are allowed to be chained.\n\nTips 3:\n\nYou can always check the usage of each command by executing **rsv command --help** or **rsv command -h**,\nfor example, rsv frequency --help.\n\n## Basic Usage\n\n- **rsv head**\n\n```shell\nrsv head data.csv                   # default to show head 10 records\nrsv head -n 5 data.csv              # show head 5 records\nrsv head data.xlsx                  # EXCEL file, default to first sheet\nrsv head --sheet 1 data.xlsx        # second sheet\nrsv head --help                     # help info on all flags\n```\n\n- **rsv tail**\n\n```shell\nrsv tail data.csv                   # default to show tail 10 records\nrsv tail -n 5 data.csv              # show tail 5 records\nrsv tail data.xlsx                  # EXCEL file, default to first sheet\nrsv tail --sheet 1 data.xlsx        # second sheet\nrsv tail --help                     # help info on all flags\n```\n\n- **rsv header**\n\n```shell\nrsv headers data.csv                # separator \",\" (default)\nrsv headers -s \\t data.csv          # separator tab\nrsv headers data.xlsx               # EXCEL file\nrsv headers --help                  # help info on all flags\n```\n\n- **rsv count**\n\n```shell\nrsv count data.csv                  # plain-text file\nrsv count data.xlsx                 # EXCEL file\nrsv count --no-header data.csv\nrsv count --help                    # help info on all flags\n```\n\n- **rsv estimate**\n\n```shell\nrsv estimate data.csv\nrsv estimate data.xlsx\nrsv estimate --help                 # help info on all flags\n```\n\n- **rsv clean**\n\n```shell\nrsv clean data.csv                               # default to clean escape char \"\nrsv clean -e \"content-to-delete\" data.csv        # escape is a str, clean str to empty\nrsv clean -o new-file.csv data.csv               # save to new-file.csv, the default is data-cleaned.csv\nrsv clean --help                                 # help info on all flags\n```\n\n- **rsv unique**\n\n```shell\nrsv unique data.csv               # default to drop duplicates on all columns,\n                                  # default keep first record of duplicates\nrsv unique -c 0 data.csv          # drop on first column\nrsv unique -c 0,1 data.csv        # drop on first and second columns\nrsv unique --keep-last data.csv   # keep the last record when dropping\nrsv unique data.xlsx              # apply to EXCEL file\nrsv unique data.txt               # apply to TXT file\nrsv unique --help                 # help info on all flags\n\ncolumn selection syntax:\n-c 0,1,2,5   --\u003e    cols [0,1,2,5]\n-c 0-2,5     --\u003e    same as cols [0,1,2,5]\n-c -1        --\u003e    last column\n-c -2--1     --\u003e    last two columns\n```\n\n- **rsv frequency**\n\n```shell\nrsv frequency -c 0 data.csv              # default to the first column, descending order\nrsv frequency -c 0 data.xlsx             # EXCEL file\nrsv frequency -c 0,1,2,5 data.csv        # columns 0, 1, 2, and 5\nrsv frequency -c 0-2,5 data.csv          # same as above\nrsv frequency -c 0-2 --export data.csv   # export result to data-frequency.csv\nrsv frequency -n 10 data.csv             # keep top 10 frequent items\nrsv frequency -a 10 data.csv             # in ascending order\nrsv frequency --help                     # help info on all flags\n\ncolumn selection syntax:\n-c 0,1,2,5   --\u003e    cols [0,1,2,5]\n-c 0-2,5     --\u003e    same as cols [0,1,2,5]\n-c -1        --\u003e    last column\n-c -2--1     --\u003e    last two columns\n```\n\n- **rsv split**\n\n```shell\nrsv split data.csv                # default to first column and field separator of ,\nrsv split data.xlsx               # EXCEL file\nrsv split -s \\t data.csv          # tab separator\nrsv split -c 1 data.csv           # split based on second column\nrsv split -c 0 -s \\t data.csv     # first column, \\t separator\nrsv split --size 1000 data.xlsx   # Sequential split, 1000 records in a file.\nrsv split --help                  # help info on all flags\n```\n\n- **rsv select**\n\n```shell\nrsv select -f 0=a,b,c data.csv          # first column has values of a, b, or c\nrsv select -f 0=a,b,c data.xlsx         # EXCEL file, sheet can be specified with the --sheet flag\nrsv select -f \"0N\u003e10\u00261=c\" data.csv      # first column \u003e 10 numerically, AND the second column equals c\nrsv select -f \"0\u003e@1-10*(@3+2)\" data.csv # math calculation based on column 2 (@1) and column 4 (@3)\n                                        # left column is treated as numeric automatically\nrsv select -f 0!= --export data.csv     # export result, in which the first column is non-empty\nrsv select --help                       # help info on other options\n\nFilter syntax, support =, !=, \u003e, \u003e=, \u003c, \u003c= and \u0026:\n-f 0=a,b,c           --\u003e  first column is a, b, or c\n-f 0N=1,2            --\u003e  first column numerically equals to 1 or 2\n-f 0!=               --\u003e  first column is not empty\n-f \"0\u003e=2022-01-21\"   --\u003e  first column equal to or bigger than 2022-01-21, lexicographically\n-f \"0N\u003e10\"           --\u003e  first column \u003e 10 numerically\n-f \"0N\u003e10\u00262=pattern\" --\u003e  first column \u003e 10 numerically, AND the third column equals to \u003cpattern\u003e\n\nMath express syntax (support +, -, *, /, %, ^, (, )):\n-f \"0\u003e@1 + 1\"        --\u003e  first column \u003e second column plus one\n-f \"0\u003e=(@1+1)/(2^2)\" --\u003e  first column \u003e= (second column + 1) / (2 ^ 2)\n\nNOTE: 1. only \u0026 (AND) operation is supported, | (OR) operation is not supported;\n      2. quotes are needed when the filter contains special chars, e.g., \u0026, \u003e or \u003c;\n      3. The filter option can be omitted to select all rows.\n      4. The filter supports math expression calculation, where @ is used to refer to a column.\n         Math expression can only be provided on the RIGHT SIDE. Left side column is treated\n         automatically as a numeric column.\n\ncolumn selection syntax:\n-c 0,1,2,5   --\u003e    cols [0,1,2,5]\n-c 0-2,5     --\u003e    same as cols [0,1,2,5]\n-c -1        --\u003e    last column\n-c -2--1     --\u003e    last two columns\n```\n\n- **rsv flatten**\n\n```shell\nrsv flatten data.csv                       # default to show first 5 records\nrsv flatten -n 50 data.csv                 # show 50 records\nrsv flatten data.xls                       # EXCEL file\nrsv flatten --delimiter \"--\" data.csv      # change line delimiter to anything\nrsv flatten --help                         # help info on all flags\n```\n\n- **rsv slice**\n\n```shell\nrsv slice -s 100 -e 150 data.csv           # set start and end index\nrsv slice -s 100 -l 50 data.csv            # set start index and the length\nrsv slice -s 100 -l 50 data.xlsx           # EXCEL FILE\nrsv slice -s 100 -l 50 --export data.csv   # export to data-slice.csv\nrsv slice -e 10 --export data.csv          # set end index and export data\nrsv slice -i 9 data.csv                    # the 10th line sliced only\nrsv slice --help                           # help info on all flags\n```\n\n- **rsv search**\n\n```shell\nrsv search -p PATTERN data.csv                # search PATTERN\nrsv search -p \"^\\d{4}-\\d{2}-\\d{2}$\" data.csv  # search dates\nrsv search -p PATTERN --export data.csv       # export result\nrsv search -p PATTERN data.xlsx               # search EXCEL file\nrsv search -p PATTERN -c 0,1 data.xlsx        # search the first two columns\nrsv search -p PATTERN -c 0,1 -o 3-6 data.xlsx # select columns 3-6 in output\nrsv search -p PATTERN -S all data.xlsx        # search all sheets of EXCEL\nrsv slice --help                              # help info on all flags\n\ncolumn selection syntax (apply to both -f and -c filters):\n-c 0,1,2,5   --\u003e    cols [0,1,2,5]\n-c 0-2,5     --\u003e    same as cols [0,1,2,5]\n-c -1        --\u003e    last column\n-c -2--1     --\u003e    last two columns\n```\n\n- **rsv sample**\n\n```shell\nrsv sample data.csv                 # default to sample 10 records\nrsv sample --no-header data.csv     # no-header\nrsv sample -n 20 data.csv           # pull more\nrsv sample -n 20 data.xlsx          # EXCEL file\nrsv sample --seed 100 data.xlsx     # set a seed\nrsv sample --time-limit 2 data.xlsx # set time limit to 2 seconds for large file\nrsv sample -n 20 --export data.xlsx # data export\nrsv sample --help                   # help info on all flags\n```\n\n- **rsv sort**\n\n```shell\nrsv sort -c 0 data.csv        # default to sort by first column in ascending\nrsv sort -c 0D data.csv       # descending sort\nrsv sort -c 0DN data.csv      # sort as numeric values\nrsv sort -c 0DN,2N data.csv   # sort two columns\nrsv sort -E data.csv          # export result\nrsv sort data.xlsx            # sort EXCEL file\nrsv sort --help               # help info on all flags\n```\n\n- **rsv stats**\n\n```shell\nrsv stats data.csv                       # all columns, statistics include: min, max, mean, unique, null\nrsv stats data.xlsx                      # EXCEL FILE\nrsv stats -c 0,1 data.csv                # first two columns\nrsv stats -c 0,1 --export data.csv       # export to data-stats.csv\nrsv slice --help                         # help info on all flags\n```\n\n- **rsv excel2csv**\n\n```shell\nrsv excel2csv data.xlsx                 # apply to xlsx file, default to first sheet (or sheet1)\nrsv excel2csv data.xls                  # apply also to xls file\nrsv excel2csv --sheet 1 data.xls        # second sheet, e.g., sheet 2\nrsv excel2csv -S 1 data.xls             # same as above\nrsv excel2csv --help                    # help info on all flags\n```\n\n- **rsv table**\n\n```shell\nrsv head data.csv | rsv table                   # convert result to an aligned table\nrsv slice -s 10 -e 15 data.csv | rsv table      # convert result to an aligned table\nrsv table --help                                # help info on all flags\n```\n\n- **rsv to**\n\n```shell\nrsv head data.csv | rsv to data.xlsx                      # save to the data.xlsx file\nrsv head data.csv | rsv to data.xlsx --text-columns 0,1   # regard first two columns as texts\nrsv head data.csv | rsv to data.xlsx --date-columns 0,1   # regard first two columns as date or datetime\nrsv to --help                                             # help info on all flags\n```\n\n## Command pipeline\n\n- **two commands pipelined**\n\n```shell\nrsv search \"^\\d{4}-\\d{2}-\\d{2}$\" data.csv | rsv table     # search date and print in an aligned table\nrsv select -f 0=a,b data.csv | rsv frequency -c 0         # filter rows and get its frequency table\nrsv select -f \"0!=\u00262N\u003e10\" data.csv | rsv head -n 5        # filter rows, and show head 5 records\nrsv select -f \"2N=10,20\" -c 0-4 data.csv | rsv stats      # filter rows, select columns and make statistics\nrsv select -f \"2N=10,20\" -c 0-4 data.csv | rsv sort -c 2  # filter rows, select columns and sort data\n```\n\n- **more commands pipelined**\n\n```shell\nrsv search pattern1 data.csv | rsv sort -c 1ND | rsv table             # search, sort and print\nrsv select -f 1=a,b data.csv | rsv search pattern | rsv stats          # select, search, and make statistics\nrsv select -f \"0N\u003e=10\u00260N\u003c20\" data.csv | rsv search pattern | rsv table # select, search, and print in a table\n```\n\n## Data export\n\n- **method 1: by the --export or -E flag, support exporting to csv file only**\n\n```shell\nrsv slice -s 1000 -e 2000 --export data.csv           # the data export flag\nrsv slice -s 1000 -e 2000 -E data.csv                 # same as above\nrsv search --export pattern data.xlsx                 # export search data\nrsv select -f \"0N\u003e=10\" --export pattern data.xlsx     # export select data\n```\n\n- **method 2: by \"rsv to\" subcommand, support csv, txt, tsv, excel**\n\n```shell\nrsv slice -s 1000 -e 2000 data.csv | rsv to out.csv          # export to CSV\nrsv slice -s 1000 -e 2000 data.csv | rsv to out.xlsx         # export to EXCEL\nrsv search pattern data.xlsx | rsv to out.tsv                # export to TSV\nrsv select -f \"0N\u003e=10\" pattern data.xlsx | rsv to out.txt    # export to TXT\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fribbondz%2Frsv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fribbondz%2Frsv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fribbondz%2Frsv/lists"}