Bug 33050: Allow to specify quote char in runreport.pl
authorFridolin Somers <fridolin.somers@biblibre.com>
Thu, 23 Feb 2023 06:40:14 +0000 (20:40 -1000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 8 Nov 2023 14:41:13 +0000 (11:41 -0300)
commit4d604ac2a942354bc903bc9c697d8b18d412e39b
tree9aa532b0343f739d1b11f299ead880dd786e38c5
parent2b6ec7064e3ecd6297b7fa27367babdba0c74f0d
Bug 33050: Allow to specify quote char in runreport.pl

Add to script misc/cronjobs/runreport.pl quote char arg (only for CSV).
See perl doc https://metacpan.org/pod/Text::CSV#new

This patch also adds missing '--separator' in POD.

Test plan :
1 - Write a SQL report
2 - perl misc/cronjobs/runreport.pl --format csv 1 (or correct report number)
3 - Note you get double quotes
4 - Apply patch
5 - Repeat #2 - no change
6 - perl misc/cronjobs/runreport.pl --format csv --quote "'" 1
7 - Now it is single quote delimited
8 - perl misc/cronjobs/runreport.pl --format tsv --separator "'" 1
9 - Error is reported, you cannot set quote unless csv
10 - Try empty string as quote

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
misc/cronjobs/runreport.pl