]> git.koha-community.org Git - koha.git/commit
Bug 35659: OAI Harvester
authorMatthias Meusburger <matthias.meusburger@biblibre.com>
Thu, 20 Jul 2023 14:29:49 +0000 (16:29 +0200)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Mon, 28 Oct 2024 13:01:27 +0000 (14:01 +0100)
commitd2367657b29bfb406303fd2c08396b528b20af1a
tree7b5e16806392772a98fa0728cf5e3c3b3aea162a
parent474148538f8c52ae1438e8b606fcbb7577a76c9c
Bug 35659: OAI Harvester

Test plan:

 - Run updatedatabase.pl

 - Apply the DBIC update patch

 - Setup an OAI repository in Administration -> OAI repositories (admin/oaiservers.pl)

   If the repository dataformat is in oai_dc, you can use the sample XSLT files:
   For Unimarc:
   OAIDCtoUNIMARCXML.xsl for bibliographic records
   AuthOAIDCtoUNIMARCXML.xsl for authorities

   For Marc21:
   OAIDCtoMARC21XML.xsl for bibliographic records
   AuthOAIDCtoMARC21XML.xsl for authorities

   If the repository dataformat is in marc-xml, you can use
   OAIMarcxml2KohaMarcxml.xsl for both Unimarc and Marc21.

 - Some repositories to test with:

   Bibliographic records, oai_dc:
   Endpoint: http://staroai.theses.fr/OAIHandler
   Set: ddc:260
   XSLT: <path_to_src>/koha-tmpl/intranet-tmpl/prog/en/xslt/OAIDCtoUNIMARCXML.xsl
   or
   XSLT: <path_to_src>/koha-tmpl/intranet-tmpl/prog/en/xslt/OAIDCtoMARC21XML.xsl

   Authorities, oai_dc:
   Endpoint: https://www.idref.fr/OAI/oai.jsp
   Set: a
   XSLT: <path_to_src>/koha-tmpl/intranet-tmpl/prog/en/xslt/AuthOAIDCtoUNIMARCXML.xsl
   or
   XSLT: <path_to_src>/koha-tmpl/intranet-tmpl/prog/en/xslt/AuthOAIDCtoMARC21XML.xsl

   Authorities, marc-xml, Unimarc:
   Endpoint: https://www.idref.fr/OAI/oai.jsp
   Set: a
   XSLT: <path_to_src>/koha-tmpl/intranet-tmpl/prog/en/xslt/OAIMarcxml2KohaMarcxml.xsl

 - Note: marc-xml harvesting will not work with HTTP::OAI::Harvester version 3.xx
   Version 4.xx is needed.
   See Bug 17704 for updating Koha default version to 4.xx

 - If you want to receive a report email, fill the OAI-PMH:HarvestEmailReport
   syspref. The model used (OAI_HARVEST_REPORT) can be edited in tools -> Notices and slips.

 - start a harvest with the following command:
   misc/cronjobs/harvest_oai.pl

    This script starts an OAI Harvest

    This script has the following parameters :
        -h --help: this message
        -v --verbose (enable output to stdout)
        -r --repository: id of the OAI repository
        -d --days: number of days to harvest from (optional)
        -l --list: list the OAI repositories
        -f --force: force harvesting (ignore records datestamps) (optional)

    Example: misc/cronjobs/harvest_oai.pl -r 1 -d 10 -v -f

 - Check the logs in the Log Viewer (tools/viewlog.pl)
   (CronjobLog syspref must be activated)

Sponsored-by: KohaLa
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Sponsored-by: Association KohaLa - https://koha-fr.org/
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
27 files changed:
Koha/Import/Oaipmh/Authorities.pm [new file with mode: 0644]
Koha/Import/Oaipmh/Authority.pm [new file with mode: 0644]
Koha/Import/Oaipmh/Biblio.pm [new file with mode: 0644]
Koha/Import/Oaipmh/Biblios.pm [new file with mode: 0644]
Koha/OAI/Client/Harvester.pm [new file with mode: 0644]
Koha/OaiServer.pm [new file with mode: 0644]
Koha/OaiServers.pm [new file with mode: 0644]
admin/oaiservers.pl [new file with mode: 0755]
installer/data/mysql/atomicupdate/Bug-35659.pl [new file with mode: 0755]
installer/data/mysql/en/mandatory/sample_notices.yml
installer/data/mysql/kohastructure.sql
installer/data/mysql/mandatory/sysprefs.sql
installer/data/mysql/mandatory/userpermissions.sql
koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc
koha-tmpl/intranet-tmpl/prog/en/includes/oai-admin-search.inc [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc
koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/oaiservers.tt [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref
koha-tmpl/intranet-tmpl/prog/en/xslt/AuthOAIDCtoMARC21XML.xsl [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/xslt/AuthOAIDCtoUNIMARCXML.xsl [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/xslt/OAIDCtoMARC21XML.xsl [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/xslt/OAIDCtoUNIMARCXML.xsl [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/xslt/OAIMarcxml2KohaMarcxml.xsl [new file with mode: 0644]
misc/cronjobs/harvest_oai.pl [new file with mode: 0755]
t/db_dependent/Koha/OAIHarvester.t [new file with mode: 0755]
t/db_dependent/Koha/OAIServers.t [new file with mode: 0755]