Tablecopy copies a table from any of the (input-) supported formats into any of the (output-) supported ones. This is pretty trivial, since all the hard work is done using the generic I/O facilities described in section 3.
The application is the main
method of
TableCopy
, though it might get
moved in future releases.
Invoking it with the "-help
" flag will print a usage message.
Assuming STIL is on your classpath:
Usage: TableCopy [-ofmt <out-format>] <in-table> <out-table> Known out-formats: jdbc fits votable-tabledata votable-binary-inline votable-fits-href votable-binary-href votable-fits-inline text ascii html html-element latex latex-document miragewhich should be fairly self-explanatory. According to how you have downloaded STIL you may also be able to invoke it using the "
tablecopy
" script.
For some, though not all, output formats, using "-
" as the
out-table
argument will write to standard output.
You can't use the same trick for standard input I'm afraid.
Here are some examples of use:
tablecopy stars.fits stars.xml
tablecopy -ofmt text http://remote.host/data/vizier.xml.gz#4 -
java -Djdbc.drivers=com.mysql.jdbc.Driver -classpath stil.jar:mysql-connector-java-3.0.6-stable-bin.jar uk.ac.starlink.table.TableCopy -ofmt fits "jdbc:mysql://localhost/astro1#SELECT ra, dec, Imag, Kmag FROM dqc" wfslist.fit