Skip to content

Commit 50937c6

Browse files
committed
initial version
* implement minimal features: * `--schema` - print an access db's schema * `[tablename]` - export a table to stdin * nothing - export all tables to individual CSVs * documentation in readme * various eclipse/ant build files refs gainesville-green:#1063 (2)
0 parents  commit 50937c6

File tree

11 files changed

+236
-0
lines changed

11 files changed

+236
-0
lines changed

.classpath

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
5+
<classpathentry exported="true" kind="lib" path="lib/jackcess-2.0.2.jar"/>
6+
<classpathentry exported="true" kind="lib" path="lib/commons-logging-1.1.3.jar"/>
7+
<classpathentry exported="true" kind="lib" path="lib/commons-lang-2.6.jar"/>
8+
<classpathentry exported="true" kind="lib" path="lib/opencsv-2.3.jar"/>
9+
<classpathentry kind="output" path="bin"/>
10+
</classpath>

.project

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>access2csv</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2013 Accelerated Data Works, Ryan Davis
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# access2csv
2+
3+
Simple program to extract data from Access databases into CSV files.
4+
5+
## Features
6+
7+
* view the schema of the database
8+
* export all tables to csv files named after the table
9+
* export one table
10+
11+
## Examples
12+
13+
Dumping a schema:
14+
15+
$ java -jar access2csv.jar myfile.accdb --schema
16+
CREATE TABLE Test(
17+
Id INT,
18+
Name TEXT,
19+
)
20+
CREATE TABLE Test2(
21+
Id INT,
22+
Name TEXT
23+
)
24+
25+
Exporting all tables:
26+
27+
$ java -jar access2csv.jar myfile.accdb
28+
Exporting 'Test' to /home/ryepup/Test.csv
29+
2 rows exported
30+
Exporting 'Test2' to /home/ryepup/Test2.csv
31+
100000 rows exported
32+
33+
Export one table:
34+
35+
$ java -jar access2csv.jar myfile.accdb Test
36+
1,"foo"
37+
2,"bar"
38+
39+
## Depenencies
40+
41+
* [Jackess](http://jackcess.sourceforge.net/) - a pure Java library
42+
for reading from and writing to MS Access databases
43+
* [opencsv](http://opencsv.sourceforge.net/) - CSV library
44+

build.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<project default="create_run_jar" name="Create Runnable Jar for Project access2csv with Jar-in-Jar Loader">
3+
<!--this file was created by Eclipse Runnable JAR Export Wizard-->
4+
<!--ANT 1.7 is required -->
5+
<target name="create_run_jar">
6+
<jar destfile="/home/ACCELERATION/ryepup/access2csv/access2csv.jar">
7+
<manifest>
8+
<attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/>
9+
<attribute name="Rsrc-Main-Class" value="access2csv.Driver"/>
10+
<attribute name="Class-Path" value="."/>
11+
<attribute name="Rsrc-Class-Path" value="./ jackcess-2.0.2.jar commons-logging-1.1.3.jar commons-lang-2.6.jar opencsv-2.3.jar"/>
12+
</manifest>
13+
<zipfileset src="jar-in-jar-loader.zip"/>
14+
<fileset dir="/home/ACCELERATION/ryepup/access2csv/bin"/>
15+
<zipfileset dir="/home/ACCELERATION/ryepup/access2csv/lib" includes="jackcess-2.0.2.jar"/>
16+
<zipfileset dir="/home/ACCELERATION/ryepup/access2csv/lib" includes="commons-logging-1.1.3.jar"/>
17+
<zipfileset dir="/home/ACCELERATION/ryepup/access2csv/lib" includes="commons-lang-2.6.jar"/>
18+
<zipfileset dir="/home/ACCELERATION/ryepup/access2csv/lib" includes="opencsv-2.3.jar"/>
19+
</jar>
20+
</target>
21+
</project>

jar-in-jar-loader.zip

7.22 KB
Binary file not shown.

lib/commons-lang-2.6.jar

278 KB
Binary file not shown.

lib/commons-logging-1.1.3.jar

60.6 KB
Binary file not shown.

lib/jackcess-2.0.2.jar

773 KB
Binary file not shown.

lib/opencsv-2.3.jar

13.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)