metanorma-ietf 2.0.0 → 2.0.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/lib/isodoc/ietf/cleanup.rb +9 -0
- data/lib/metanorma/ietf/processor.rb +4 -1
- data/lib/metanorma/ietf/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5e3303fff4dc18ee99fdb73b641629366c4074da7e2f548eeab9c3478d7c20ce
|
|
4
|
+
data.tar.gz: 1a76517464f35baa021fda117823c2e1da9d91729be59450c3ef175cb73f1866
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 61884f788a5cbda85477ac70d3336a044e694284c9a73e2ac1567df46a68fb47a825b7120fa40f2b52b8074466d23a65c890e2e1755b800ba498ce3aa4790395
|
|
7
|
+
data.tar.gz: 03a5b56271550d2d68f95bf49bb3062f09cbf3ce8643de8585353d622b7306acb8d9f136787d4856b410d49cba76e55525200a8fe9c747bb5254e2c160d93603
|
data/lib/isodoc/ietf/cleanup.rb
CHANGED
|
@@ -10,10 +10,19 @@ module IsoDoc::Ietf
|
|
|
10
10
|
deflist_cleanup(docxml)
|
|
11
11
|
bookmark_cleanup(docxml)
|
|
12
12
|
aside_cleanup(docxml)
|
|
13
|
+
front_cleanup(docxml)
|
|
13
14
|
docxml
|
|
14
15
|
end
|
|
15
16
|
|
|
16
17
|
# TODO: insert <u>
|
|
18
|
+
|
|
19
|
+
def front_cleanup(xmldoc)
|
|
20
|
+
xmldoc.xpath("//title").each { |s| s.children = s.text }
|
|
21
|
+
xmldoc.xpath("//reference/front[not(author)]").each do |f|
|
|
22
|
+
insert = f.at("./seriesInfo[last()]") || f.at("./title")
|
|
23
|
+
insert.next = "<author surname='Unknown'/>"
|
|
24
|
+
end
|
|
25
|
+
end
|
|
17
26
|
|
|
18
27
|
def table_footnote_cleanup(docxml)
|
|
19
28
|
docxml.xpath("//table[descendant::fn]").each do |t|
|
|
@@ -13,6 +13,7 @@ module Metanorma
|
|
|
13
13
|
|
|
14
14
|
def output_formats
|
|
15
15
|
{
|
|
16
|
+
rxl: "rxl",
|
|
16
17
|
xml: "xml",
|
|
17
18
|
rfc: "rfc.xml",
|
|
18
19
|
html: "html",
|
|
@@ -49,7 +50,7 @@ module Metanorma
|
|
|
49
50
|
def output(isodoc_node, outname, format, options={})
|
|
50
51
|
case format
|
|
51
52
|
when :rfc
|
|
52
|
-
IsoDoc::Ietf::RfcConvert.new(options).convert(outname, isodoc_node)
|
|
53
|
+
IsoDoc::Ietf::RfcConvert.new(options).convert(outname.sub(/\.xml/, ""), isodoc_node)
|
|
53
54
|
@done_rfc = true
|
|
54
55
|
|
|
55
56
|
when :txt, :html
|
|
@@ -62,6 +63,8 @@ module Metanorma
|
|
|
62
63
|
# In xml2rfc, --text and --html are used
|
|
63
64
|
format = :text if format == :txt
|
|
64
65
|
system("xml2rfc --#{format} #{rfcname} -o #{outname}")
|
|
66
|
+
else
|
|
67
|
+
super
|
|
65
68
|
end
|
|
66
69
|
end
|
|
67
70
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-ietf
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-01-
|
|
11
|
+
date: 2020-01-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: metanorma-standoc
|
|
@@ -312,7 +312,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
312
312
|
version: '0'
|
|
313
313
|
requirements: []
|
|
314
314
|
rubyforge_project:
|
|
315
|
-
rubygems_version: 2.7.
|
|
315
|
+
rubygems_version: 2.7.6
|
|
316
316
|
signing_key:
|
|
317
317
|
specification_version: 4
|
|
318
318
|
summary: metanorma-ietf lets you write IETF documents, such as Internet-Drafts and
|