Bug 25252 - Add script to export bib data to CollectionHQ
Summary: Add script to export bib data to CollectionHQ
Status: ASSIGNED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: David Roberts
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-22 13:56 UTC by David Roberts
Modified: 2020-05-02 17:44 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 25252: Add script to export bib data to CollectionHQ (3.67 KB, patch)
2020-04-22 14:08 UTC, David Roberts
Details | Diff | Splinter Review
Bug 25252: Add script to export bib data to CollectionHQ (4.32 KB, patch)
2020-04-24 12:51 UTC, David Roberts
Details | Diff | Splinter Review
Bug 25252: Add script to export bib data to CollectionHQ (4.27 KB, patch)
2020-04-24 14:36 UTC, David Roberts
Details | Diff | Splinter Review
Bug 25252: Add script to export bib data to CollectionHQ (4.32 KB, patch)
2020-04-24 19:53 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Roberts 2020-04-22 13:56:56 UTC
We (PTFS-Europe) have been using this script to export catalogue data to CollectionHQ for many of our customers for a long time now, and it would be very useful if it could be incorporated into the core code.
Comment 1 David Roberts 2020-04-22 14:08:01 UTC
Created attachment 103482 [details] [review]
Bug 25252: Add script to export bib data to CollectionHQ

This script adds the capability to export bibliographic data to CollectionHQ via a cronjob.

To test:

1) Apply the patch
2) Run the script and an export file should be created in /tmp
3) If you have a valid username and password for the CollectionHQ ftp
server, add these credentials into lines 83 and 84 and run the script
again to ensure it transfers correctly.
Comment 2 Bernardo Gonzalez Kriegel 2020-04-23 12:10:57 UTC
Hi,
it works, data exported to /tmp, but
need an update in licence

 FAIL   misc/export2collectionhq.pl
   OK     critic
   FAIL   forbidden patterns
                forbidden pattern: Koha is now under the GPLv3 license (line 9)

Also an usage/help(-h|--help) with a little description would be handy

Please fix and I'll test again
Comment 3 David Roberts 2020-04-24 12:51:25 UTC
Created attachment 103671 [details] [review]
Bug 25252: Add script to export bib data to CollectionHQ

This script adds the capability to export bibliographic data to CollectionHQ via a cronjob.

To test:

1) Apply the patch
2) Run the script and an export file should be created in /tmp
3) If you have a valid username and password for the CollectionHQ ftp
server, add these credentials into lines 83 and 84 and run the script
again to ensure it transfers correctly.
Comment 4 David Roberts 2020-04-24 12:52:22 UTC
I've changed the licence number and added a rudimentary help page. Thanks!
Comment 5 Bernardo Gonzalez Kriegel 2020-04-24 13:08:23 UTC
There are 2 'my $result'

 my $result = GetOptions(
  'h|help'         => \$want_help
);

my $result = GetOptions(
    'h|help'         => \$want_help
);

also some suggestion about encoding

 FAIL   misc/export2collectionhq.pl
   FAIL   critic
                I/O layer ":utf8" used at line 52, column 1. Use ":encoding(UTF-8)" to get strict validation.
   OK     forbidden patterns
   OK     git manipulation
   OK     pod
   OK     spelling
   FAIL   valid
                "my" variable $result masks earlier declaration in same scope 

running with --help shows message but also the error
misc/export2collectionhq.pl --help
"my" variable $result masks earlier declaration in same scope at misc/export2collectionhq.pl line 48.
Comment 6 David Roberts 2020-04-24 14:36:11 UTC
Sorry, I should have spotted the duplicated lines - it was a copy and paste job! I've also changed the encoding statement. I don't see the error when I run it with --help though - how are you testing it?
Comment 7 David Roberts 2020-04-24 14:36:42 UTC
Created attachment 103691 [details] [review]
Bug 25252: Add script to export bib data to CollectionHQ

This script adds the capability to export bibliographic data to CollectionHQ via a cronjob.

To test:

1) Apply the patch
2) Run the script and an export file should be created in /tmp
3) If you have a valid username and password for the CollectionHQ ftp
server, add these credentials into lines 83 and 84 and run the script
again to ensure it transfers correctly.
Comment 8 Bernardo Gonzalez Kriegel 2020-04-24 19:53:29 UTC
Created attachment 103705 [details] [review]
Bug 25252: Add script to export bib data to CollectionHQ

This script adds the capability to export bibliographic data to CollectionHQ via a cronjob.

To test:

1) Apply the patch
2) Run the script and an export file should be created in /tmp
3) If you have a valid username and password for the CollectionHQ ftp
server, add these credentials into lines 83 and 84 and run the script
again to ensure it transfers correctly.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>