Files
kotlin-fork/samples/csvparser/README.md
T
Alexander Podkhalyuzin bc941269f0 Fixed samples for the latest changes in Gradle plugin.
- Smaller gradle scripts.
- More structure in sample projects.
- Simplified build/run.
- Added gradle to the rest two samples.
- Almost removed all sh scripts.
- Gradle now works only inside of build directory.
- Fixed READMEs according to the new changes.
2017-06-08 17:21:04 +03:00

755 B

CSV parser

This example shows how one could implement simple comma separated values reader and parser in Kotlin. A sample data European Mammals Red List for 2009 from EU is being used.

To build use ../gradlew build or ./build.sh.

To run use ../gradlew run

To change run arguments, change property runArgs in gradle.propeties file or pass -PrunArgs="./European_Mammals_Red_List_Nov_2009.csv 4 100" to gradle run.

Alternatively you can run artifact directly

./build/konan/bin/CsvParser/CsvParser.kexe ./European_Mammals_Red_List_Nov_2009.csv 4 100

It will print number of all unique entries in fifth column (Family, zero-based index) in first 100 rows of the CSV file.