Відмінності між версіями «Bulkmarcimport.pl»

Матеріал з Koha Ukraine Wiki
Перейти до: навігація, пошук
(Опис)
Рядок 53: Рядок 53:
 
'''-l'''
 
'''-l'''
  
File logs actions done for each record and their status into file
+
журналються у файл події, виконані для кожного запису та його статусу
  
 
'''-append'''
 
'''-append'''
  
If specified, data will be appended to the logfile. If not, the logfile will be erased for each execution.
+
якщо вказано, журнальний файл буде доповнений даними. Якщо ні, файл журналу витиратиметься перед кожним виконанням.
  
 
'''-t, -test'''
 
'''-t, -test'''
  
Test mode: parses the file, saying what he would do, but doing nothing.
+
режим тестування: аналізує файл, повідомляє що буде робити, але нічого не робить.
  
 
'''-s'''
 
'''-s'''
  
Skip automatic conversion of MARC-8 to UTF-8. This option is provided for debugging.
+
пропускає автоматичне перетворення MARC-8 в UTF-8. Ця опція передбачена для відлагодження.
  
'''-c=CHARACTERISTIC'''
+
'''-c='''''РІЗНОВИД''
  
— The CHARACTERISTIC MARC flavour. At the moment, only MARC21 and UNIMARC are supported. MARC21 by default.
+
- ''РІЗНОВИД'' MARC-стандату. На даний момент підтримуються лише MARC21 та UNIMARC. MARC21 за умовчанням.
  
 
'''-d'''
 
'''-d'''
  
— Delete EVERYTHING related to biblio in koha-DB before import. Tables: biblio, biblioitems, items
+
- вилучити усе, що стосується бібліотечних записів у БД Koha перед імпортом. Таблиці: biblio та biblioitems (біб-записи), items (примірники).
  
'''-m=FORMAT'''
+
'''-m='''''ФОРМАТ''
  
Input file FORMAT: MARCXML or ISO2709 (defaults to ISO2709)
+
вхідний ''ФОРМАТ'' файлу: MARCXML або ISO2709 (типово ISO2709).
  
 
'''-authtypes'''
 
'''-authtypes'''

Версія за 17:05, 12 березня 2018

Назва

bulkmarcimport.pl — імпорт бібліографічних та авторитетних записів у Коха

Використання

$ export KOHA_CONF=/etc/koha.conf
$ perl misc/migration_tools/bulkmarcimport.pl -d -commit 1000 \\
   -file /home/jmf/koha.mrc -n 3000

Застереження

Не використовуйте цей сценарій, перш ніж внесли та перевірили ваші таблиці MARC-ознак двічі (чи більше!). Інакше імпорт не буде працювати правильно, і Ви отримаєте зіпсовані дані.

Опис

-h

— екран з цією довідкою (англійською)

-b, -biblios

— тип імпорту: бібліографічні записи

-a, -authorities

— тип імпорту: авторитетні записи (файли)

-file=ФАЙЛ

ФАЙЛ, який імпортуємо

-v

— багатослівний режим. 1 означає „деяку інформацію“, 2 означає „MARC-видрук“

-fk

— відключає перевірку зовнішніх (foreign) ключів під час імпорту.

-n=КІЛЬКІСТЬ

КІЛЬКІСТЬ записів записів для імпорту. Якщо відсутня, весь файл імпортується.

-o, -offset=КІЛЬКІСТЬ

— зміщення у файлі перед імпортом, тобто КІЛЬКІСТЬ записів, які потрібно пропустити.

-commit=КІЛЬКІСТЬ

КІЛЬКІСТЬ записів, на які потрібно чекати, перш ніж виконати операцію „commit“ (вставки в БД).

-l

— журналються у файл події, виконані для кожного запису та його статусу

-append

— якщо вказано, журнальний файл буде доповнений даними. Якщо ні, файл журналу витиратиметься перед кожним виконанням.

-t, -test

— режим тестування: аналізує файл, повідомляє що буде робити, але нічого не робить.

-s

— пропускає автоматичне перетворення MARC-8 в UTF-8. Ця опція передбачена для відлагодження.

-c=РІЗНОВИД

- РІЗНОВИД MARC-стандату. На даний момент підтримуються лише MARC21 та UNIMARC. MARC21 за умовчанням.

-d

- вилучити усе, що стосується бібліотечних записів у БД Koha перед імпортом. Таблиці: biblio та biblioitems (біб-записи), items (примірники).

-m=ФОРМАТ

— вхідний ФОРМАТ файлу: MARCXML або ISO2709 (типово ISO2709).

-authtypes

— file yamlfile with authoritiesTypes and distinguishable record field in order to store the correct authtype

-yaml

— yaml file format a yaml file with ids

-filter

— list of fields that will not be imported. Can be any from 000 to 999 or field, subfield and subfield's matching value such as 200avalue

-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

-k, -keepids=<FIELD>

— 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)

-match=<FIELD>

— FIELD matchindex,fieldtomatch matchpoint to use to deduplicate fieldtomatch can be either 001 to 999 or field and list of subfields as such 100abcde

-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 & -isbn can be both set.

-cleanisbn

— Clean ISBN fields from entering biblio records, ie removes hyphens. By default, ISBN are cleaned. --nocleanisbn will keep ISBN unchanged.

-x=TAG

— Source bib TAG for reporting the source bib number

-y=SUBFIELD

— Source SUBFIELD for reporting the source bib number

-idmap=FILE

— 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)

-dedupbarcode

— If set, whenever a duplicate barcode is detected, it is removed and the attempt to add the record is retried, thereby giving the record a blank barcode. This is useful when something has set barcodes to be a biblio ID, or similar (usually other software.)

-framework

— This is the code for the framework that the requested records will have attached to them when they are created. If not specified, then the default framework will be used.

-custom=MODULE

— This parameter allows you to use a local module with a customize subroutine that is called for each MARC record. If no filename is passed, LocalChanges.pm is assumed to be in the migration_tools subdirectory. You may pass an absolute file name or a file name from the migration_tools directory.

Джерело