WISKI CSV Translator

Usage

./wiski.py INPUT_FILENAME INPUT_TYPE OUTPUT_FILENAME

INPUT_FILENAME is a comma-separated file containing data in the format defined by INPUT_TYPE, and OUTPUT_FILENAME is the name of the destination CSV file. The destination will be overwritten if it already exists.

Dependencies

  • Python 2.6 or 2.7

Adding New Input Types

To add a new input type, copy the file Passthrough.py to a new file, INPUT_TYPE.py. Edit the file, changing instances of "Passthrough" to "INPUT_TYPE".

Next, edit wiski.py. The load_instructions function includes imports for each input type, and returns a list of the input types. Add an import for your new type (from INPUT_TYPE import INPUT_TYPE), and then add the newly-imported class to the list that is returned.

Finally, make the process_row function in INPUT_TYPE.py perform your row transformations!