This is my first C++ project, created for learning purposes only. Displays a formatted terminal table from a CSV source file containing name, age, and gender data.
For macos/linux:
./formatted-table <csv-file> [options]For Windows:
./formatted-table.exe <csv-file> [options]- csv-file: Path to the input CSV data file (required).
- -n, --name-width: Custom width for the 'Name' column (default: 25).
- -a, --age-width: Custom width for the 'Age' column (default: 5).
- -g, --gender-width: Custom width for the 'Gender' column (default: 6).
# Default table column width configuration.
./formatted-table data.csv
# Custom table column width configuration.
./formatted-table data.csv -n 20 -a 8 -g 8
./formatted-table data.csv --name-width 20 --age-width 8 --gender-width- Validates CSV file extension.
- Enforces positive column width.
- Prints table from CSV file.
- C++20 compliant compiler.
- p-ranav/argparse for CLI argument parsing.
- fmt for pretty printing table.
- Populates data using
people::populatePeopleListFromCSV(). - Generates ASCII borders and aligns columns dynamically.
- Error handling for invalid inputs.
Use this for building this project in the current directory:
cmake -B build -S .
cd build && makeThere will appear a formatted-table (or formatted-table.exe) file, in the build/ directory. Another option would be to download directly from releases tab.