Hi all, I have a bunch of bibliographic records from a proprietary system, in CSV format. I need to import those into Koha. I think it best to write a script or modify an existing one to do the job in the shell. Can anyone point me to where to begin researching this? Is there an import example script? I would also like to know which tables in Koha/2.2.9 are required to be populated by the new bibliographic data. My guess are the following: biblio biblioitems and possibly bibliosubject bibliosubtitle cheers rickw -- _________________________________ Rick Welykochy || Praxis Services Those who make the most connections hog the most bandwidth. -- Rick Welykochy
El 13/11/07 20:59, Rick Welykochy escribió:
I need to import those into Koha. I think it best to write a script or modify an existing one to do the job in the shell.
I've recently imported several thousand records from CSV by building MARC records from them and then using bulkmarcimport.pl. This script knows which tables to fill (there's also the marc* namespace, which needs to be filled in order to improve searching, I think) and you won't need to worry about those details. I wrote a small script called csv2marc.pl, which will parse your CSV file and output MARC records based on the mappings you define at the file. Please check it for typos, since I had to scrub it for private data. Basically you define mappings for each item type (maybe you have different CSV files for each item type) and run it as commented inside the script. The resulting out.dat can be imported into Koha using bulkmarcimport.pl exporting PERL5LIB (see the Apache configuration for Koha) and running bulkmarcimport.pl -f out.dat (look at the bulkmarcimport.pl documentation for special needs) I really hope this helps, Jose
Thanks for your infomrative reply, José. José Miguel Parrella Romero wrote:
I've recently imported several thousand records from CSV by building MARC records from them and then using bulkmarcimport.pl. This script knows which tables to fill (there's also the marc* namespace, which needs to be filled in order to improve searching, I think) and you won't need to worry about those details.
What is the marc* namespace?
I wrote a small script called csv2marc.pl, which will parse your CSV file and output MARC records based on the mappings you define at the file. Please check it for typos, since I had to scrub it for private data. Basically you define mappings for each item type (maybe you have different CSV files for each item type) and run it as commented inside the script.
The resulting out.dat can be imported into Koha using bulkmarcimport.pl exporting PERL5LIB (see the Apache configuration for Koha) and running bulkmarcimport.pl -f out.dat (look at the bulkmarcimport.pl documentation for special needs)
Good good. This is very helpful. I found bulkmarcimport.pl and you're right of course. If I can get my data into the correct MARC format using your script idea, then the existing script in Koha will take care of the rest. I will begin experimenting with this. thanks rickw -- _________________________________ Rick Welykochy || Praxis Services Those who make the most connections hog the most bandwidth. -- Rick Welykochy
participants (2)
-
José Miguel Parrella Romero -
Rick Welykochy