This tool normalizes entries in a specified csv file and outputs the normalized entries to a new csv file.
Normalization includes:
- formatting the
Timetampcolumn entries to ISO-8601 format in the US/Eastern timezone. - ensuring all
ZIPcodes have five digits (by prefixing needed 0s) - converting
Full Namecolumn entries to upper case - providing
Total DurationforBar DurationandFoo Durationin milliseconds - replacing invalid UTF-8 characters with the Unicode Replacement character
The Address and Notes column values are passed through as is.
The normalizer tool is written in Java 8 and built using Maven on Mac OS 10.15. You will need maven installed on your machine (download here).
To run the program:
- Clone this repo.
- Once maven is installed, from the
normalizerdirectory, run:mvn cleanmvn install - These steps should create a jar with the required dependencies (
normalizer-1.0-SNAPSHOT-jar-with-dependencies.jar) in atargetdirectory. - Copy the jar to the
appdirectory; from that directory you can run:./normalizer <filename>. Note: I have included the jar inappfor demonstration purposes - You may need to give permissions to the normalizer script:
chmod 755 normalizer