isodoc 3.2.3 → 3.2.4
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/function/setup.rb +1 -1
- data/lib/isodoc/metadata.rb +5 -5
- data/lib/isodoc/presentation_function/docid.rb +8 -2
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/xslfo_convert.rb +9 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 819d3c20ea4ccb0037115026969f618e21162b177380574c7d2c3be138ef6f69
|
4
|
+
data.tar.gz: cb207eec17fa2a44459809689955e60ac612d4db3d44f5c0ad3d91a30da084e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27592d4f55312126f518f475247fdb73125c24af3c1a1e47ed9dadfa9e47418c8b3656ddf8cee4aaa7584ba6852facb051bc6d34cce2b17c16f97cbd077fce7d
|
7
|
+
data.tar.gz: 190486f76b78338fd7078175141af00165ae0f6f540394ba00b34f35a398aa10f04b8107eeb95e3f60772892aa52a57a2894674a21350ee88eb4e1d413e95631
|
@@ -14,7 +14,7 @@ module IsoDoc
|
|
14
14
|
dir = init_dir(filename, debug)
|
15
15
|
@filename = filename
|
16
16
|
@output_dir = File.dirname(filename)
|
17
|
-
@localdir =
|
17
|
+
@localdir = "#{@baseassetpath || filepath.parent.to_s}/"
|
18
18
|
@sourcedir = @localdir
|
19
19
|
@sourcefilename and
|
20
20
|
@sourcedir = "#{Pathname.new(@sourcefilename).parent}/"
|
data/lib/isodoc/metadata.rb
CHANGED
@@ -58,7 +58,7 @@ module IsoDoc
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def docstatus(xml, _out)
|
61
|
-
published_default(xml)
|
61
|
+
published = published_default(xml)
|
62
62
|
s = xml.at(ns("//bibdata/status/stage#{NOLANG}")) or return
|
63
63
|
s1 = xml.at(ns("//bibdata/status/stage#{currlang}")) || s
|
64
64
|
set(:stage, status_print(s.text))
|
@@ -69,23 +69,23 @@ module IsoDoc
|
|
69
69
|
set(:substage_display, i1)
|
70
70
|
(i2 = xml.at(ns("//bibdata/status/iteration"))&.text) and
|
71
71
|
set(:iteration, i2)
|
72
|
-
|
72
|
+
!published && set(:stageabbr, stage_abbr(s.text))
|
73
73
|
end
|
74
74
|
|
75
75
|
def published_default(xml)
|
76
76
|
override = xml.at(ns("//semantic-metadata/stage-published"))&.text
|
77
77
|
default = override || "true"
|
78
78
|
ret = default == "false"
|
79
|
-
s = xml.at(ns("//bibdata/status/stage#{NOLANG}"))
|
80
|
-
override || !s or ret = unpublished(s.text)
|
81
79
|
set(:unpublished, ret)
|
80
|
+
default == "true"
|
82
81
|
end
|
83
82
|
|
84
83
|
def stage_abbr(docstatus)
|
85
84
|
status_print(docstatus).split(/ /).map { |s| s[0].upcase }.join
|
86
85
|
end
|
87
86
|
|
88
|
-
|
87
|
+
# KILL
|
88
|
+
def unpublishedx(status)
|
89
89
|
!status.casecmp("published").zero?
|
90
90
|
end
|
91
91
|
|
@@ -49,16 +49,22 @@ module IsoDoc
|
|
49
49
|
id
|
50
50
|
end
|
51
51
|
|
52
|
+
def xml_to_string_skip_fn(node)
|
53
|
+
node1 = node.dup
|
54
|
+
node1.xpath(ns(".//fn")).each(&:remove)
|
55
|
+
to_xml(node1.children)
|
56
|
+
end
|
57
|
+
|
52
58
|
def bracket_if_num(num)
|
53
59
|
num.nil? and return nil
|
54
|
-
num =
|
60
|
+
num = xml_to_string_skip_fn(num).sub(/^\[/, "").sub(/\]$/, "")
|
55
61
|
/^\d+$/.match?(num) and return "[#{num}]"
|
56
62
|
num
|
57
63
|
end
|
58
64
|
|
59
65
|
def unbracket1(ident)
|
60
66
|
ident.nil? and return nil
|
61
|
-
ident.is_a?(String) or ident =
|
67
|
+
ident.is_a?(String) or ident = xml_to_string_skip_fn(ident)
|
62
68
|
ident.sub(/^\[/, "").sub(/\]$/, "")
|
63
69
|
end
|
64
70
|
|
data/lib/isodoc/version.rb
CHANGED
data/lib/isodoc/xslfo_convert.rb
CHANGED
@@ -58,8 +58,15 @@ module IsoDoc
|
|
58
58
|
ret["--param baseassetpath="] = @baseassetpath
|
59
59
|
ret = ret.merge(@pdf_cmd_options)
|
60
60
|
%w(--xsl-file --xsl-file-override).each do |x|
|
61
|
-
|
62
|
-
|
61
|
+
if ret[x]
|
62
|
+
ret[x] = if File.absolute_path?(ret[x])
|
63
|
+
Pathname.new(ret[x]).to_s
|
64
|
+
else
|
65
|
+
Pathname.new(
|
66
|
+
File.expand_path(File.join(@baseassetpath, ret[x])),
|
67
|
+
).to_s
|
68
|
+
end
|
69
|
+
end
|
63
70
|
end
|
64
71
|
if ret["--xsl-file"]
|
65
72
|
@xsl = ret["--xsl-file"]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isodoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-08-
|
11
|
+
date: 2025-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: base64
|