[Koha-bugs] [Bug 5635] bulkmarcimport new parameters & features

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jan 19 15:33:41 CET 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5635

Paul Poulain <paul.poulain at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|PATCH-Sent (DO NOT USE)     |P1 - high
            Version|rel_3_4                     |master

--- Comment #4 from Paul Poulain <paul.poulain at biblibre.com> 2012-01-19 14:33:41 UTC ---
This patch does not apply and should not be applied. It removes some things
that are usefull in official bulkmarcimport and are not synch'ed with the
patch.
For example:
-    pod2usage( -verbose => 2 );
-    exit;
+    print <<EOF ;
+Small script to import bibliographic records into Koha.
+
+Parameters:
+  h      this version/help screen
+  file   /path/to/file/to/dump: the file to import
+  v      verbose mode. 1 means "some infos", 2 means "MARC dumping"
+  fk     Turn off foreign key checks during import.
+  n      the number of records to import. If missing, all the file is imported
+  o      file offset before importing, ie number of records to skip.
+  commit the number of records to wait before performing a 'commit' operation
+  l file logs actions done for each record and their status into file
+  t      test mode: parses the file, saying what he would do, but doing
nothing.
+  s      skip automatic conversion of MARC-8 to UTF-8.  This option is 
+         provided for debugging.
+  c      the characteristic MARC flavour. At the moment, only MARC21 and 
+         UNIMARC are supported. MARC21 by default.
+  d      delete EVERYTHING related to biblio in koha-DB before import. Tables:
+         biblio, biblioitems, titems
+  m      format, MARCXML or ISO2709 (defaults to ISO2709)
+  yaml file  format a yaml file with ids
+  keepids field store ids in field (usefull for authorities, where 001
contains the authid for Koha, that can contain a very valuable info for
authorities coming from LOC or BNF. useless for biblios probably)
+  x      source bib tag for reporting the source bib number
+  y      source subfield for reporting the source bib number
+  idmap  file for the koha bib and source id
+  keepids store ids in 009 (usefull for authorities, where 001 contains the
authid for Koha, that can contain a very valuable info for authorities coming
from LOC or BNF. useless for biblios probably)
+  b|biblios type of import : bibliographic records
+  a|authorities type of import : authority records
+  match  matchindex,fieldtomatch matchpoint to use to deduplicate
+          fieldtomatch can be either 001 to 999 
+                       or field and list of subfields as such 100abcde
+  test   if set, test mode only, donot add anything in database
+  insert if set, only insert when possible
+  update if set, only updates (any biblio should have a matching record)
+  all    if set, do whatever is required
+  i|isbn if set, a search will be done on isbn, and, if the same isbn is
found, the biblio is not added. It's another
+         method to deduplicate. 
+         match & i can be both set.
+IMPORTANT: don't use this script before you've entered and checked your MARC 
+           parameters tables twice (or more!). Otherwise, the import won't
work 
+           correctly and you will get invalid data.
+
+SAMPLE: 
+  \$ export KOHA_CONF=/etc/koha.conf
+  \$ perl misc/migration_tools/bulkmarcimport.pl -d -commit 1000 \\
+    -file /home/jmf/koha.mrc -n 3000
+EOF
+exit;

It also does a lot of indentation/perltidy changes that make it hard to read.
Should be rewritten completly diff'ing community/master and biblibre/master
bulkmarcimport & picking what's needed ! (meld will help !)

-- 
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list