isobib 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +6 -3
- data/README.adoc +2 -1
- data/isobib.gemspec +2 -1
- data/lib/isobib/iso_bibliography.rb +1 -1
- data/lib/isobib/scrapper.rb +3 -3
- data/lib/isobib/version.rb +1 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db1a9c4b97d07bd02127cb4f7929bbb0edca379fbe87531dea8f8f0a43d507c8
|
4
|
+
data.tar.gz: 54250a8a15aaa78619c14ac2d1752560482997e9043ca6af84ac716a9ac9bf73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2e5b337e853bcdec3b40c7022760b625bd90f180bdb0a86b939a0dc1c649fb1cd9bd57d327d5cf5cfbe38d24829e14eb84c1da4bf66c2ade80f263161f22079
|
7
|
+
data.tar.gz: 0706caa920c7805eedf0f0938636bb904f7bd8812e6cf44e004fc409373f51822d8f36976deaaf8030359edc3a7e9a45694a902babfaa568e5e1a53709e13059
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
isobib (0.1.
|
4
|
+
isobib (0.1.8)
|
5
5
|
algoliasearch
|
6
|
-
iso-bib-item (~> 0.1.
|
6
|
+
iso-bib-item (~> 0.1.10)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
@@ -16,8 +16,10 @@ GEM
|
|
16
16
|
diff-lcs (1.3)
|
17
17
|
docile (1.3.1)
|
18
18
|
duplicate (1.1.1)
|
19
|
+
equivalent-xml (0.6.0)
|
20
|
+
nokogiri (>= 1.4.3)
|
19
21
|
httpclient (2.8.3)
|
20
|
-
iso-bib-item (0.1.
|
22
|
+
iso-bib-item (0.1.10)
|
21
23
|
duplicate
|
22
24
|
isoics (~> 0.1.6)
|
23
25
|
nokogiri
|
@@ -59,6 +61,7 @@ PLATFORMS
|
|
59
61
|
DEPENDENCIES
|
60
62
|
bundler (~> 1.16)
|
61
63
|
byebug
|
64
|
+
equivalent-xml (~> 0.6)
|
62
65
|
isobib!
|
63
66
|
pry-byebug
|
64
67
|
rake (~> 10.0)
|
data/README.adoc
CHANGED
@@ -153,7 +153,8 @@ item.to_xml
|
|
153
153
|
|
154
154
|
[source,ruby]
|
155
155
|
----
|
156
|
-
Isobib::IsoBibliography.get('ISO 19115', "
|
156
|
+
Isobib::IsoBibliography.get('ISO 19115', "2014", {all_parts: true})
|
157
|
+
=> => "<bibitem type=\"international-standard\" id=\"ISO19115\">\n <title format=\"text/plain\" language=\"en\" script=\"Latn\">Geographic information -- Metadata</title>\n <title format=\"text/plain\" language=\"fr\" script=\"Latn\">Information g\u00E9ographique -- M\u00E9tadonn\u00E9es</title>\n <source type=\"src\">https://www.iso.org/standard/53798.html</source>\n <source type=\"obp\">https://www.iso.org/obp/ui/#!iso:std:53798:en</source>\n <source type=\"rss\">https://www.iso.org/contents/data/standard/05/37/53798.detail.rss</source>\n <docidentifier>ISO 19115: All Parts</docidentifier>\n <date type=\"published\">\n <on>2014</on>\n </date>\n <contributor>\n <role type=\"publisher\"/>\n <organization>\n <name>International Organization for Standardization</name>\n <abbreviation>ISO</abbreviation>\n <uri>www.iso.org</uri>\n </organization>\n </contributor>\n <edition>1</edition>\n <language>en</language>\n <language>fr</language>\n <script>Latn</script>\n <status>Published</status>\n <copyright>\n <from>2014</from>\n <owner>\n <organization>\n <name>ISO</name>\n <abbreviation></abbreviation>\n </organization>\n </owner>\n </copyright>\n <relation type=\"obsoletes\">\n <bibitem>\n <formattedref>ISO 19115:2003</formattedref>\n <docidentifier>ISO 19115:2003</docidentifier>\n </bibitem>\n </relation>\n <relation type=\"obsoletes\">\n <bibitem>\n <formattedref>ISO 19115:2003/Cor 1:2006</formattedref>\n <docidentifier>ISO 19115:2003/Cor 1:2006</docidentifier>\n </bibitem>\n </relation>\n <relation type=\"updates\">\n <bibitem>\n <formattedref>ISO 19115-1:2014/Amd 1:2018</formattedref>\n <docidentifier>ISO 19115-1:2014/Amd 1:2018</docidentifier>\n </bibitem>\n </relation>\n <relation type=\"partOf\">\n <bibitem type=\"international-standard\">\n <title format=\"text/plain\" language=\"en\" script=\"Latn\">Geographic information -- Metadata -- Part 1: Fundamentals</title>\n <title format=\"text/plain\" language=\"fr\" script=\"Latn\">Information g\u00E9ographique -- M\u00E9tadonn\u00E9es -- Partie 1: Principes de base</title>\n <source type=\"src\">https://www.iso.org/standard/53798.html</source>\n <source type=\"obp\">https://www.iso.org/obp/ui/#!iso:std:53798:en</source>\n <source type=\"rss\">https://www.iso.org/contents/data/standard/05/37/53798.detail.rss</source>\n <docidentifier>ISO 19115-1</docidentifier>\n <date type=\"published\">\n <on>2014</on>\n </date>\n <contributor>\n <role type=\"publisher\"/>\n <organization>\n <name>International Organization for Standardization</name>\n <abbreviation>ISO</abbreviation>\n <uri>www.iso.org</uri>\n </organization>\n </contributor>\n <edition>1</edition>\n <language>en</language>\n <language>fr</language>\n <script>Latn</script>\n <abstract format=\"plain\" language=\"en\" script=\"Latn\">ISO 19115-1:2014 defines the schema required for describing geographic information and services by means of metadata. It provides information about the identification, the extent, the quality, the spatial and temporal aspects, the content, the spatial reference, the portrayal, distribution, and other properties of digital geographic data and services.ISO 19115-1:2014 is applicable to:-the cataloguing of all types of resources, clearinghouse activities, and the full description of datasets and services;-geographic services, geographic datasets, dataset series, and individual geographic features and feature properties.ISO 19115-1:2014 defines:-mandatory and conditional metadata sections, metadata entities, and metadata elements;-the minimum set of metadata required to serve most metadata applications (data discovery, determining data fitness for use, data access, data transfer, and use of digital data and services);-optional metadata elements to allow for a more extensive standard description of resources, if required;-a method for extending metadata to fit specialized needs.Though ISO 19115-1:2014 is applicable to digital data and services, its principles can be extended to many other types of resources such as maps, charts, and textual documents as well as non-geographic data. Certain conditional metadata elements might not apply to these other forms of data.</abstract>\n <abstract format=\"plain\" language=\"fr\" script=\"Latn\">L'ISO 19115-1:2014 d\u00E9finit le sch\u00E9ma requis pour d\u00E9crire des informations g\u00E9ographiques et des services au moyen de m\u00E9tadonn\u00E9es. Elle fournit des informations concernant l'identification, l'\u00E9tendue, la qualit\u00E9, les aspects spatiaux et temporels, le contenu, la r\u00E9f\u00E9rence spatiale, la repr\u00E9sentation des donn\u00E9es, la distribution et d'autres propri\u00E9t\u00E9s des donn\u00E9es g\u00E9ographiques num\u00E9riques et des services.L'ISO 19115-1:2014 est applicable:-au catalogage de tous les types de ressources, des activit\u00E9s des centres d'informations et \u00E0 la description compl\u00E8te des jeux de donn\u00E9es et des services,-aux services g\u00E9ographiques, jeux de donn\u00E9es g\u00E9ographiques, s\u00E9ries de jeux de donn\u00E9es, entit\u00E9s g\u00E9ographiques individuelles et propri\u00E9t\u00E9s d'entit\u00E9s.L'ISO 19115-1:2014 d\u00E9finit:-des sections relatives aux m\u00E9tadonn\u00E9es obligatoires et facultatives, aux entit\u00E9s de m\u00E9tadonn\u00E9es et aux \u00E9l\u00E9ments de m\u00E9tadonn\u00E9es,-le jeu minimal de m\u00E9tadonn\u00E9es requis pour r\u00E9pondre au besoin de la plupart des applications des m\u00E9tadonn\u00E9es (la d\u00E9couverte des donn\u00E9es, la d\u00E9termination de l'ad\u00E9quation des donn\u00E9es \u00E0 une utilisation, l'acc\u00E8s aux donn\u00E9es, le transfert des donn\u00E9es et l'utilisation des donn\u00E9es num\u00E9riques et des services),-les \u00E9l\u00E9ments de m\u00E9tadonn\u00E9es facultatifs pour permettre une description standard plus pouss\u00E9e des ressources, si cela est n\u00E9cessaire,-un proc\u00E9d\u00E9 d'extension des m\u00E9tadonn\u00E9es pour s'adapter aux besoins sp\u00E9ciaux.L'ISO 19115-1:2014 est applicable aux donn\u00E9es num\u00E9riques et services, ses principes peuvent \u00EAtre \u00E9tendus \u00E0 bien d'autres types de ressources telles que les cartes, les graphes et les documents textes, de m\u00EAme qu'\u00E0 des donn\u00E9es non g\u00E9ographiques. Certains \u00E9l\u00E9ments de m\u00E9tadonn\u00E9es conditionnels peuvent ne pas s'appliquer \u00E0 ces autres formes de donn\u00E9es.</abstract>\n <status>Published</status>\n <copyright>\n <from>2014</from>\n <owner>\n <organization>\n <name>ISO</name>\n <abbreviation></abbreviation>\n </organization>\n </owner>\n </copyright>\n <relation type=\"obsoletes\">\n <bibitem>\n <formattedref>ISO 19115:2003</formattedref>\n <docidentifier>ISO 19115:2003</docidentifier>\n </bibitem>\n </relation>\n <relation type=\"obsoletes\">\n <bibitem>\n <formattedref>ISO 19115:2003/Cor 1:2006</formattedref>\n <docidentifier>ISO 19115:2003/Cor 1:2006</docidentifier>\n </bibitem>\n </relation>\n <relation type=\"updates\">\n <bibitem>\n <formattedref>ISO 19115-1:2014/Amd 1:2018</formattedref>\n <docidentifier>ISO 19115-1:2014/Amd 1:2018</docidentifier>\n </bibitem>\n </relation>\n <ics>\n <code>35.240.70</code>\n <text>IT applications in science</text>\n </ics>\n </bibitem>\n </relation>\n <ics>\n <code>35.240.70</code>\n <text>IT applications in science</text>\n </ics>\n <allParts>true</allParts>\n</bibitem>"
|
157
158
|
----
|
158
159
|
|
159
160
|
== Development
|
data/isobib.gemspec
CHANGED
@@ -31,7 +31,8 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.add_development_dependency 'rake', '~> 10.0'
|
32
32
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
33
33
|
spec.add_development_dependency 'simplecov'
|
34
|
+
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
34
35
|
|
35
36
|
spec.add_dependency 'algoliasearch'
|
36
|
-
spec.add_dependency 'iso-bib-item', '~> 0.1.
|
37
|
+
spec.add_dependency 'iso-bib-item', '~> 0.1.10'
|
37
38
|
end
|
@@ -83,7 +83,7 @@ module Isobib
|
|
83
83
|
<bibitem type="international-standard" id="IEV">
|
84
84
|
<title format="text/plain" language="en" script="Latn">Electropedia:
|
85
85
|
The World's Online Electrotechnical Vocabulary</title>
|
86
|
-
<
|
86
|
+
<link type="src">http://www.electropedia.org</link>
|
87
87
|
<docidentifier>IEV</docidentifier>
|
88
88
|
<date type="published"> <on>#{Date.today.year}</on> </date>
|
89
89
|
<contributor>
|
data/lib/isobib/scrapper.rb
CHANGED
@@ -76,7 +76,7 @@ module Isobib
|
|
76
76
|
workgroup: fetch_workgroup(doc),
|
77
77
|
abstract: abstract,
|
78
78
|
copyright: fetch_copyright(hit_data['title'], doc),
|
79
|
-
|
79
|
+
link: fetch_link(doc, url),
|
80
80
|
relations: fetch_relations(doc)
|
81
81
|
)
|
82
82
|
end
|
@@ -347,11 +347,11 @@ module Isobib
|
|
347
347
|
end
|
348
348
|
end
|
349
349
|
|
350
|
-
# Fetch
|
350
|
+
# Fetch links.
|
351
351
|
# @param doc [Nokogiri::HTML::Document]
|
352
352
|
# @param url [String]
|
353
353
|
# @return [Array<Hash>]
|
354
|
-
def
|
354
|
+
def fetch_link(doc, url)
|
355
355
|
obp_elms = doc.xpath("//a[contains(@href, '/obp/ui/')]")
|
356
356
|
obp = obp_elms.attr('href').value if obp_elms.any?
|
357
357
|
rss = DOMAIN + doc.xpath("//a[contains(@href, 'rss')]").attr('href')
|
data/lib/isobib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isobib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: equivalent-xml
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.6'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.6'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: algoliasearch
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,14 +128,14 @@ dependencies:
|
|
114
128
|
requirements:
|
115
129
|
- - "~>"
|
116
130
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.1.
|
131
|
+
version: 0.1.10
|
118
132
|
type: :runtime
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
136
|
- - "~>"
|
123
137
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.1.
|
138
|
+
version: 0.1.10
|
125
139
|
description: 'IsoBib: retrieve ISO Standards for bibliographic use using the BibliographicItem
|
126
140
|
model'
|
127
141
|
email:
|