[Koha-bugs] [Bug 10662] Build OAI-PMH Harvesting Client

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Apr 29 09:32:15 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10662

David Cook <dcook at prosentient.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #50254|0                           |1
        is obsolete|                            |

--- Comment #78 from David Cook <dcook at prosentient.com.au> ---
Created attachment 50980
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50980&action=edit
Bug 10662 - Build OAI-PMH Harvesting Client

_TEST PLAN_

In the following steps replace "/home/user" with whatever your Koha dev install
is

_CONFIGURATION_
1) Apply Bugzilla patches 15555, 15541, then 10662
2) Upgrade your Koha dev install so that it uses new Zebra configuration files,
and updates your koha-conf.xml and "koha-dev/bin" files; try something like the
following:
    perl Makefile.PL --prev-install-log "$INSTALL_LOG"
    make
    make test
    make upgrade
3) Run upgrade database:
    perl installer/data/mysql/updatedatabase.pl
4) At this stage, in your koha-conf.xml, you should see something like the
following at the end of the file:
<icarus>
    <bin>/home/user/koha-dev/bin/icarusd.pl</bin>
    <socket>unix:/home/user/koha-dev/var/run/icarus.sock</socket>
    <pidfile>/home/user/koha-dev/var/run/icarus.pid</pidfile>
    <log>/home/user/koha-dev/var/log/icarus.log</log>
    <task_plugin>Koha::Icarus::Task::Enqueue::OAIPMH::Biblio</task_plugin>
    <task_plugin>Koha::Icarus::Task::Dequeue::OAIPMH::Biblio</task_plugin>
    <max_tasks>30</max_tasks>
</icarus>
5) In Koha, create a record matching rule:
    Code = OAI
    Match threshold = 100
    Record type = Bibliographic

    Match point 1
    Search index = control-number
    Score = 100
    Tag = 001

    Match point 2
    Search index = id-other,st-urx
    Score = 100
    Tag = 024
    Subfields = a
    Normalization rule = raw

_TESTING_
6)
Option 1:
a) Set PERL5LIB to include /home/user/koha (i.e. path to your C4 and Koha
module directories)
    export PERL5LIB=/home/user/koha
b) Activate Icarus using the following command:
    perl /home/user/koha/misc/bin/icarusd.pl -f
/home/user/koha-dev/etc/koha-conf.xml
    NOTE: It will send output to your terminal window. To write to the log
file, you can daemonize by adding the "-d" or "--daemon" options.
    NOTE: If you want lots of debugging info in your logs add "-v 9"
Option 2:
a) Make sure that icarus.sock, icarus.pid, icarus.log and their parent
directories are either owned by Apache or can be written to by Apache
b) Use the "Start Icarus" link on "admin/saved_tasks.pl".
    NOTE: Output will go to /home/user/koha-dev/var/log/icarus.log
    NOTE: If you want to add debugging into, you'll need to add "-v 9" in
"admin/saved_tasks.pl" manually (for now)

_USER DOWNLOAD TASK_
7)
7a) Go to Koha administration > Saved tasks
(http://KOHA/cgi-bin/koha/admin/saved_tasks.pl)
7b) Click "New saved task"
7c) Leave it on "Koha::Icarus::Task::Download::OAIPMH::Biblio" and click "Next"
7d) Choose a "Start time" in the past using the calendar pop-up
7e) Choose a "Repeat interval" of at least 30 seconds (for initial
troubleshooting purposes)
7f) Choose a URL of an OAI-PMH repository that you want to harvest (also
include a username, password, and realm if necessary)
7g) Fill out your OAI-PMH repositories as you like
7h) Fill out "Queue" with something like file:///home/user/koha/icarus_test
    NOTE: If you decided to use the web ui's "Start Icarus" link, you'll need
to make sure that Apache can write
    to this directory.
7i) Click "Save"

8a) Check that the Icarus dashboard has a "Status" of "Online"
8b) Click "Send to Icarus" next to your new saved task entry
8c) A task should now appear under "Active Icarus tasks"; click "Start"
8d) Go back to your terminal to check the Icarus server output (or 'tail -f'
the log if you daemonized)
8e) You should notice activity; you can also check /home/user/koha/icarus_test
to see if records are being downloaded and stored there.

_USER UPLOAD/IMPORT TASK_
9a) Go back to Koha administration > Saved tasks
(http://KOHA/cgi-bin/koha/admin/saved_tasks.pl)
9b) Click "New saved task"
9c) Choose Koha::Icarus::Task::Upload::OAIPMH::Biblio, and click "Next"
9d) Repeat the same steps for "Start time" and "Repeat interval" as these are
common to all tasks
9e) "Queue" should be the same as before, so try your path of
file:///home/user/koha/icarus_test
9f) Provide a username and password for the API authentication; you should be
able to use the default URL
9g) You should be able to trust the "Import target parameters" URL
9h) Write "OAI" for "Record matching rule code", if you added it earlier in the
configuration steps
9i) Leave the "Action..." defaults...
9j) Change "Filter" to
"file:///home/user/koha/koha-tmpl/intranet-tmpl/prog/en/xslt/OAI2MARC21slim.xsl"
9k) Follow the same steps as above for sending the task to Icarus and telling
Icarus to start it
9l) You can either watch Icarus's server output, or look at
http://KOHA/cgi-bin/koha/tools/manage-oai-import.pl,
or look directly at your database's "import_oai" and "biblio" tables to see how
records are imported to Koha
9m) You'll want to visit http://KOHA/cgi-bin/koha/tools/manage-oai-import.pl in
any case, as this is your dashboard
for seeing incoming OAI-PMH records. You can view the MARC import batch, see
the OAI-PMH record itself, and see
if the record was imported OK or if there wasn an ERROR.
9n) Resolving ERRORs is a work in progress...

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list