Skip to content

Commit

Permalink
Version 1.0.7 on github
Browse files Browse the repository at this point in the history
  • Loading branch information
tmalbonph committed Feb 10, 2019
1 parent 3c7ab41 commit b339ef4
Show file tree
Hide file tree
Showing 15 changed files with 1,334 additions and 3 deletions.
18 changes: 18 additions & 0 deletions .gitignore
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
*.*~
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Teddy Albon
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
Expand All @@ -18,4 +18,4 @@ 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.
SOFTWARE.
63 changes: 62 additions & 1 deletion README.md
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)

![Source](source/README.md)

## 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])
3 changes: 3 additions & 0 deletions example/README.md
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.
7 changes: 7 additions & 0 deletions source/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.vscode/
.classpath
.project
.settings/
target/
*.class
output.csv
21 changes: 21 additions & 0 deletions source/LICENSE
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.
60 changes: 60 additions & 0 deletions source/README.md
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)

![Source](source/README.md)

## 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])
25 changes: 25 additions & 0 deletions source/pom.xml
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>
Loading

0 comments on commit b339ef4

Please sign in to comment.