marc2linkeddata 0.1.4 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.env_example +1 -0
- data/README.md +2 -1
- data/lib/marc2linkeddata/configuration.rb +2 -0
- data/lib/marc2linkeddata/parseMarcAuthority.rb +1 -1
- data/marc2linkeddata.gemspec +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: 543898af0ce1ceaa309d3998c8cbfa2b12df00f9
|
4
|
+
data.tar.gz: 45fe5fb9d27c32c66b5d385154ea60ccb9368262
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0458ac1a99307bf1988628298c9eda642fa1015b37dd92abe6fc8ad09d7f4746a962bbdf90ef3948e30c433d686df84d2d628094202097b21e21177b56911b1
|
7
|
+
data.tar.gz: 06a32b1595aee813138e1705663e2d1fdb92e9d57d03692e5f4dd9e7582c363b014e462641f49100ac561e01b0e7ea1acc6a91e70c0a173dde25a2761de408ea
|
data/.env_example
CHANGED
data/README.md
CHANGED
@@ -86,7 +86,8 @@ Scripting
|
|
86
86
|
# First configure (see details above).
|
87
87
|
# Translate a MARC21 authority file to a turtle file.
|
88
88
|
# It's assumed that '*.mrc' files contain multiple MARC21
|
89
|
-
# records and the record identifier is in
|
89
|
+
# records and the record identifier is configured in the
|
90
|
+
# ENV['FIELD_AUTH_ID'] value, it defaults to MARC field 001.
|
90
91
|
# marcAuthority2LD [ authfile1.mrc .. authfileN.mrc ]
|
91
92
|
marcAuthority2LD auth.mrc
|
92
93
|
|
@@ -9,6 +9,7 @@ module Marc2LinkedData
|
|
9
9
|
attr_accessor :threads
|
10
10
|
attr_accessor :thread_limit
|
11
11
|
|
12
|
+
attr_accessor :field_auth_id
|
12
13
|
attr_accessor :field_auth_loc
|
13
14
|
attr_accessor :field_auth_isni
|
14
15
|
attr_accessor :field_auth_oclc
|
@@ -81,6 +82,7 @@ module Marc2LinkedData
|
|
81
82
|
@prefixes['viaf'] = 'http://viaf.org/viaf/'
|
82
83
|
|
83
84
|
# Authority parse options
|
85
|
+
@field_auth_id = ENV['FIELD_AUTH_ID'] || '001'
|
84
86
|
@field_auth_loc = ENV['FIELD_AUTH_LOC']
|
85
87
|
@field_auth_isni = ENV['FIELD_AUTH_ISNI']
|
86
88
|
@field_auth_oclc = ENV['FIELD_AUTH_OCLC']
|
@@ -36,7 +36,7 @@ module Marc2LinkedData
|
|
36
36
|
#field001 = record.fields.select {|f| f if f.tag == '001' }.first.value
|
37
37
|
#field003 = record.fields.select {|f| f if f.tag == '003' }.first.value
|
38
38
|
#"#{field003}-#{field001}"
|
39
|
-
get_fields(
|
39
|
+
get_fields(@@config.field_auth_id).first.value
|
40
40
|
end
|
41
41
|
|
42
42
|
def get_iri(field, iri_pattern)
|
data/marc2linkeddata.gemspec
CHANGED