/csvconverter

Small php framework used to convert CSV file to any other formats.

Primary LanguagePHP

Small php framework used to convert CSV file to any other formats.

Conversions are implemented using the strategy pattern.

The following strategies are available :
 * CSV -> HTML
 * CSV -> PDF (using http://www.digitaljunkies.ca/dompdf/)

The following templates are available :
 * Scrum cards

CLI documentation :

  # Global help
  $ ./bin/csv-convert -h

Strategy based CSV file converter

Usage:
  ./bin/csv-convert [options]
  ./bin/csv-convert [options] <command> [options] [args]

Options:
  -o FILEPATH, --output=FILEPATH  path to output file (defaults to
                                  "./converted.out")
  -m MAP, --map=MAP               CSV columns map
  -h, --help                      show this help message and exit
  -v, --version                   show the program version and exit

Commands:
  to-html    converts a CSV file to an HTML file (provided by
             File_CSV_Converter_Strategy_ToHTML)
  to-dompdf  converts a CSV file to a PDF file using dompdf (provided by
             File_CSV_Converter_Strategy_ToDomPDF)

  # HTML conversion subcommand
  $ ./bin/csv-convert to-html -h

Converts a CSV file to an HTML file (provided by
File_CSV_Converter_Strategy_ToHTML)

Usage:
  ./bin/csv-convert [options] to-html [options] <input_file>

Options:
  -t DIRECTORY, --templates-dir=DIRECTORY  path to the directory containing
                                           the templates
  -h, --help                               show this help message and exit

Arguments:
  input_file  path to input file

  # PDF conversion subcommand
  $ ./bin/csv-convert to-html -h

Converts a CSV file to a PDF file using dompdf (provided by
File_CSV_Converter_Strategy_ToDomPDF)

Usage:
  ./bin/csv-convert [options] to-dompdf [options] <input_file>

Options:
  -o orientation, --orientation=orientation  document orientation
  -o format, --format=format                 paper format
  -t DIRECTORY, --templates-dir=DIRECTORY    path to the directory
                                             containing the templates
  -h, --help                                 show this help message and
                                             exit

Arguments:
  input_file  path to input file