Skip to content

Command line processing of CSV files

License

Notifications You must be signed in to change notification settings

mrkschneider/cpptab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cpptab - Command line processing of CSV files

Summary

cpptab is a command line tool for processing CSV files, inspired by csvkit and xsv. It is very much a toy project, aiming at balancing fast runtime speed with clear, maintainable source code. Due to the complexities of character encoding and CSV formats in the wild, bugs are to be expected at this stage.

Dependencies

To compile cpptab, create a file called 'Makefile.env' in the project directory, setting environment variables to the paths of the following libraries:

Commands

Use tab --help and tab --help to get a full list of implemented commands and arguments. Input CSV files can be supplied as positional arguments or via STDIN.

  • select - Print rows with particular columns values. Takes either a regular character string or regular expression.
  • cut - Print a selection of columns.
  • join - Join two columns (similar to a natural join)

CSV format

Different delimiters can be selected, but are limited to a single character. Strictly speaking, only ASCII encoding is supported, although it should work for most UTF-8 files. Explicit support for different encodings might be added later. Quotes and escape sequences are not supported right now.

Future plans

Additional possible/planned features include

  • Additional join operations (left, right, full join) for combining multiple tables
  • Different encodings
  • Quotes
  • Table summary and statistics
  • Sorting

Disclaimer

This is a project I maintain for fun in my free time, with no implied guarantees regarding support, completeness or fitness for any particular purpose. I am grateful for suggestions, bug reports or pull requests, but I might not respond to every request.

About

Command line processing of CSV files

Resources

License

Stars

Watchers

Forks

Packages

No packages published