-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
1,334 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# vscode | ||
.vscode/ | ||
.tests/ | ||
|
||
# Eclipse | ||
source/.classpath | ||
source/.project | ||
source/.settings/ | ||
|
||
# Mac | ||
.DS_Store | ||
|
||
# Maven | ||
source/dependency-reduced-pom.xml | ||
source/target/ | ||
|
||
*.class | ||
*.*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,63 @@ | ||
# mergecsv | ||
# MergeCSV | ||
|
||
MergeCSV project | ||
|
||
## Overview | ||
|
||
I have a Java project and it was a necessity to merge two CSV file into one with the help of another CSV that shall serve as a template for the resulting merged CSV file. | ||
|
||
## Prerequisite | ||
|
||
[Java 8](https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) | ||
|
||
[Maven 3](https://maven.apache.org/download.cgi) | ||
|
||
 | ||
|
||
## Building & Running | ||
|
||
This application is written in Java and built using Maven. The code has been tested on Linux. To build the code: | ||
|
||
``` | ||
cd source | ||
mvn clean install | ||
``` | ||
|
||
## Testing | ||
|
||
- Create output.csv | ||
|
||
``` | ||
cd source | ||
java -cp target/mergecsv-1.0.7.jar com.albon.util.MergeCSV \ | ||
--a test_files/5f780f0c.csv --b test_files/b44fb40f.csv \ | ||
--t test_files/template.csv --o output.csv | ||
``` | ||
|
||
- The results: | ||
``` | ||
# Should display result as follows: | ||
# Template 'test_files/template.csv' contains 4 columns | ||
# Input 1 'test_files/5f780f0c.csv' contains 6 columns | ||
# Input 2 'test_files/b44fb40f.csv' contains 6 columns | ||
# Creating output 'output.csv' | ||
# Merged 50 CSV records, Ignored 0 CSV record(s). | ||
``` | ||
|
||
## Verification | ||
|
||
``` | ||
cd source | ||
diff -cads output.csv test_files/results.csv | ||
# Should display as follows: | ||
# Files output.csv and test_files/results.csv are identical | ||
``` | ||
|
||
## License | ||
|
||
This project is released under the MIT License. | ||
|
||
## Contact Information | ||
|
||
This project is developed and maintained by [Teddy Albon Sr](mailto:[email protected]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# example directory | ||
|
||
- I will add other useful information here in the future. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.vscode/ | ||
.classpath | ||
.project | ||
.settings/ | ||
target/ | ||
*.class | ||
output.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 Teddy Albon Sr. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# MergeCSV | ||
|
||
MergeCSV project | ||
|
||
## Overview | ||
|
||
I have a Java project and it was a necessity to merge two CSV file into one with the help of another CSV that shall serve as a template for the resulting merged CSV file. | ||
|
||
## Prerequisite | ||
|
||
[Java 8](https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) | ||
|
||
[Maven 3](https://maven.apache.org/download.cgi) | ||
|
||
 | ||
|
||
## Building & Running | ||
|
||
This application is written in Java and built using Maven. The code has been tested on Linux. To build the code: | ||
|
||
``` | ||
mvn clean install | ||
``` | ||
|
||
## Testing | ||
|
||
- Create output.csv | ||
|
||
``` | ||
java -cp target/mergecsv-1.0.7.jar com.albon.util.MergeCSV \ | ||
--a test_files/5f780f0c.csv --b test_files/b44fb40f.csv \ | ||
--t test_files/template.csv --o output.csv | ||
``` | ||
|
||
- The results: | ||
``` | ||
# Should display result as follows: | ||
# Template 'test_files/template.csv' contains 4 columns | ||
# Input 1 'test_files/5f780f0c.csv' contains 6 columns | ||
# Input 2 'test_files/b44fb40f.csv' contains 6 columns | ||
# Creating output 'output.csv' | ||
# Merged 50 CSV records, Ignored 0 CSV record(s). | ||
``` | ||
|
||
## Verification | ||
|
||
``` | ||
diff -cads output.csv test_files/results.csv | ||
# Should display as follows: | ||
# Files output.csv and test_files/results.csv are identical | ||
``` | ||
|
||
## License | ||
|
||
This project is released under the MIT License. | ||
|
||
## Contact Information | ||
|
||
This project is developed and maintained by [Teddy Albon Sr](mailto:[email protected]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>com.albon.util</groupId> | ||
<artifactId>mergecsv</artifactId> | ||
<version>1.0.7</version> | ||
<packaging>jar</packaging> | ||
|
||
<name>mergecsv</name> | ||
<url>http://maven.apache.org</url> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>3.8.1</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
Oops, something went wrong.