[Koha] Authority records import
Jason Ronallo
jronallo at gmail.com
Sat Feb 17 04:57:00 NZDT 2007
I'm not a developer of Koha but just a user, but I've looked into this
a bit myself. Please someone correct me if I'm wrong in what I say.
There is a bulkauthimport script included with 2.2.7, but it's in the
misc scripts directory. As far as I can see this script is the only
way to get authority records into the system outside of rekeying them
yourself.
But the bulkauthimport script seems to be written for UNIMARC or at
least for some predefined authority categories. So my method of
importing authorities from downloaded records from the LOC was to
change the script.
A word about how Koha handles authorities first:
In my understanding there isn't just one large authority file, but
several based on the type of authority. You define these based on how
you want to use them. You link each to one reporting field in the
authority record. So your personal names will be in a different
category than your geographic names since you want different fields to
be reported.
I could not find in the script how the sorting into different
authority types occurs. So you may not be able to import your
authority records in one big batch. The script seems to suggest that
this is done by using a field in the leader, but I can't find this
anywhere in the MARC authority specs through LOC. I don't see any
place in an authority record where it says what kind of record it is
(personal name, geographic name, etc.). The only way I know to tell
records apart is by which 1XX field is in the authority record. Can
someone please correct me if I'm wrong on this one?
Since I'm building my authority database from scratch I'm importing
small groups of records at a time as I need them, so this works for
me. I never mix personal names with geographic names. I've done a few
and this method works for me. Since you already have an authority file
I'm not sure how you'd proceed. You will need to pre-sort them before
importing them to use the following method.
Please save a backup copy of the script before you proceed!!!!
Here are the changes I made to add an authtypecode:
line 16 added variable $authtypecode:
my ($version, $delete, $test_parameter,$char_encoding, $verbose, $authtypecode);
line 24 added parameter:
'v:s' => \$verbose, 'type:s' => \$authtypecode,
Then about line 104 I defined my authority types and commented out the
ones that were already there. Here's an example:
$authtypecode="PN" if ($authtypecode eq 'pn'); # personal name 100
Since you're specifying the value of the authtypecode you can comment
out this line like so:
#my $authtypecode=substr($newRecord->leader(),9,1);
I think those are all the changes I made.
Now when I invoke the script I must pass it an authtypecode with:
./bulkmarcimport.pl -file /home/jason/authorityrecords -type pn -t
Add the -t parameter to test things before you do your import.
Maybe there's an easier way to do this, but I haven't found it.
I've considered rewriting this script to do the sorting based on what
1XX field it contains, but I haven't had the time to look into this
and haven't really explored whether it's possible. Any ideas?
The other idea that I had if I were to do this in bulk was to import
all your authority records into every one of your authority types. It
would seem that since each authtype reports only a single 1XX field
you couldn't mistakenly link to the wrong field. This might be a very
bad idea though and would certainly cause duplication in Koha's
authority file.
Is there an authorities export script that anyone has? If there isn't
you might want to keep an external authority file as you update it.
I hope this helps someone.
--Jason
On 2/16/07, cat tom <illgsm at yahoo.ca> wrote:
> Does Koha have a bulk authority import tool like Koha's bulkmarcimport.pl
> script? I have a set of authority records exported from Horizon?
>
>
> Sun
>
>
>
>
> ________________________________
> All new Yahoo! Mail ________________________________
> Get news delivered. Enjoy RSS feeds right on your Mail page.
>
>
> _______________________________________________
> Koha mailing list
> Koha at lists.katipo.co.nz
> http://lists.katipo.co.nz/mailman/listinfo/koha
>
>
More information about the Koha
mailing list