]> git.koha-community.org Git - koha.git/commit
Bug 2060: Update command line MARC import scripts
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Mon, 25 Jun 2012 15:38:19 +0000 (11:38 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Wed, 19 Sep 2012 15:16:18 +0000 (17:16 +0200)
commit7ad5e203da0a7aa5436366b0735ea24dc0ac2d41
tree0a7f09b55cca2fa968c2109cf12e540cd8ea2205
parent6e71b80ca39e6f1d2c31659a9a656de807ef3f32
Bug 2060: Update command line MARC import scripts

Expose authority import functionality to the command line import
scripts, and rename them from commit_biblios_file.pl and
stage_biblios_file.pl to commit_file.pl and stage_file.pl.

To test (note that these instructions assume you have a MARC21
installation and are using the provided sample file):
1. Find a file of authorities (a sample file with MARC21 authorities
   is attached to bug 7475) and download it to your server
2. Stage the file using the following command (replace <filename> with
   the name of the file you saved in step 1):
   > misc/stage_file.pl --file <filename> --authorities
3. Note the batch number the script assigns to your batch
4. Commit the records using the following command (replace <batchnumber>
   with the batch number you made note of in step 3):
   > misc/commit_file.pl --batch-number <batchnumber>
5. Index the authorities Zebraqueue (or wait)
6. Confirm that the new authorities appear.
7. Create a matching rule with the following settings:
   Code: AUTHTEST
   Description: Personal name main entry
   Match threshold: 999
   Record type: Authority record
   Search index: Heading-main
   Score: 1000
   Tag: 100
   Subfields: a
   Offset: 0
   Length: 0
   (note the ID of this matching rule)
8. Stage the authority file again, this time using the following
   command:
   > misc/stage_file.pl --file <filename> --authorities \
     --match <matchingrule>
7. Revert the import with the following command:
   > misc/commit_file.pl --batch-number <batchnumber> --revert
8. Index the authorities Zebraqueue (or wait)
9. Confirm that the records have been removed
10. Import an authority record with the Stage MARC/Manage staged MARC
    tools in exactly the way you would for a bibliographic record,
    but choose "Authority" instead of "Bibliographic" for the record
    type.

Signed-off-by: Elliott Davis <elliott@bywatersolutions.com>
Testing plan delivers as it should.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Rebased on latest master 11 September 2012
12 files changed:
C4/AuthoritiesMarc.pm
C4/Context.pm
C4/ImportBatch.pm
installer/data/mysql/kohastructure.sql
koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt
misc/commit_biblios_file.pl [deleted file]
misc/commit_file.pl [new file with mode: 0755]
misc/stage_biblios_file.pl [deleted file]
misc/stage_file.pl [new file with mode: 0755]
tools/manage-marc-import.pl
tools/stage-marc-import.pl