Skip to content

Commit

Permalink
relaunch
Browse files Browse the repository at this point in the history
  • Loading branch information
T-F-S committed Jul 9, 2014
1 parent d8eeb2f commit c5654b5
Show file tree
Hide file tree
Showing 23 changed files with 3,370 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

releases/
*~
27 changes: 27 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright (c) 2014, Prof. Dr. Dr. Thomas F. Sturm
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
csvsorter
CSV-Sorter
=========

The `csvsorter` program serves to sort CSV files.

It is a Java command-line program which
processes one CSV input file to one CSV output file
controlled by an XML configuration file. Depending on the configuration,
`csvsorter` can deal with different formats, separators, delimiters,
various sorting presets, header and no header files.

The `csvsorter` program was developed as external sorting program for the
[`csvsimple`](http://www.ctan.org/tex-archive/macros/latex/contrib/csvsimple)
`LaTeX`-package. But it can be used for any CSV sorting task.

## Documentation

[PDF Documentation](http://T-F-S.github.io/csvsorter/csvsorter.pdf)

## License

This application is licensed under the
[3-Clause ("New") BSD license](http://opensource.org/licenses/BSD-3-Clause).
3 changes: 3 additions & 0 deletions build.number
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#Build Number for ANT. Do not edit!
#Wed Jul 09 12:24:35 CEST 2014
build.number=52
180 changes: 180 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="CSVSorter program" default="makeJar" basedir=".">
<description>
CSV-Sorter ANT build
</description>

<property name="version.number" value="0.92-beta"/>
<property name="version.date" value="2014/07/09"/>

<property name="root" location="."/>
<property name="src" location="${root}/src"/>
<property name="build" location="${root}/bin_ant"/>
<property name="dist" location="${root}/dist"/>
<property name="archive" location="${root}/archive"/>
<property name="testbed" location="${root}/testbed"/>

<property name="package" value="tfs/csvsorter"/>
<property name="jar.name" value="csvsorter"/>
<property name="MainProg.name" value="CSVSorter"/>
<property name="MainProg.source" location="${src}/${package}/${MainProg.name}.java"/>
<property name="mainClass" value="tfs.csvsorter.CSVSorter"/>

<property name="docdir" location="${root}/doc"/>
<property name="jobname" value="csvsorter"/>


<!-- /////////////////////////////////////////////////////////////////////////// -->
<target name="init">
<tstamp/>
</target>


<!-- /////////////////////////////////////////////////////////////////////////// -->
<target name="versioning" description="imprint the version information" >
<buildnumber/>
<replaceregexp file="${MainProg.source}"
match="VERSION(\s)*=(.*);"
replace='VERSION = "${version.number}";'
byline="true"/>
<replaceregexp file="${MainProg.source}"
match="DATE(\s)*=(.*);"
replace='DATE = "${version.date}";'
byline="true"/>
<replaceregexp file="${MainProg.source}"
match="BUILD(\s)*=(.*);"
replace='BUILD = ${build.number};'
byline="true"/>
<replaceregexp file="${docdir}/${jobname}.tex"
match="\%\% The csvsorter program(.*)"
replace='\%\% The csvsorter program - version ${version.number} (${version.date})'
byline="true"/>
<replaceregexp file="${docdir}/${jobname}.tex"
match="(.*)def\\version\{(.*)\}"
replace='\\\\def\\\\version{${version.number}}'
byline="true"/>
<replaceregexp file="${docdir}/${jobname}.tex"
match="(.*)def\\datum\{(.*)\}"
replace='\\\\def\\\\datum{${version.date}}'
byline="true"/>
</target>


<!-- /////////////////////////////////////////////////////////////////////////// -->
<target name="compileDebug" depends="init" description="debug compile the source" >
<mkdir dir="${build}/${package}" />
<javac srcdir="${src}"
destdir="${build}"
includes="${package}/**"
deprecation="on"
debug="on"
includeAntRuntime="false"
/>
</target>


<!-- /////////////////////////////////////////////////////////////////////////// -->
<target name="compile" depends="init" description="compile the source" >
<mkdir dir="${build}/${package}" />
<!-- The bootstrap option is missing in the following -->
<javac srcdir="${src}"
destdir="${build}"
includes="${package}/**"
deprecation="on"
includeAntRuntime="false"
source="1.6"
target="1.6"
>
</javac>
</target>


<!-- /////////////////////////////////////////////////////////////////////////// -->
<target name="-jarIt" description="Core of the jar building" >
<jar jarfile="${build}/${jar.name}.jar">
<fileset dir="${build}">
<include name="${package}/**/*.class"/>
</fileset>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Built-Date" value="${TODAY} ${TSTAMP}"/>
<attribute name="Main-Class" value ="${mainClass}" />
<attribute name="Specification-Title" value="CSV-Sorter"/>
</manifest>
</jar>
</target>


<!-- /////////////////////////////////////////////////////////////////////////// -->
<target name="makeJar" depends="versioning,compile,-jarIt" description="build jar-Datei" >
</target>



<!-- /////////////////////////////////////////////////////////////////////////// -->
<target name="testbed" depends="clean,compileDebug,-jarIt" description="copy jar-Datei to testbed" >
<mkdir dir="${testbed}" />
<copy todir="${testbed}">
<fileset dir="${build}">
<include name="${jar.name}.jar"/>
</fileset>
</copy>
</target>


<!-- /////////////////////////////////////////////////////////////////////////// -->
<target name="runTestbed" depends="init,testbed" description="starts the program" >
<java jar="${testbed}/${jar.name}.jar"
fork="true"
dir="${testbed}"
failonerror="true"
jvm="javaw"
>
<arg value="-c" />
<arg value="stresstest.xml" />
</java>
</target>


<!-- /////////////////////////////////////////////////////////////////////////// -->
<target name="pdflatex" description="PDF-LaTeX" if="jobname">
<exec executable="pdflatex" dir="${docdir}">
<arg line="--quiet --shell-escape ${jobname}"/>
</exec>
</target>



<!-- /////////////////////////////////////////////////////////////////////////// -->
<target name="documentation" depends="init" description="Build PDF documentation" if="jobname">
<antcall target="pdflatex"/>
<antcall target="pdflatex"/>
</target>



<!-- /////////////////////////////////////////////////////////////////////////// -->
<target name="distribution" depends="clean,makeJar,documentation" description="generate the distribution" >
<mkdir dir="${dist}" />
<copy todir="${dist}">
<fileset dir="${build}">
<include name="${jar.name}.jar"/>
</fileset>
</copy>
<copy todir="${dist}">
<fileset dir="${docdir}">
<include name="${jobname}.pdf"/>
</fileset>
</copy>
<zip destfile="${archive}/csvsorter_${DSTAMP}.zip" basedir="${dist}"/>
</target>


<!-- /////////////////////////////////////////////////////////////////////////// -->
<target name="clean" description="clean up" >
<delete dir="${build}" />
<delete dir="${dist}" />
</target>


</project>
Loading

0 comments on commit c5654b5

Please sign in to comment.