relaton-ieee 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.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop.yml +1 -1
- data/README.adoc +32 -33
- data/grammars/basicdoc.rng +1559 -671
- data/grammars/biblio-standoc.rng +107 -46
- data/grammars/biblio.rng +1010 -375
- data/grammars/relaton-ieee.rng +44 -79
- data/lib/relaton/ieee/balloting_group.rb +13 -0
- data/lib/relaton/ieee/bibdata.rb +7 -0
- data/lib/relaton/ieee/bibitem.rb +7 -0
- data/lib/relaton/ieee/bibliography.rb +51 -0
- data/lib/relaton/ieee/converter/bibxml/from_rfcxml.rb +10 -0
- data/lib/relaton/ieee/converter/bibxml/from_rfcxml_referencegroup.rb +10 -0
- data/lib/relaton/ieee/converter/bibxml.rb +20 -0
- data/lib/relaton/ieee/data_fetcher.rb +192 -0
- data/lib/relaton/ieee/doctype.rb +9 -0
- data/lib/relaton/ieee/editorial_group.rb +19 -0
- data/lib/relaton/ieee/ext.rb +37 -0
- data/lib/relaton/ieee/idams_parser.rb +282 -0
- data/lib/relaton/ieee/item.rb +11 -0
- data/lib/relaton/ieee/item_data.rb +7 -0
- data/lib/relaton/ieee/processor.rb +68 -0
- data/lib/relaton/ieee/pub_id.rb +161 -0
- data/lib/relaton/ieee/rawbib_id_parser.rb +548 -0
- data/lib/relaton/ieee/util.rb +8 -0
- data/lib/relaton/ieee/version.rb +5 -0
- data/lib/relaton/ieee.rb +29 -0
- data/relaton_ieee.gemspec +8 -7
- metadata +44 -31
- data/lib/relaton_ieee/balloting_group.rb +0 -56
- data/lib/relaton_ieee/bibxml_parser.rb +0 -23
- data/lib/relaton_ieee/data_fetcher.rb +0 -221
- data/lib/relaton_ieee/document_status.rb +0 -14
- data/lib/relaton_ieee/document_type.rb +0 -16
- data/lib/relaton_ieee/editorial_group.rb +0 -83
- data/lib/relaton_ieee/hash_converter.rb +0 -45
- data/lib/relaton_ieee/idams_parser.rb +0 -254
- data/lib/relaton_ieee/ieee_bibliographic_item.rb +0 -124
- data/lib/relaton_ieee/ieee_bibliography.rb +0 -53
- data/lib/relaton_ieee/processor.rb +0 -60
- data/lib/relaton_ieee/pub_id.rb +0 -159
- data/lib/relaton_ieee/rawbib_id_parser.rb +0 -546
- data/lib/relaton_ieee/renderer/bibxml.rb +0 -17
- data/lib/relaton_ieee/util.rb +0 -6
- data/lib/relaton_ieee/version.rb +0 -3
- data/lib/relaton_ieee/xml_parser.rb +0 -66
- data/lib/relaton_ieee.rb +0 -30
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 765f4c9699411cdd840df5690cc10b533d5ed6ae7ef85feec98b1dcbda2bb297
|
|
4
|
+
data.tar.gz: c3b231bcdd964782ee0841fabdbe8faa29f46c63abee8cda0088b47ec79d0a8e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 26c1d06d839bf86ca67e63b5ca0bf61ce7ad461f1419ef2f6e48796b52f11a88f9e9ebdbc20bd49bc208ffe6f8fd572d9240f6edd690177d1e155e7fdb0eedbc
|
|
7
|
+
data.tar.gz: 868e7cdfae66dcd56935973e3a236f5b4e702fcfe67205ca3a0b57f14e9cda49a2ec02bf10ff9f84ed5c892e158c2481568b2567b21045d66682d91b64fce4e8
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/README.adoc
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
=
|
|
1
|
+
= Relaton::Ieee
|
|
2
2
|
|
|
3
3
|
RelatonIeee is a Ruby gem that implements the https://github.com/relaton/relaton-model-ieee#ieee-bibliographic-item-model[IeeeBibliographicItem model].
|
|
4
4
|
|
|
5
|
-
You can use it to retrieve metadata of IEEE Standards from standards.ieee.org, and access such metadata through the `
|
|
5
|
+
You can use it to retrieve metadata of IEEE Standards from standards.ieee.org, and access such metadata through the `Relaton::Ieee::ItemData` object.
|
|
6
6
|
|
|
7
7
|
== Installation
|
|
8
8
|
|
|
@@ -27,11 +27,11 @@ Or install it yourself as:
|
|
|
27
27
|
|
|
28
28
|
[source,ruby]
|
|
29
29
|
----
|
|
30
|
-
require '
|
|
30
|
+
require 'relaton/ieee'
|
|
31
31
|
=> true
|
|
32
32
|
|
|
33
|
-
item =
|
|
34
|
-
=> #<
|
|
33
|
+
item = Relaton::Ieee::Bibliography.search("IEEE Std 528-2019")
|
|
34
|
+
=> #<Relaton::Ieee::ItemData:0x000000012891cf70
|
|
35
35
|
...
|
|
36
36
|
----
|
|
37
37
|
|
|
@@ -40,11 +40,11 @@ item = RelatonIeee::IeeeBibliography.search("IEEE 528-2019")
|
|
|
40
40
|
[source,ruby]
|
|
41
41
|
----
|
|
42
42
|
item.to_xml
|
|
43
|
-
=> "<bibitem id="
|
|
44
|
-
<fetched>
|
|
45
|
-
<title type="main"
|
|
43
|
+
=> "<bibitem id="IEEEStd5282019" type="standard" schema-version="v1.4.1">
|
|
44
|
+
<fetched>2026-01-30</fetched>
|
|
45
|
+
<title type="main">IEEE Standard for Inertial Sensor Terminology</title>
|
|
46
46
|
<uri type="src">https://ieeexplore.ieee.org/document/8863799</uri>
|
|
47
|
-
<docidentifier type="IEEE" primary="true">IEEE 528-2019</docidentifier>
|
|
47
|
+
<docidentifier type="IEEE" primary="true">IEEE Std 528-2019</docidentifier>
|
|
48
48
|
...
|
|
49
49
|
</bibitem>"
|
|
50
50
|
----
|
|
@@ -54,16 +54,15 @@ With argument `bibdata: true` it ouputs XML wrapped by `bibdata` element and add
|
|
|
54
54
|
[source,ruby]
|
|
55
55
|
----
|
|
56
56
|
item.to_xml bibdata: true
|
|
57
|
-
=> "<bibdata type="standard" schema-version="v1.
|
|
58
|
-
<fetched>
|
|
59
|
-
<title type="main"
|
|
57
|
+
=> "<bibdata type="standard" schema-version="v1.4.1">
|
|
58
|
+
<fetched>2026-01-30</fetched>
|
|
59
|
+
<title type="main">IEEE Standard for Inertial Sensor Terminology</title>
|
|
60
60
|
<uri type="src">https://ieeexplore.ieee.org/document/8863799</uri>
|
|
61
|
-
<docidentifier type="IEEE" primary="true">IEEE 528-2019</docidentifier>
|
|
61
|
+
<docidentifier type="IEEE" primary="true">IEEE Std 528-2019</docidentifier>
|
|
62
62
|
...
|
|
63
63
|
<ext schema-version="v1.0.1">
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
</editorialgroup>
|
|
64
|
+
<doctype>standard</doctype>
|
|
65
|
+
<flavor>ieee</flavor>
|
|
67
66
|
...
|
|
68
67
|
</ext>
|
|
69
68
|
</bibdata>"
|
|
@@ -72,40 +71,39 @@ item.to_xml bibdata: true
|
|
|
72
71
|
=== Get document by reference
|
|
73
72
|
[source,ruby]
|
|
74
73
|
----
|
|
75
|
-
|
|
76
|
-
[relaton-ieee] (IEEE 528-2019)
|
|
77
|
-
[relaton-ieee] (IEEE 528-2019)
|
|
78
|
-
|
|
74
|
+
Relaton::Ieee::Bibliography.get("IEEE Std 528-2019")
|
|
75
|
+
[relaton-ieee] INFO: (IEEE Std 528-2019) Fetching from Relaton repository ...
|
|
76
|
+
[relaton-ieee] INFO: (IEEE Std 528-2019) Found: `IEEE Std 528-2019`
|
|
77
|
+
=> #<Relaton::Ieee::ItemData:0x00000001288b9380
|
|
79
78
|
...
|
|
80
79
|
----
|
|
81
80
|
|
|
82
|
-
=== Typed links
|
|
81
|
+
=== Typed source links
|
|
83
82
|
|
|
84
83
|
Each IEEE document has `src` type link.
|
|
85
84
|
|
|
86
85
|
[source,ruby]
|
|
87
86
|
----
|
|
88
|
-
item.
|
|
89
|
-
=>
|
|
87
|
+
item.source.first.type
|
|
88
|
+
=> "src"
|
|
89
|
+
|
|
90
|
+
item.source.first.content
|
|
91
|
+
=> "https://ieeexplore.ieee.org/document/8863799"
|
|
90
92
|
----
|
|
91
93
|
|
|
92
94
|
=== Create bibliographic item from XML
|
|
93
95
|
[source,ruby]
|
|
94
96
|
----
|
|
95
|
-
|
|
96
|
-
=> #<
|
|
97
|
+
Relaton::Ieee::Item.from_xml File.read "spec/fixtures/ieee_528_2019.xml"
|
|
98
|
+
=> #<Relaton::Ieee::ItemData:0x0000000128815a00
|
|
97
99
|
...
|
|
98
100
|
----
|
|
99
101
|
|
|
100
102
|
=== Create bibliographic item from YAML
|
|
101
103
|
[source,ruby]
|
|
102
104
|
----
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
...
|
|
106
|
-
|
|
107
|
-
RelatonIeee::IeeeBibliographicItem.from_hash hash
|
|
108
|
-
=> #<RelatonIeee::IeeeBibliographicItem:0x007fce940b3eb0
|
|
105
|
+
Relaton::Ieee::Item.from_yaml File.read('spec/fixtures/item.yaml')
|
|
106
|
+
=> #<Relaton::Ieee::ItemData:0x0000000122f70c88
|
|
109
107
|
...
|
|
110
108
|
----
|
|
111
109
|
|
|
@@ -113,15 +111,16 @@ hash = YAML.load_file 'spec/fixtures/ieee_528_2019.yaml'
|
|
|
113
111
|
|
|
114
112
|
There is an IEEE dataset https://github.com/relaton/ieee-rawbib which can be converted into BibXML/BibYAML formats. The dataset needs to be placed into the local directory.
|
|
115
113
|
|
|
116
|
-
The method `
|
|
114
|
+
The method `Relaton::Ieee::DataFetcher.fetch(source, output: "data", format: "yaml")` converts all the documents from the local `ieee-rawbib` directory and saves them to the `./data` folder in YAML format.
|
|
117
115
|
Arguments:
|
|
118
116
|
|
|
117
|
+
- `source` - a name of data source (default 'ieee-rawbib').
|
|
119
118
|
- `output` - folder to save documents (default './data').
|
|
120
119
|
- `format` - the format in which the documents are saved. Possible formats are: `yaml`, `xml` (default `yaml`).
|
|
121
120
|
|
|
122
121
|
[source,ruby]
|
|
123
122
|
----
|
|
124
|
-
|
|
123
|
+
Relaton::Ieee::DataFetcher.fetch
|
|
125
124
|
Started at: 2021-09-24 17:55:07 +0200
|
|
126
125
|
Stopped at: 2021-09-24 17:57:30 +0200
|
|
127
126
|
Done in: 143 sec.
|