0
|
1 <html>
|
|
2 <head>
|
|
3 <title>MayaChemTools:Documentation:ModifyTextFilesFormat.pl</title>
|
|
4 <meta http-equiv="content-type" content="text/html;charset=utf-8">
|
|
5 <link rel="stylesheet" type="text/css" href="../../css/MayaChemTools.css">
|
|
6 </head>
|
|
7 <body leftmargin="20" rightmargin="20" topmargin="10" bottommargin="10">
|
|
8 <br/>
|
|
9 <center>
|
|
10 <a href="http://www.mayachemtools.org" title="MayaChemTools Home"><img src="../../images/MayaChemToolsLogo.gif" border="0" alt="MayaChemTools"></a>
|
|
11 </center>
|
|
12 <br/>
|
|
13 <div class="DocNav">
|
|
14 <table width="100%" border=0 cellpadding=0 cellspacing=2>
|
|
15 <tr align="left" valign="top"><td width="33%" align="left"><a href="./ModifySDFilesDataFields.html" title="ModifySDFilesDataFields.html">Previous</a> <a href="./index.html" title="Table of Contents">TOC</a> <a href="./MolFilesToSD.html" title="MolFilesToSD.html">Next</a></td><td width="34%" align="middle"><strong>ModifyTextFilesFormat.pl</strong></td><td width="33%" align="right"><a href="././code/ModifyTextFilesFormat.html" title="View source code">Code</a> | <a href="./../pdf/ModifyTextFilesFormat.pdf" title="PDF US Letter Size">PDF</a> | <a href="./../pdfgreen/ModifyTextFilesFormat.pdf" title="PDF US Letter Size with narrow margins: www.changethemargins.com">PDFGreen</a> | <a href="./../pdfa4/ModifyTextFilesFormat.pdf" title="PDF A4 Size">PDFA4</a> | <a href="./../pdfa4green/ModifyTextFilesFormat.pdf" title="PDF A4 Size with narrow margins: www.changethemargins.com">PDFA4Green</a></td></tr>
|
|
16 </table>
|
|
17 </div>
|
|
18 <p>
|
|
19 </p>
|
|
20 <h2>NAME</h2>
|
|
21 <p>ModifyTextFilesFormat.pl - Change CSV Textfile(s) into TSV Textfile(s) and vice versa</p>
|
|
22 <p>
|
|
23 </p>
|
|
24 <h2>SYNOPSIS</h2>
|
|
25 <p>ModifyTextFilesFormat.pl TextFile(s)...</p>
|
|
26 <p>ModifyTextFilesFormat.pl [<strong>-h, --help</strong>] [<strong>--indelim</strong> comma | semicolon]
|
|
27 [<strong>--outdelim</strong> comma | tab | semicolon] [<strong>-q, --quote</strong> yes | no] [<strong>-r, --root</strong> rootname]
|
|
28 [<strong>-w, --workingdir</strong> dirname] TextFile(s)...</p>
|
|
29 <p>
|
|
30 </p>
|
|
31 <h2>DESCRIPTION</h2>
|
|
32 <p>Interchange CSV and TSV <em>TextFile(s)</em> format. Mutiple file names are separated by spaces.
|
|
33 The valid file extensions are <em>.csv</em> and <em>.tsv</em> for comma/semicolon and tab delimited
|
|
34 text files respectively. All other file names are ignored. All the text files in a current
|
|
35 directory can be specified by <em>*.csv</em>, <em>*.tsv</em>, or the current directory name. The
|
|
36 <strong>--indelim</strong> option determines the format of <em>TextFile(s)</em>. Any file which doesn't
|
|
37 correspond to the format indicated by <strong>--indelim</strong> option is ignored.</p>
|
|
38 <p>
|
|
39 </p>
|
|
40 <h2>OPTIONS</h2>
|
|
41 <dl>
|
|
42 <dt><strong><strong>-h, --help</strong></strong></dt>
|
|
43 <dd>
|
|
44 <p>Print this help message.</p>
|
|
45 </dd>
|
|
46 <dt><strong><strong>--indelim</strong> <em>comma | semicolon</em></strong></dt>
|
|
47 <dd>
|
|
48 <p>Input delimiter for CSV <em>TextFile(s)</em>. Possible values: <em>comma or semicolon</em>.
|
|
49 Default value: <em>comma</em>. For TSV files, this option is ignored and <em>tab</em> is used as a
|
|
50 delimiter.</p>
|
|
51 </dd>
|
|
52 <dt><strong><strong>-o, --overwrite</strong></strong></dt>
|
|
53 <dd>
|
|
54 <p>Overwrite existing files.</p>
|
|
55 </dd>
|
|
56 <dt><strong><strong>--outdelim</strong> <em>comma | tab | semicolon</em></strong></dt>
|
|
57 <dd>
|
|
58 <p>Output text file delimiter. Possible values: <em>comma, tab, or semicolon</em>
|
|
59 Default value: <em>comma</em>.</p>
|
|
60 </dd>
|
|
61 <dt><strong><strong>-q, --quote</strong> <em>yes | no</em></strong></dt>
|
|
62 <dd>
|
|
63 <p>Put quotes around column values in output text file. Possible values: <em>yes or
|
|
64 no</em>. Default value: <em>yes</em>.</p>
|
|
65 </dd>
|
|
66 <dt><strong><strong>-r, --root</strong> <em>rootname</em></strong></dt>
|
|
67 <dd>
|
|
68 <p>New text file name is generated using the root: <Root>.<Ext>. Default new file
|
|
69 name: <InitialTextFileName>FormatModified.<Ext>. The csv, and tsv
|
|
70 <Ext> values are used for comma/semicolon, and tab delimited text files
|
|
71 respectively. This option is ignored for multiple input files.</p>
|
|
72 </dd>
|
|
73 <dt><strong><strong>-w, --workingdir</strong> <em>dirname</em></strong></dt>
|
|
74 <dd>
|
|
75 <p>Location of working directory. Default: current directory.</p>
|
|
76 </dd>
|
|
77 </dl>
|
|
78 <p>
|
|
79 </p>
|
|
80 <h2>EXAMPLES</h2>
|
|
81 <p>To convert Sample*.csv into TSV files, type:</p>
|
|
82 <div class="ExampleBox">
|
|
83 % ModifyTextFilesFormat.pl --outdelim tab -q no -o Sample*.csv</div>
|
|
84 <p>To convert Sample1.tsv into NewSample1.csv without any quotes around column
|
|
85 data values, type:</p>
|
|
86 <div class="ExampleBox">
|
|
87 % ModifyTextFilesFormat.pl --outdelim comma - q no
|
|
88 -r NewSample1 -o Sample1.tsv</div>
|
|
89 <p>
|
|
90 </p>
|
|
91 <h2>AUTHOR</h2>
|
|
92 <p><a href="mailto:msud@san.rr.com">Manish Sud</a></p>
|
|
93 <p>
|
|
94 </p>
|
|
95 <h2>SEE ALSO</h2>
|
|
96 <p><a href="./ModifyNewLineChar.html">ModifyNewLineChar.pl</a>
|
|
97 </p>
|
|
98 <p>
|
|
99 </p>
|
|
100 <h2>COPYRIGHT</h2>
|
|
101 <p>Copyright (C) 2015 Manish Sud. All rights reserved.</p>
|
|
102 <p>This file is part of MayaChemTools.</p>
|
|
103 <p>MayaChemTools is free software; you can redistribute it and/or modify it under
|
|
104 the terms of the GNU Lesser General Public License as published by the Free
|
|
105 Software Foundation; either version 3 of the License, or (at your option)
|
|
106 any later version.</p>
|
|
107 <p> </p><p> </p><div class="DocNav">
|
|
108 <table width="100%" border=0 cellpadding=0 cellspacing=2>
|
|
109 <tr align="left" valign="top"><td width="33%" align="left"><a href="./ModifySDFilesDataFields.html" title="ModifySDFilesDataFields.html">Previous</a> <a href="./index.html" title="Table of Contents">TOC</a> <a href="./MolFilesToSD.html" title="MolFilesToSD.html">Next</a></td><td width="34%" align="middle"><strong>March 29, 2015</strong></td><td width="33%" align="right"><strong>ModifyTextFilesFormat.pl</strong></td></tr>
|
|
110 </table>
|
|
111 </div>
|
|
112 <br />
|
|
113 <center>
|
|
114 <img src="../../images/h2o2.png">
|
|
115 </center>
|
|
116 </body>
|
|
117 </html>
|