marc-marc4j 0.1.0-java → 0.1.1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +5 -0
- data/README.md +14 -0
- data/lib/marc/marc4j.rb +1 -1
- data/lib/marc/marc4j/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01b184f12d6a090c5820597352efca6d960a6298
|
4
|
+
data.tar.gz: b59eeaf411e501f5aaf74353bf0b296bd2e3d3c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ec350093dfde8b6911d683b234d64e04ea4118049e3cff06db6974c3a9f0cabeeee4b65ac0ee907a44da494134b90f14f4ab717e429d65554faea7485e92e13
|
7
|
+
data.tar.gz: 24da9e85db811396e31c2fa622c679698d03e4ea35c248e17086bd9aa1c12755bb9a354883ff4eb336ade03e610b6e5da1296a0b9ce2a1c388a88a4978d139fd
|
data/ChangeLog.md
CHANGED
data/README.md
CHANGED
@@ -40,6 +40,20 @@ require 'marc/marc4j'
|
|
40
40
|
converter = MARC::MARC4J.new # uses bundled marc4j jarfile unless marc4j is already loaded
|
41
41
|
```
|
42
42
|
|
43
|
+
## Logging
|
44
|
+
|
45
|
+
You can also pass in a logger object, that responds to the normal `debug`/`warn`/etc.
|
46
|
+
|
47
|
+
```ruby
|
48
|
+
|
49
|
+
require 'marc/marc4j'
|
50
|
+
require 'my/logging/library'
|
51
|
+
|
52
|
+
logger = My::Logging::Library.new(opts)
|
53
|
+
converter = MARC::MARC4J.new(:logger=>logger)
|
54
|
+
```
|
55
|
+
|
56
|
+
|
43
57
|
## Doing the conversions
|
44
58
|
|
45
59
|
A converter only has two useful methods:
|
data/lib/marc/marc4j.rb
CHANGED
@@ -35,7 +35,7 @@ module MARC
|
|
35
35
|
# would raise.
|
36
36
|
if subfield.getCode > 255
|
37
37
|
if @logger
|
38
|
-
logger.warn("Marc4JReader: Corrupted MARC data, record id #{marc4j.getControlNumber}, field #{marc4j_data.tag}, corrupt subfield code byte #{subfield.getCode}. Skipping subfield, but continuing with record.")
|
38
|
+
@logger.warn("Marc4JReader: Corrupted MARC data, record id #{marc4j.getControlNumber}, field #{marc4j_data.tag}, corrupt subfield code byte #{subfield.getCode}. Skipping subfield, but continuing with record.")
|
39
39
|
end
|
40
40
|
next
|
41
41
|
end
|
data/lib/marc/marc4j/version.rb
CHANGED