com.mindprod.csv
Class CSVToSRS
java.lang.Object
com.mindprod.csv.CSVToSRS
public final class CSVToSRS
- extends java.lang.Object
Converts a 2-column CSV file to a first cut at a Funduc Search Replace SRS Script.
Use: java.exe com.mindprod.CSVToSRS pairs.csv
- Since:
- 2008-05-28
- Version:
- 3.6 2011-03-02 apply prelude and postlude to create a complete script that needs tweaking.
- Author:
- Roedy Green, Canadian Mind Products
Constructor Summary |
CSVToSRS(java.io.File file,
char separatorChar,
char quoteChar,
java.lang.String commentChars,
java.lang.String encoding)
Constructor to preapare a Funduc SRS search/replace script from a CSV file. |
Method Summary |
static void |
main(java.lang.String[] args)
Simple command line interface to CSVToSRS. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CSVToSRS
public CSVToSRS(java.io.File file,
char separatorChar,
char quoteChar,
java.lang.String commentChars,
java.lang.String encoding)
throws java.io.IOException
- Constructor to preapare a Funduc SRS search/replace script from a CSV file.
- Parameters:
file
- CSV file to be packed to remove excess space and quotes.separatorChar
- field separator character, usually ',' in North America, ';' in Europe and sometimes '\t' for
tab for the output file. It is tab for the input file.
Note this is a 'char' not a "string".quoteChar
- character used to quote fields containing awkward chars.commentChars
- chars to treat at comment lead-ins.encoding
- encoding of input and output.
- Throws:
java.io.IOException
- if problems reading/writing file
main
public static void main(java.lang.String[] args)
- Simple command line interface to CSVToSRS. Prepares one csv file whose name is on the command line to the guts of
a Funduc Search/Replace script.. Must have
extension .csv
Use java com.mindprod.CSVToSRS somefile.csv. You can use CSVToSRS constructor
in your own programs.
- Parameters:
args
- name of csv file to remove excess quotes and space