The patron export is now creating CSV files with a comma separator. It's sometimes useful to be able to use another character as a separator. Adding a --separator for this would help.
Created attachment 12676 [details] [review] proposed patch Adds a --separator parameter. Example of use : ./export_borrowers.pl --separator=';'
It doesn't work if you don't specify -separator: no comma as default separator. You should have: my $separator = ','; and maybe add a test to guaranty that the separator is 1 character length. I would also add 'always_quote' parameter to Text::CSV constructor.
1) If I indicate just one character, this character is taken as separator (as expected). If I do not indicate a separator, it takes comma (as expected). 2) If I do something wrong like: export_borrowers.pl -separator=':;;' ...it silently takes the first character (:) In this case I would expect to get the usage screen. 3) Maybe I just do not know: How can I make use of a tab character as separator? With '\t' I get \ as separator. 4) It would be nice to have the 'always_quote' parameter from Comment #2
Fails QA based on Marc Véron's comments.
This functionality is also included in Bug 9045 - Adding some parameters to export_borrowers.pl
3) Maybe I just do not know: How can I make use of a tab character as separator? With '\t' I get \ as separator. The answer would be $'\t'
Marked as duplicate based on comment #5 *** This bug has been marked as a duplicate of bug 9045 ***