relaton-doi 1.20.2 → 2.0.0.pre.alpha.1

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.
@@ -1,57 +0,0 @@
1
- require "relaton/processor"
2
-
3
- module RelatonDoi
4
- class Processor < Relaton::Processor
5
- attr_reader :idtype
6
-
7
- def initialize
8
- @short = :relaton_doi
9
- @prefix = "DOI"
10
- @defaultprefix = %r{^doi:}
11
- @idtype = "DOI"
12
- # @datasets = %w[bipm-data-outcomes bipm-si-brochure]
13
- end
14
-
15
- # @param code [String] DOI
16
- # @param date [String, nil] year
17
- # @param opts [Hash]
18
- # @return [RelatonBib::BibliographicItem]
19
- def get(code, _date, _opts)
20
- Crossref.get(code)
21
- end
22
-
23
- #
24
- # @param [String] source source name
25
- # @param [Hash] opts
26
- # @option opts [String] :output directory to output documents
27
- # @option opts [String] :format
28
- #
29
- # def fetch_data(source, opts)
30
- # DataFetcher.fetch(source, **opts)
31
- # end
32
-
33
- # @param xml [String]
34
- # @return [RelatonBipm::BipmBibliographicItem]
35
- def from_xml(xml)
36
- ::RelatonBib::XMLParser.from_xml xml
37
- end
38
-
39
- # @param hash [Hash]
40
- # @return [RelatonBipm::BipmBibliographicItem]
41
- def hash_to_bib(hash)
42
- ::RelatonBib::BibliographicItem.from_hash hash
43
- end
44
-
45
- # Returns hash of XML grammar
46
- # @return [String]
47
- def grammar_hash
48
- @grammar_hash ||= ::RelatonDoi.grammar_hash
49
- end
50
-
51
- # Returns number of threads
52
- # @return [Integer]
53
- def threads
54
- 2
55
- end
56
- end
57
- end
@@ -1,6 +0,0 @@
1
- module RelatonDoi
2
- module Util
3
- extend RelatonBib::Util
4
- PROGNAME = "relaton-doi".freeze
5
- end
6
- end
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RelatonDoi
4
- VERSION = "1.20.2"
5
- end
data/lib/relaton_doi.rb DELETED
@@ -1,27 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # require "serrano"
4
- require "relaton_bipm"
5
- # require "relaton_iso_bib"
6
- # require "relaton_w3c"
7
- require "relaton_ietf"
8
- require "relaton_ieee"
9
- require "relaton_nist"
10
- require_relative "relaton_doi/version"
11
- require_relative "relaton_doi/util"
12
- require_relative "relaton_doi/parser"
13
- require_relative "relaton_doi/crossref"
14
-
15
- # Serrano.configuration do |config|
16
- # config.mailto = "open.source@ribose.com"
17
- # end
18
-
19
- module RelatonDoi
20
- extend self
21
-
22
- def grammar_hash
23
- Digest::MD5.hexdigest(
24
- RelatonNist::VERSION + RelatonIetf::VERSION + RelatonIeee::VERSION + RelatonBipm::VERSION + RelatonBib::VERSION,
25
- )
26
- end
27
- end