blob: cbac11e8bbc04e78d68472b60ef177d63cfc0fbc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
(.module:
[library
[lux #*
[data
["." text
["%" format (#+ format)]]
[collection
["." list ("#\." functor)]]]
[math
[number
["n" nat]]]]]
["." // #_
["#." time]
["#." copyright]
["_" term]
[//
["$" document]]])
(def: .public end_of_license
($.sentence "END OF TERMS AND CONDITIONS"))
(def: .public (copyright_holder holder)
(-> //copyright.Holder Text)
(let [(^slots [#//time.start #//time.end]) (get@ #//copyright.period holder)
single_year? (n.= start end)
period_section (if single_year?
(%.nat start)
(format (%.nat start) "-" (%.nat end)))]
(format "Copyright (C) " period_section " " (get@ #//copyright.name holder))))
(def: .public copyright
(-> (List //copyright.Holder) Text)
(|>> (list\map ..copyright_holder)
(text.join_with text.new_line)))
|