briard 2.8.0 → 2.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/briard/metadata.rb +19 -20
- data/lib/briard/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: debbaf7e340fa77df735b4443f7bf7120842908f9223250ce905e398c4754df5
|
4
|
+
data.tar.gz: fb782cc48aeaa3435ef4b9eb4004de44786ea3dbb257c653ce62213e55ab6612
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd60f155303d1e52ec8acf01ae8b648cc4625a10e52473f613a1aa34ed0b7f8b4f7af42dff2938f7b35bfdfd8c62bc0ae1e58e17a799d816470c0743df945118
|
7
|
+
data.tar.gz: 056d24ffef47ed0a3f04a5222464a507b18a00b1f573e437ac10c8de2dd89b581da7ae507528b23039f5c7a7ead79c042b566b9d37bf259482ac59f104cdcec3
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v2.8.0](https://github.com/front-matter/briard/tree/v2.8.0) (2022-11-22)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/front-matter/briard/compare/v2.6.5...v2.8.0)
|
6
|
+
|
3
7
|
## [v2.6.5](https://github.com/front-matter/briard/tree/v2.6.5) (2022-10-04)
|
4
8
|
|
5
9
|
[Full Changelog](https://github.com/front-matter/briard/compare/v2.6.4...v2.6.5)
|
data/Gemfile.lock
CHANGED
data/lib/briard/metadata.rb
CHANGED
@@ -18,26 +18,7 @@ module Briard
|
|
18
18
|
id = normalize_id(options[:input], options)
|
19
19
|
ra = nil
|
20
20
|
|
21
|
-
if
|
22
|
-
@from = options[:from] || find_from_format(id: id)
|
23
|
-
|
24
|
-
# mEDRA, KISTI, JaLC and OP DOIs are found in the Crossref index
|
25
|
-
case @from
|
26
|
-
when 'medra'
|
27
|
-
ra = 'mEDRA'
|
28
|
-
when 'kisti'
|
29
|
-
ra = 'KISTI'
|
30
|
-
when 'jalc'
|
31
|
-
ra = 'JaLC'
|
32
|
-
when 'op'
|
33
|
-
ra = 'OP'
|
34
|
-
end
|
35
|
-
|
36
|
-
# generate name for method to call dynamically
|
37
|
-
hsh = @from.present? ? send("get_#{@from}", id: id, **options) : {}
|
38
|
-
string = hsh.fetch('string', nil)
|
39
|
-
|
40
|
-
elsif options[:input].present? && File.exist?(options[:input])
|
21
|
+
if options[:input].present? && File.exist?(options[:input])
|
41
22
|
filename = File.basename(options[:input])
|
42
23
|
ext = File.extname(options[:input])
|
43
24
|
if %w[.bib .ris .xml .json .cff].include?(ext)
|
@@ -59,6 +40,24 @@ module Briard
|
|
59
40
|
warn "File type #{ext} not supported"
|
60
41
|
exit 1
|
61
42
|
end
|
43
|
+
elsif id.present?
|
44
|
+
@from = options[:from] || find_from_format(id: id)
|
45
|
+
|
46
|
+
# mEDRA, KISTI, JaLC and OP DOIs are found in the Crossref index
|
47
|
+
case @from
|
48
|
+
when 'medra'
|
49
|
+
ra = 'mEDRA'
|
50
|
+
when 'kisti'
|
51
|
+
ra = 'KISTI'
|
52
|
+
when 'jalc'
|
53
|
+
ra = 'JaLC'
|
54
|
+
when 'op'
|
55
|
+
ra = 'OP'
|
56
|
+
end
|
57
|
+
|
58
|
+
# generate name for method to call dynamically
|
59
|
+
hsh = @from.present? ? send("get_#{@from}", id: id, **options) : {}
|
60
|
+
string = hsh.fetch('string', nil)
|
62
61
|
else
|
63
62
|
hsh = {
|
64
63
|
'url' => options[:url],
|
data/lib/briard/version.rb
CHANGED