This repository was archived by the owner on Feb 19, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.lua
More file actions
83 lines (73 loc) · 2.46 KB
/
Copy pathbuild.lua
File metadata and controls
83 lines (73 loc) · 2.46 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
-- Build script for expkv
module = "expkv"
pkgversion = "1.9a"
pkgdate = "2021-09-20"
-- update package date and version
tagfiles = {"expkv.dtx", "README.md", "CTAN.md"}
function update_tag(file, content, tagname, tagdate)
if tagname == nil then
tagname = pkgversion
tagdate = pkgdate
end
-- update copyright notices
_, _, tagyear = string.find(tagdate, "(%d%d%d%d)")
content = string.gsub(content,
"(Copyright%s*%(C%)%s*%d%d%d%d%-)%d%d%d%d",
"%1" .. tagyear)
if string.match(file, "%.md") then
return string.gsub(content,
"%d%d%d%d%-%d%d%-%d%d v%d%.%d%w?",
tagdate .. " v" .. tagname)
elseif string.match(file, "expkv.dtx") then
content = string.gsub(content,
"\\def\\ekvDate{%d%d%d%d%-%d%d%-%d%d}",
"\\def\\ekvDate{" .. tagdate .. "}")
return string.gsub(content,
"\\def\\ekvVersion{%d%.%d%w?}",
"\\def\\ekvVersion{" .. tagname .. "}")
end
return content
end
-- test with pdfTeX and the LaTeX format
checkengines = {"pdftex","luatex"}
checkformat = "latex"
-- from which files to build
sourcefiles = {"expkv.dtx"}
unpackfiles = sourcefiles
-- which files to put in the tds
installfiles = {"expkv.sty", "expkv.tex", "t-expkv.tex"}
textfiles = {"README.md", "CTAN.md"}
docfiles = {"expkv.pdf"}
-- how the documentation is build
typesetfiles = {"expkv.dtx"}
typesetruns = 4
-- make sure that expkv.tex ends up in the generic path
packtdszip = true
tdslocations = {
"tex/generic/expkv/expkv.tex",
"tex/context/third/expkv/t-expkv.tex"
}
-- CTAN upload
ctanreadme = "CTAN.md"
uploadconfig = {
pkg = module,
author = "Jonathan P. Spratte",
version = pkgversion .. " " .. pkgdate,
license = "lppl1.3c",
summary = "An expandable key=val implementation",
topic = "keyval",
ctanPath = "/macros/generic/expkv",
repository = "https://github.com/Skillmon/tex_expkv",
bugtracker = "https://github.com/Skillmon/tex_expkv/issues",
update = true,
description = [[
`expkv` is a minimalistic but fast and expandable key=val implementation.
It provides two parsing macros:
* `\ekvset{<set>}{<key=val list>}` which is comparable to `keyval`'s `\setkeys`
* `\ekvparse<cs1><cs2>{<key=val list>}` which can be used inside `\expanded` and
expands to `<cs1>{key}` and `<cs2>{key}{val}` for the entries in the
`<key=val list>`.
`expkv` has predictable brace-stripping behaviour and handles commas and equal
signs with category codes 12 and 13 correctly.
]]
}