Created attachment 25026 [details] [review] Bug 11679: Add ods as a format for reports This patch adds the ability to export the data generated by a report into a ods file. Test plan: Install csv2ods (cf commit message from bug 11603 for the install instructions) and verify you are able to generate an ods file from a report result.
Created attachment 25049 [details] [review] Bug 11679: Add ods as a format for reports This patch adds the ability to export the data generated by a report into a ods file. Test plan: Install csv2ods (cf commit message from bug 11603 for the install instructions) and verify you are able to generate an ods file from a report result.
Created attachment 25641 [details] [review] Bug 11679: FIX encoding in CSV file Previously, the CSV file was not in encoded in utf8 and the csv2ods command failed with the following error if diacritics existed: UnicodeDecodeError: 'utf8' codec can't decode byte 0xe9
After installing csv2ods (thanks Fridolyn), we are able to generate en ods file from a report result (utf8 OK). Now we have the third choice "Open Document Spreadsheet" in the drop-down menu.
Patch tested with a sandbox, by Aurelie Fichot <aurelie.fichot@iepg.fr>
Created attachment 26232 [details] [review] Bug 11679: Add ods as a format for reports This patch adds the ability to export the data generated by a report into a ods file. Test plan: Install csv2ods (cf commit message from bug 11603 for the install instructions) and verify you are able to generate an ods file from a report result. Signed-off-by: Aurelie Fichot <aurelie.fichot@iepg.fr>
Created attachment 26234 [details] [review] Bug 11679: FIX encoding in CSV file Previously, the CSV file was not in encoded in utf8 and the csv2ods command failed with the following error if diacritics existed: UnicodeDecodeError: 'utf8' codec can't decode byte 0xe9 Signed-off-by: Aurelie Fichot <aurelie.fichot@iepg.fr>
Sorry, I can't find the instructions on installing csv2ods on the other bug mentioned. I know that we can export the sql frameworks as Libre Office spreadsheets already, but I am not sure how it is done.
Created attachment 26397 [details] [review] Bug 11679: Add ods as a format for reports This patch adds the ability to export the data generated by a report into a ods file. Test plan: 1/ Install csv2ods: Please have a look at https://code.google.com/p/scone-fu. - git clone https://code.google.com/p/scone-fu/ - cd scone-fu/code/python/odfpy-0.9.3/ - sudo python setup.py install 2/ Verify you are able to generate an ods file from a report result. Signed-off-by: Aurelie Fichot <aurelie.fichot@iepg.fr>
Created attachment 26398 [details] [review] Bug 11679: FIX encoding in CSV file Previously, the CSV file was not in encoded in utf8 and the csv2ods command failed with the following error if diacritics existed: UnicodeDecodeError: 'utf8' codec can't decode byte 0xe9 Signed-off-by: Aurelie Fichot <aurelie.fichot@iepg.fr>
(In reply to Katrin Fischer from comment #8) > Sorry, I can't find the instructions on installing csv2ods on the other bug > mentioned. I know that we can export the sql frameworks as Libre Office > spreadsheets already, but I am not sure how it is done. Sorry, I added the installation instructions in this commit message.
I like the possibility and idea of this and would love an Excel export as well, as our libraries are mostly using Windows and Office. I am a bit worried about adding a non-perl library, that needs to be installed via git - could there be a way around this? Or could you explain why this route was chosen?
(In reply to Katrin Fischer from comment #12) > I like the possibility and idea of this and would love an Excel export as > well, as our libraries are mostly using Windows and Office. I am a bit > worried about adding a non-perl library, that needs to be installed via git > - could there be a way around this? Or could you explain why this route was > chosen? The answer is simple: I did not find something else (in the debian packages or cpan) to do the same job :)
Still not so happy about the Python dependency... but - this won't get into the way if you haven't installed it - no regressions found with existing export options I am going to pass it, as it works nicely. Leaving final decision to RM.
Created attachment 27681 [details] [review] [PASSED QA] Bug 11679: Add ods as a format for reports This patch adds the ability to export the data generated by a report into a ods file. Test plan: 1/ Install csv2ods: Please have a look at https://code.google.com/p/scone-fu. - git clone https://code.google.com/p/scone-fu/ - cd scone-fu/code/python/odfpy-0.9.3/ - sudo python setup.py install 2/ Verify you are able to generate an ods file from a report result. Signed-off-by: Aurelie Fichot <aurelie.fichot@iepg.fr> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes tests and QA script. If python library is not installed, no additional options show up. If the library is installed a new export option Open Document Spreadsheet appears. All import options work nicely, no regressions found.
Created attachment 27682 [details] [review] [PASSED QA] Bug 11679: FIX encoding in CSV file Previously, the CSV file was not in encoded in utf8 and the csv2ods command failed with the following error if diacritics existed: UnicodeDecodeError: 'utf8' codec can't decode byte 0xe9 Signed-off-by: Aurelie Fichot <aurelie.fichot@iepg.fr> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
(In reply to Katrin Fischer from comment #14) > Still not so happy about the Python dependency... but > - this won't get into the way if you haven't installed it > - no regressions found with existing export options > > I am going to pass it, as it works nicely. Leaving final decision to RM. And my decision is this: given that LibreOffice and friends can readily import CSV files, I am reluctant to add something that - requires a Python library that is not packaged for Debian - requires direct execution by the webserver of a non-core utility, which opens Koha up to the potential for an attack via an untrusted executable called csv2ods getting onto the system PATH. I'm especially reluctant to do so in the face of the existence of two alternatives for creating ODS files: [1] Extending the code in C4::ImportExportFramework [2] The existence of the OpenOffice::OODoc Perl module.
Created attachment 27715 [details] [review] Bug 11679: Add ods as a format for reports This patch adds the ability to export the data generated by a report into a ods file. Test plan: 1/ Install the new dependency 2/ Verify you are able to generate an ods file from a report result.
Created attachment 27716 [details] [review] Bug 11679: Add the new dependency OpenOffice::OODoc
(In reply to Galen Charlton from comment #17) > [2] The existence of the OpenOffice::OODoc Perl module. I rewrote this patch using the OpenOffice::OODoc module. Switch back to needs signoff.
Crash: syntax error at /usr/share/kohaclone/C4/Installer/PerlDependencies.pm line 710, near "min_ver" Error in 2nd patch (near "required"): 'OpenOffice::OODoc' => { usage => 'Export', required => 1 min_ver => '2.125', }, Should read: 'OpenOffice::OODoc' => { usage => 'Export', required => '1', min_ver => '2.125', },
Created attachment 27719 [details] [review] Bug 11679: Add the new dependency OpenOffice::OODoc
(In reply to Marc Véron from comment #21) > Crash: syntax error at /usr/share/kohaclone/C4/Installer/PerlDependencies.pm > line 710, near "min_ver" Aarg, sorry. Thanks for the catch!
Created attachment 27720 [details] [review] [Signed-off] Bug 11679: Add the new dependency OpenOffice::OODoc How I tested: Appla patch, verify that dependency shows up in About Koha->Perl Mudules Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 27721 [details] [review] [Signed-off] Bug 11679: Add ods as a format for reports This patch adds the ability to export the data generated by a report into a ods file. Test plan: 1/ Install the new dependency 2/ Verify you are able to generate an ods file from a report result. Tested with several reports and downloaded them as Open Document Spreadsheet. Wors as expected. Signed-off-by: Marc Véron <veron@veron.ch>
(In reply to Jonathan Druart from comment #20) > (In reply to Galen Charlton from comment #17) > > [2] The existence of the OpenOffice::OODoc Perl module. > > I rewrote this patch using the OpenOffice::OODoc module. Thank you, I really appreciate your doing this.
Created attachment 27741 [details] [review] [PASSED QA] Bug 11679: Add the new dependency OpenOffice::OODoc How I tested: Apply patch, verify that dependency shows up in About Koha->Perl Mudules Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Created attachment 27742 [details] [review] [PASSED QA] Bug 11679: Add ods as a format for reports This patch adds the ability to export the data generated by a report into a ods file. Test plan: 1/ Install the new dependency 2/ Verify you are able to generate an ods file from a report result. Tested with several reports and downloaded them as Open Document Spreadsheet. Wors as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes all tests and QA script. Verified tab and comma separated export still works correctly. Verifid new ODS export works nicely. Tested with data containing Arabic characters and German umlauts.
Pushed to master. Thanks, Jonathan!