metanorma-ietf 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5fb74d3865cba7528cc39f3064b225e51802e3a411a5bc6ad07c0b77fe50a5b
4
- data.tar.gz: ec978d5bebf8dde6192f456a71394e957203a161af4df7c8db334240266c289c
3
+ metadata.gz: 5e3303fff4dc18ee99fdb73b641629366c4074da7e2f548eeab9c3478d7c20ce
4
+ data.tar.gz: 1a76517464f35baa021fda117823c2e1da9d91729be59450c3ef175cb73f1866
5
5
  SHA512:
6
- metadata.gz: 50622bf48e6a87048d593be2b4e7d0118b55ffbe62e759d2c331af232c166ed1fc55907d3990e50f0f8865c2002fd956c1cb0ca5a09b2d13e7c6788c5814b932
7
- data.tar.gz: 424c5949d49e14d031717a616f68eb06b6a208d21990643c1513085464d4a89c6adc62db93b2ec0bf0ff00c6bc717806a49882ef28f382ba78c43a0449327756
6
+ metadata.gz: 61884f788a5cbda85477ac70d3336a044e694284c9a73e2ac1567df46a68fb47a825b7120fa40f2b52b8074466d23a65c890e2e1755b800ba498ce3aa4790395
7
+ data.tar.gz: 03a5b56271550d2d68f95bf49bb3062f09cbf3ce8643de8585353d622b7306acb8d9f136787d4856b410d49cba76e55525200a8fe9c747bb5254e2c160d93603
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ietf
3
- VERSION = "2.0.0".freeze
3
+ VERSION = "2.0.1".freeze
4
4
  end
5
5
  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.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-04 00:00:00.000000000 Z
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.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