Lines 63-68
runreport.pl [ -h | -m ] [ -v ] reportID [ reportID ... ]
Link Here
|
63 |
--subject=s subject for the e-mail |
63 |
--subject=s subject for the e-mail |
64 |
--param=s parameters for the report |
64 |
--param=s parameters for the report |
65 |
--store-results store the result of the report |
65 |
--store-results store the result of the report |
|
|
66 |
--separator separator character for csv |
67 |
--quote quote character for csv |
66 |
--csv-header add column names as first line of csv output |
68 |
--csv-header add column names as first line of csv output |
67 |
|
69 |
|
68 |
|
70 |
|
Lines 93-98
Current options are text, html, csv, and tsv. At the moment, text and tsv both p
Link Here
|
93 |
|
95 |
|
94 |
Separator character, only for csv format. Default to comma. |
96 |
Separator character, only for csv format. Default to comma. |
95 |
|
97 |
|
|
|
98 |
=item B<--quote> |
99 |
|
100 |
Quote character, only for csv format. Default to double quote. |
101 |
Empty string is allowed. |
102 |
|
96 |
=item B<--email> |
103 |
=item B<--email> |
97 |
|
104 |
|
98 |
Whether to use e-mail (implied by --to or --from). |
105 |
Whether to use e-mail (implied by --to or --from). |
Lines 188-193
my $quote = '"';
Link Here
|
188 |
my $store_results = 0; |
195 |
my $store_results = 0; |
189 |
my $csv_header = 0; |
196 |
my $csv_header = 0; |
190 |
my $csv_separator = ""; |
197 |
my $csv_separator = ""; |
|
|
198 |
my $csv_quote = ""; |
191 |
|
199 |
|
192 |
my $username = undef; |
200 |
my $username = undef; |
193 |
my $password = undef; |
201 |
my $password = undef; |
Lines 201-206
GetOptions(
Link Here
|
201 |
'verbose' => \$verbose, |
209 |
'verbose' => \$verbose, |
202 |
'format=s' => \$format, |
210 |
'format=s' => \$format, |
203 |
'separator=s' => \$csv_separator, |
211 |
'separator=s' => \$csv_separator, |
|
|
212 |
'quote=s' => \$csv_quote, |
204 |
'to=s' => \$to, |
213 |
'to=s' => \$to, |
205 |
'from=s' => \$from, |
214 |
'from=s' => \$from, |
206 |
'subject=s' => \$subject, |
215 |
'subject=s' => \$subject, |
Lines 233-238
if ($csv_separator) {
Link Here
|
233 |
} |
242 |
} |
234 |
} |
243 |
} |
235 |
|
244 |
|
|
|
245 |
if ($csv_quote) { |
246 |
if ( $format eq 'csv' ) { |
247 |
$quote = "$csv_quote"; |
248 |
} else { |
249 |
print STDERR "Cannot specify quote if not using CSV format\n"; |
250 |
} |
251 |
} |
252 |
|
236 |
if ($format eq 'tsv' || $format eq 'text') { |
253 |
if ($format eq 'tsv' || $format eq 'text') { |
237 |
$format = 'csv'; |
254 |
$format = 'csv'; |
238 |
$separator = "\t"; |
255 |
$separator = "\t"; |
239 |
- |
|
|