Koha/misc/cronjobs
Fridolin Somers ffb40290f8 Bug 21560: create Koha::Util::OpenDocument with subroutine for ODS generation
There is nearly the same code in misc/cronjobs/gather_print_notices.pl and reports/guided_reports.pl.
This patch creates a new module with subroutine called by both scripts.

If file path or content is undefined, subroutine will just return undef.
If content is an empty arrayref, empty ods file is still generated.

Unicode encoding is kept outisde because it may not be necessary.

Note that for print notices the first line of message is always the column names so it is extracted only from first message.

Test plan :
Run previous patches test plans and check ODS files are the same.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-15 12:02:46 +00:00
..
holds Bug 21698: (QA follow-up) Fix typo verbosev -> verbose 2018-10-31 13:49:19 +00:00
rss Bug 21526: Use the 'url' filter when needed 2018-11-12 16:35:43 -03:00
social_data Bug 15193 - Perl scripts missing exec permission 2015-12-11 16:36:08 +00:00
thirdparty Bug 21640: Enable output to STDOUT for Itiva outbound script 2018-11-02 10:33:08 +00:00
advance_notices.pl Bug 17969: Refactor the way <<items.content>> is generated 2017-08-30 15:06:25 -03:00
automatic_item_modification_by_age.pl Bug 11023: Automatic item modification by age (Was Toggle "new" status") 2016-03-02 22:56:31 +00:00
automatic_renewals.pl Bug 15494: Update display of renewal errors 2018-11-07 21:39:38 +00:00
backup.sh Bug 9235 - Hardcoded values in cronjobs/backup.sh 2012-12-21 07:20:50 -05:00
batch_anonymise.pl Bug 16966: move parameters to hashref 2017-03-03 17:20:05 +00:00
build_browser_and_cloud.pl Bug 19040: Refactor GetMarcBiblio parameters 2017-08-25 10:23:42 -03:00
cart_to_shelf.pl Bug 13889: Add information about cron jobs to system log 2015-05-04 11:11:14 -03:00
check-url-quick.pl Bug 21122: Fix check-url-quick when utf8 characters in URL's 2018-08-02 10:21:43 -03:00
check-url.pl Bug 19040: Refactor GetMarcBiblio parameters 2017-08-25 10:23:42 -03:00
cleanup_database.pl Bug 20402: only output if verbose flag is set 2018-05-09 12:47:43 -03:00
cloud-kw.pl Bug 14383: misc: Fix some typos in comments and documentation 2015-06-22 17:34:45 -03:00
cloud-sample.conf Fixes bugs #2875-2879 2008-12-29 19:59:44 -06:00
CONFIGURE.gmail Bug 5251 : Enhancement: [3.2] (Resubmission) Adding code to support using gmail as an SMTP server 2011-04-08 14:01:15 +12:00
create_koc_db.pl Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
crontab.example Bug 21235: Remove table services_throttle 2018-09-07 15:09:39 +00:00
delete_expired_opac_registrations.pl Bug 16907: Koha::Patrons - Move DelMember to ->delete 2016-10-21 16:20:41 +00:00
delete_items.pl Bug 14504: (followup) Make deletion conditional on --commit 2016-08-26 12:07:27 +00:00
delete_patrons.pl Bug 20915: Use date --iso-8601 instead of date +%Y-%m-%d 2018-09-26 16:43:22 +00:00
delete_records_via_leader.pl Bug 22155: Adapt uses of biblio_metadata.marcflavour to schema 2019-01-30 11:35:34 +00:00
edi_cron.pl Bug 17141: Call config method to retrieve logdir 2016-09-02 15:49:12 +00:00
fines.pl Bug 21753: Remove all reference of chargename from scripts 2019-01-04 03:13:49 +00:00
gather_print_notices.pl Bug 21560: create Koha::Util::OpenDocument with subroutine for ODS generation 2019-03-15 12:02:46 +00:00
import_webservice_batch.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
j2a.pl Bug 15742 [QA Followup] - Tidy script 2016-02-23 21:19:08 +00:00
longoverdue.pl Bug 22049: Make MarkIssueReturned rely on returndate only 2019-01-25 20:46:47 +00:00
membership_expiry.pl Bug 17762: Send lang to GetPreparedLetter 2017-05-09 20:56:41 +00:00
merge_authorities.pl Bug 9988: Refactor the cron script 2017-04-13 08:53:47 -04:00
notice_unprocessed_suggestions.pl Bug 19304: Move C4::Members::GetNoticeEmailAddress to Koha::Patron->notice_email_address 2018-01-02 11:46:40 -03:00
overdue_notices.pl Bug 19304: Move C4::Members::GetNoticeEmailAddress to Koha::Patron->notice_email_address 2018-01-02 11:46:40 -03:00
printoverdues.sh Bug 10127 : Printoverdues.sh should tar only pdf files 2013-07-16 15:47:13 +00:00
process_message_queue.pl Bug 21322: process_message_queue.pl --type should take an argument 2018-10-03 17:34:43 +00:00
purge_suggestions.pl Bug 16280: purge_suggestions.pl: Cron job log should tell number of days used 2018-11-05 14:41:05 +00:00
reconcile_balances.pl Bug 21915: Add a cli script to reconcile balances 2019-01-04 03:13:41 +00:00
remove_temporary_edifiles.pl Bug 7736: Support Ordering via Edifact EDI messages 2016-04-01 20:03:17 +00:00
runreport.pl Bug 22323: cronjob runreport.pl CSV add encoding 2019-02-19 13:52:14 +00:00
serialsUpdate.pl Bug 17047: subscriptions management with Mana-KB 2019-01-23 14:39:26 +00:00
share_usage_with_koha_community.pl Bug 18066: Hea V2 2017-03-23 00:10:46 +00:00
sitemap.pl Bug 16751: What is sitemaper? 2016-06-24 13:19:06 +00:00
staticfines.pl Bug 21753: Remove all reference of chargename from scripts 2019-01-04 03:13:49 +00:00
stockrotation.pl Bug 21620: Prevent stockrotation cronjob failures 2018-11-02 10:33:00 +00:00
update_totalissues.pl Bug 13889: Add information about cron jobs to system log 2015-05-04 11:11:14 -03:00