relaton-render 0.6.0 → 0.6.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: f168f3ef6e4f5baf6efd001c182cf239681199742561699c8e4d3d5784b4b282
4
- data.tar.gz: 0ef031d1a92b9f8bcd67d1328b9305b8d2222c9f1b767d78d0c03f7a6325d70c
3
+ metadata.gz: d917f8888826f3d010567e3af72be663bfd58cc7965b713a94525c5b648e0355
4
+ data.tar.gz: bfcae13f5057b97a43fff5ee8a0ffbb33eff51bdb38b25bb3e98be0f9cb1f8a5
5
5
  SHA512:
6
- metadata.gz: 4189b0b9bd03f96bf3f67f00e94973dd0289d968ff3f3395bbd09f2a1c0ff5d0e2641e532c78579bc1a841cee06c379b7ecc43d247fbc8509f8c7a06a756a402
7
- data.tar.gz: 810cbb87d5eeffe1f88f21f4cfbdb04a1ab905bc34f857d06218ea4a09f1efd8a65a3814756143204c9110be568691d5247089ebf41a5c0cefcda4b1e74376ba
6
+ metadata.gz: a4a5a1cd00cc638313c5f9bf589437ab27f8ff2decd2c3fdfa9e64f86d405b7731bf9e6d676719d95e7c8042801e4e25bfce45ace08b3e5796779976c6b84bc5
7
+ data.tar.gz: 68060e3df113102fd81e2a7f6aabe8f07a85567096252d65b3aa3a3f967e0f38508dc33e5b3390472b90791c1a4c158fdad4e5f4826158935de37a98317191e2
data/README.adoc CHANGED
@@ -296,6 +296,9 @@ The `seriestemplate` is a template for the rendering of series information. It d
296
296
  | series_num | ./series[@type = 'main' or not(@type) or true]/number | | Y |
297
297
  | series_partnumber | ./series[@type = 'main' or not(@type) or true]/partnumber | | Y |
298
298
  | series_run | ./series[@type = 'main' or not(@type) or true]/run | | Y |
299
+ | series_place | ./series[@type = 'main' or not(@type) or true]/place | | Y |
300
+ | series_organization | ./series[@type = 'main' or not(@type) or true]/organization | | Y |
301
+ | series_dates | ./series[@type = 'main' or not(@type) or true]/from, ./series[@type = 'main' or not(@type) or true]/to | | Y |
299
302
  |===
300
303
 
301
304
  For example: `{% if series_abbr %}{{series_abbr}}{% else %}{{series_title}}{% endif %} ,_({{series_run}}) {{series_num}}|({{series_partnumber}})`
@@ -72,7 +72,7 @@ module Relaton
72
72
 
73
73
  def seriesformat(hash)
74
74
  parts = %i(series_title series_abbr series_num series_partnumber
75
- series_run series_formatted)
75
+ series_run series_formatted series_dates series_place series_org)
76
76
  series_out = parts.each_with_object({}) do |i, m|
77
77
  m[i] = hash[i]
78
78
  end
@@ -60,7 +60,10 @@ module Relaton
60
60
  series_abbr: series_abbr(series, doc),
61
61
  series_run: series_run(series, doc),
62
62
  series_num: series_num(series, doc),
63
- series_partnumber: series_partnumber(series, doc) }
63
+ series_partnumber: series_partnumber(series, doc),
64
+ series_place: series_place(series, doc),
65
+ series_org: series_org(series, doc),
66
+ series_dates: series_dates(series, doc) }
64
67
  end
65
68
  end
66
69
  end
@@ -90,6 +90,21 @@ module Relaton
90
90
  series.run
91
91
  end
92
92
 
93
+ def series_org(series, _doc)
94
+ series.organization
95
+ end
96
+
97
+ def series_place(series, _doc)
98
+ series.place
99
+ end
100
+
101
+ def series_dates(series, _doc)
102
+ f = series.from
103
+ t = series.to
104
+ f || t or return nil
105
+ "#{f}–#{t}"
106
+ end
107
+
93
108
  def authoritative_identifier(doc)
94
109
  out = doc.docidentifier.each_with_object([]) do |id, ret|
95
110
  id.primary && !authoritative_identifier_exclude.include?(id.type) and
@@ -1,5 +1,5 @@
1
1
  module Relaton
2
2
  module Render
3
- VERSION = "0.6.0".freeze
3
+ VERSION = "0.6.1".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-render
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.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: 2023-10-09 00:00:00.000000000 Z
11
+ date: 2023-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler