summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-04-16 13:20:40 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-04-16 13:20:40 +0200
commit218228536ed709be8ab2dde4a00dc27249ceed8a (patch)
tree71b331e3d99ebd89fefcc1cb369d233c5c7fbdc1 /scripts
parentea2466fe69bd082d379e95e1567f3de0b76de243 (diff)
downloadcontext-218228536ed709be8ab2dde4a00dc27249ceed8a.tar.gz
2017-04-16 12:47:00
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtx-context.lua165
-rw-r--r--scripts/context/lua/mtx-context.xml7
-rw-r--r--scripts/context/lua/mtx-interface.lua250
-rw-r--r--scripts/context/lua/mtx-server-ctx-help.lua9
-rw-r--r--scripts/context/lua/mtxrun.lua14
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua14
-rw-r--r--scripts/context/stubs/unix/mtxrun14
-rw-r--r--scripts/context/stubs/win64/mtxrun.lua14
8 files changed, 196 insertions, 291 deletions
diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua
index b52bed379..6863cffb2 100644
--- a/scripts/context/lua/mtx-context.lua
+++ b/scripts/context/lua/mtx-context.lua
@@ -1,4 +1,4 @@
-if not modules then modules = { } end modules ['mtx-context'] = {
+if not modules then modules = { } end modules['mtx-context'] = {
version = 1.001,
comment = "companion to mtxrun.lua",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
@@ -34,7 +34,7 @@ local formatters = string.formatters
local application = logs.application {
name = "mtx-context",
- banner = "ConTeXt Process Management 1.00",
+ banner = "ConTeXt Process Management 1.01",
-- helpinfo = helpinfo, -- table with { category_a = text_1, category_b = text_2 } or helpstring or xml_blob
helpinfo = "mtx-context.xml",
}
@@ -159,6 +159,67 @@ local defaultformats = {
"cont-nl",
}
+-- purging files (we should have an mkii and mkiv variants)
+
+local generic_files = {
+ "texexec.tex", "texexec.tui", "texexec.tuo",
+ "texexec.tuc", "texexec.tua",
+ "texexec.ps", "texexec.pdf", "texexec.dvi",
+ "cont-opt.tex", "cont-opt.bak"
+}
+
+local obsolete_results = {
+ "dvi",
+}
+
+local temporary_runfiles = {
+ "tui", -- mkii two pass file
+ "tua", -- mkiv obsolete
+ "tup", "ted", "tes", -- texexec
+ "top", -- mkii options file
+ "log", -- tex log file
+ "tmp", -- mkii buffer file
+ "run", -- mkii stub
+ "bck", -- backup (obsolete)
+ "rlg", -- resource log
+ "ctl", --
+ "mpt", "mpx", "mpd", "mpo", "mpb", -- metafun
+ "prep", -- context preprocessed
+ "pgf", -- tikz
+ "aux", "blg", -- bibtex
+}
+
+local temporary_suffixes = {
+ "prep", -- context preprocessed
+}
+local synctex_runfiles = {
+ "synctex", "synctex.gz", "syncctx" -- synctex
+}
+
+local persistent_runfiles = {
+ "tuo", -- mkii two pass file
+ "tub", -- mkii buffer file
+ "top", -- mkii options file
+ "tuc", -- mkiv two pass file
+ "bbl", -- bibtex
+}
+
+local special_runfiles = {
+ "%-mpgraph", "%-mprun", "%-temp%-"
+}
+
+local function purge_file(dfile,cfile)
+ if cfile and validfile(cfile) then
+ if removefile(dfile) then
+ return filebasename(dfile)
+ end
+ elseif dfile then
+ if removefile(dfile) then
+ return filebasename(dfile)
+ end
+ end
+end
+
-- process information
local ctxrunner = { } -- namespace will go
@@ -520,10 +581,15 @@ local function run_texexec(filename,a_purge,a_purgeall)
end
end
---
+-- context mode will become the only method some day
-local function check_synctex(a_synctex)
- return a_synctex and (tonumber(a_synctex) or (toboolean(a_synctex,true) and 1) or (a_synctex == "zipped" and 1) or (a_synctex == "unzipped" and -1)) or nil
+local function check_synctex(a_synctex) -- context is intercepted elsewhere
+ return a_synctex and (
+ tonumber(a_synctex) or
+ (toboolean(a_synctex,true) and 1) or
+ (a_synctex == "zipped" and 1) or
+ (a_synctex == "unzipped" and -1)
+ ) or nil
end
function scripts.context.run(ctxdata,filename)
@@ -583,7 +649,7 @@ function scripts.context.run(ctxdata,filename)
local a_nonstopmode = getargument("nonstopmode")
local a_scollmode = getargument("scrollmode")
local a_once = getargument("once")
- local a_synctex = getargument("synctex")
+ local a_synctex = getargument("syncctx") and "context" or getargument("synctex")
local a_backend = getargument("backend")
local a_arrange = getargument("arrange")
local a_noarrange = getargument("noarrange")
@@ -609,7 +675,7 @@ function scripts.context.run(ctxdata,filename)
--
a_batchmode = (a_batchmode and "batchmode") or (a_nonstopmode and "nonstopmode") or (a_scrollmode and "scrollmode") or nil
- a_synctex = check_synctex(a_synctex)
+ -- a_synctex = check_synctex(a_synctex)
--
for i=1,#filelist do
--
@@ -636,7 +702,7 @@ function scripts.context.run(ctxdata,filename)
--
local analysis = preamble_analyze(filename)
--
- a_synctex = a_synctex or check_synctex(analysis.synctex)
+ a_synctex = a_synctex or analysis.synctex
--
if a_mkii or analysis.engine == 'pdftex' or analysis.engine == 'xetex' then
run_texexec(filename,a_purge,a_purgeall)
@@ -744,9 +810,9 @@ function scripts.context.run(ctxdata,filename)
--
local l_flags = {
["interaction"] = a_batchmode,
- ["synctex"] = a_synctex,
- ["no-parse-first-line"] = true, -- obsolete
- ["safer"] = a_safer,
+ ["synctex"] = check_synctex(a_synctex), -- otherwise not working
+ ["no-parse-first-line"] = true, -- obsolete
+ ["safer"] = a_safer, -- better use --sandbox
-- ["no-mktex"] = true,
-- ["file-line-error-style"] = true,
["fmt"] = formatfile,
@@ -778,10 +844,13 @@ function scripts.context.run(ctxdata,filename)
directives[#directives+1] = format("system.profile=%s",tonumber(a_profile) or 0)
end
--
+ for i=1,#synctex_runfiles do
+ removefile(fileaddsuffix(jobname,synctex_runfiles[i]))
+ end
if a_synctex then
- report("warning: synctex is enabled") -- can add upto 5% runtime
directives[#directives+1] = format("system.synctex=%s",a_synctex)
end
+ --
if #directives > 0 then
c_flags.directives = concat(directives,",")
end
@@ -836,6 +905,9 @@ function scripts.context.run(ctxdata,filename)
--
end
--
+ if a_synctex == "context" then
+ renamefile(fileaddsuffix(jobname,"syncctx"),fileaddsuffix(jobname,"synctex"))
+ end
if a_arrange then
--
c_flags.final = true
@@ -997,7 +1069,7 @@ do -- more or less copied from mtx-plain.lua:
else
print("mktexlsr silent run") -- we use a basic print
end
- os.remove("temp.log")
+ removefile("temp.log")
else
report("running mktexlsr")
os.execute("mktexlsr")
@@ -1005,7 +1077,7 @@ do -- more or less copied from mtx-plain.lua:
end
local function engine(texengine,texformat)
- local command = string.format('%s --ini --etex --8bit %s \\dump',texengine,file.addsuffix(texformat,"mkii"))
+ local command = string.format('%s --ini --etex --8bit %s \\dump',texengine,fileaddsuffix(texformat,"mkii"))
if environment.arguments.silent then
statistics.starttiming()
local command = format("%s > temp.log",command)
@@ -1016,7 +1088,7 @@ do -- more or less copied from mtx-plain.lua:
else
print(format("%s silent make > format %q made in %.3f seconds",texengine,texformat,runtime)) -- we use a basic print
end
- os.remove("temp.log")
+ removefile("temp.log")
else
report("running command: %s",command)
os.execute(command)
@@ -1080,7 +1152,7 @@ do -- more or less copied from mtx-plain.lua:
for k, v in next, environment.arguments do
t[#t+1] = string.format("--mtx:%s=%s",k,v)
end
- execute('%s --fmt=%s %s "%s"',texengine,file.removesuffix(texformat),table.concat(t," "),filename)
+ execute('%s --fmt=%s %s "%s"',texengine,removesuffix(texformat),table.concat(t," "),filename)
end
make_mkii_format = function(name,engine)
@@ -1225,67 +1297,6 @@ function scripts.context.version()
end
end
--- purging files (we should have an mkii and mkiv variants)
-
-local generic_files = {
- "texexec.tex", "texexec.tui", "texexec.tuo",
- "texexec.tuc", "texexec.tua",
- "texexec.ps", "texexec.pdf", "texexec.dvi",
- "cont-opt.tex", "cont-opt.bak"
-}
-
-local obsolete_results = {
- "dvi",
-}
-
-local temporary_runfiles = {
- "tui", -- mkii two pass file
- "tua", -- mkiv obsolete
- "tup", "ted", "tes", -- texexec
- "top", -- mkii options file
- "log", -- tex log file
- "tmp", -- mkii buffer file
- "run", -- mkii stub
- "bck", -- backup (obsolete)
- "rlg", -- resource log
- "ctl", --
- "mpt", "mpx", "mpd", "mpo", "mpb", -- metafun
- "prep", -- context preprocessed
- "pgf", -- tikz
- "aux", "blg", -- bibtex
-}
-
-local temporary_suffixes = {
- "prep", -- context preprocessed
-}
-local synctex_runfiles = {
- "synctex", "synctex.gz", -- synctex
-}
-
-local persistent_runfiles = {
- "tuo", -- mkii two pass file
- "tub", -- mkii buffer file
- "top", -- mkii options file
- "tuc", -- mkiv two pass file
- "bbl", -- bibtex
-}
-
-local special_runfiles = {
- "%-mpgraph", "%-mprun", "%-temp%-"
-}
-
-local function purge_file(dfile,cfile)
- if cfile and validfile(cfile) then
- if removefile(dfile) then
- return filebasename(dfile)
- end
- elseif dfile then
- if removefile(dfile) then
- return filebasename(dfile)
- end
- end
-end
-
function scripts.context.purge_job(jobname,all,mkiitoo,fulljobname)
if jobname and jobname ~= "" then
jobname = filebasename(jobname)
diff --git a/scripts/context/lua/mtx-context.xml b/scripts/context/lua/mtx-context.xml
index 06b25cd3c..25e92d7a6 100644
--- a/scripts/context/lua/mtx-context.xml
+++ b/scripts/context/lua/mtx-context.xml
@@ -4,7 +4,7 @@
<metadata>
<entry name="name">mtx-context</entry>
<entry name="detail">ConTeXt Process Management</entry>
- <entry name="version">1.00</entry>
+ <entry name="version">1.01</entry>
<entry name="comment">external helpinfo file</entry>
</metadata>
<flags>
@@ -126,7 +126,10 @@
<short>run without stopping</short>
</flag>
<flag name="synctex">
- <short>run with synctex enabled (optional value: zipped, unzipped, 1, -1)</short>
+ <short>run with synctex enabled (optional value: zipped, unzipped, 1, -1, context)</short>
+ </flag>
+ <flag name="syncttx">
+ <short>a shortcut for --synctex=context</short>
</flag>
<flag name="nodates">
<short>omit runtime dates in pdf file (optional value: a number (this 1970 offset time) or string "YYYY-MM-DD HH:MM")</short>
diff --git a/scripts/context/lua/mtx-interface.lua b/scripts/context/lua/mtx-interface.lua
index 908d00540..876a073e8 100644
--- a/scripts/context/lua/mtx-interface.lua
+++ b/scripts/context/lua/mtx-interface.lua
@@ -9,6 +9,7 @@ if not modules then modules = { } end modules ['mtx-cache'] = {
local concat, sort, insert = table.concat, table.sort, table.insert
local gsub, format, gmatch, find = string.gsub, string.format, string.gmatch, string.find
local utfchar, utfgsub = utf.char, utf.gsub
+local sortedkeys = table.sortedkeys
local helpinfo = [[
<?xml version="1.0"?>
@@ -226,169 +227,16 @@ function flushers.textpad(collected)
end
end
--- function scripts.interface.editor(editor,split,forcedinterfaces)
--- local interfaces= forcedinterfaces or environment.files
--- if #interfaces == 0 then
--- interfaces= userinterfaces
--- end
--- local xmlfile = resolvers.findfile("cont-en.xml") or ""
--- if xmlfile == "" then
--- report("unable to locate cont-en.xml")
--- end
--- local collected = { }
--- for i=1,#interfaces do
--- local interface = interfaces[i]
--- local keyfile = resolvers.findfile(format("keys-%s.xml",interface)) or ""
--- if keyfile == "" then
--- report("unable to locate keys-*.xml")
--- else
--- local commands = { }
--- local mappings = { }
--- local environments = { }
--- local x = xml.load(keyfile)
--- for e, d, k in xml.elements(x,"/cd:interface/cd:commands/cd:command") do -- somehow this was variable
--- local at = d[k].at
--- local name, value = at.name, at.value
--- if name and value then
--- mappings[name] = value
--- end
--- end
--- local x = xml.load(xmlfile)
--- for e, d, k in xml.elements(x,"/cd:interface/cd:command") do
--- local at = d[k].at
--- local name, type = at.name, at["type"]
--- if name and name ~= "" then
--- local remapped = mappings[name] or name
--- if type == "environment" then
--- if split then
--- environments[#environments+1] = remapped
--- else
--- commands[#commands+1] = "start" .. remapped
--- commands[#commands+1] = "stop" .. remapped
--- end
--- else
--- commands[#commands+1] = remapped
--- end
--- end
--- end
--- if #commands > 0 then
--- sort(commands)
--- sort(environments)
--- collected[interface] = {
--- commands = commands,
--- environments = environments,
--- }
--- end
--- end
--- end
--- -- awaiting completion of the xml file
--- local definitions = dofile(resolvers.findfile("mult-def.lua"))
--- if definitions then
--- local commands = { en = { } }
--- for command, languages in next, definitions.commands do
--- commands.en[languages.en or command] = true
--- for language, command in next, languages do
--- local c = commands[language]
--- if c then
--- c[command] = true
--- else
--- commands[language] = { [command] = true }
--- end
--- end
--- end
--- for language, data in next, commands do
--- local fromlua = data
--- local fromxml = collected[language].commands
--- for i=1,#fromxml do
--- local c = fromxml[i]
--- if not fromlua[c] then
--- -- print(language,c)
--- fromlua[c] = true
--- end
--- end
--- collected[language].commands = table.sortedkeys(fromlua)
--- end
--- end
--- --
--- flushers[editor](collected)
--- end
-
--- function scripts.interface.editor(editor,split,forcedinterfaces)
--- local interfaces= forcedinterfaces or environment.files
--- if #interfaces == 0 then
--- interfaces= userinterfaces
--- end
--- --
--- local filename = "context-en.xml"
--- local xmlfile = resolvers.findfile(filename) or ""
--- if xmlfile == "" then
--- report("unable to locate %a",filename)
--- return
--- end
--- local x = xml.load(xmlfile)
--- --
--- local filename = "mult-def.lua"
--- local deffile = resolvers.findfile(filename) or ""
--- if deffile == "" then
--- report("unable to locate %a",filename)
--- return
--- end
--- local interface = dofile(filename)
--- if not interface or not next(interface) then
--- report("invalid file %a",filename)
--- return
--- end
--- local variables = interface.variables
--- local constants = interface.constants
--- local commands = interface.commands
--- local elements = interface.elements
--- local collected = { }
--- for i=1,#interfaces do
--- local interface = interfaces[i]
--- local i_commands = { }
--- local i_environments = { }
--- local start = elements.start[interface] or elements.start.en
--- local stop = elements.stop [interface] or elements.stop .en
--- for e, d, k in xml.elements(x,"cd:interface/cd:command") do
--- local at = d[k].at
--- local name = at["name"] or ""
--- local type = at["type"]
--- if name ~= "" then
--- local c = commands[name]
--- local n = c and (c[interface] or c.en) or name
--- if type ~= "environment" then
--- i_commands[#i_commands+1] = n
--- elseif split then
--- i_environments[#i_environments+1] = n
--- else
--- -- variables ?
--- i_commands[#i_commands+1] = start .. n
--- i_commands[#i_commands+1] = stop .. n
--- end
--- end
--- end
--- if #i_commands > 0 then
--- sort(i_commands)
--- sort(i_environments)
--- collected[interface] = {
--- commands = i_commands,
--- environments = i_environments,
--- }
--- end
--- end
--- --
--- flushers[editor](collected)
--- end
-
-- we could instead load context-en.xml
function scripts.interface.editor(editor,split,forcedinterfaces)
- local interfaces= forcedinterfaces or environment.files
+ local interfaces = forcedinterfaces or environment.files
if #interfaces == 0 then
interfaces= userinterfaces
end
--
- local filename = "i-context.xml"
+-- local filename = "i-context.xml"
+ local filename = "context-en.xml"
local xmlfile = resolvers.findfile(filename) or ""
if xmlfile == "" then
report("unable to locate %a",filename)
@@ -416,36 +264,37 @@ function scripts.interface.editor(editor,split,forcedinterfaces)
report("generating files for %a",editor)
report("loading %a",xmlfile)
local xmlroot = xml.load(xmlfile)
- xml.include(xmlroot,"cd:interfacefile","filename",true,function(s)
- local fullname = resolvers.findfile(s)
- if fullname and fullname ~= "" then
- report("including %a",fullname)
- return io.loaddata(fullname)
- end
- end)
- -- resolve definitions
- local definitions = { }
- for e in xml.collected(xmlroot,"cd:interface/cd:define") do
- definitions[e.at.name] = e.dt
- end
- local function resolve(root)
- for e in xml.collected(root,"*") do
- if e.tg == "resolve" then
- local resolved = definitions[e.at.name or ""]
- if resolved then
- e.__p__.dt[e.ni] = resolved
- resolve(resolved)
- end
- end
- end
- end
- resolve(xmlroot)
+-- xml.include(xmlroot,"cd:interfacefile","filename",true,function(s)
+-- local fullname = resolvers.findfile(s)
+-- if fullname and fullname ~= "" then
+-- report("including %a",fullname)
+-- return io.loaddata(fullname)
+-- end
+-- end)
+-- local definitions = { }
+-- for e in xml.collected(xmlroot,"cd:interface/cd:define") do
+-- definitions[e.at.name] = e.dt
+-- end
+-- local function resolve(root)
+-- for e in xml.collected(root,"*") do
+-- if e.tg == "resolve" then
+-- local resolved = definitions[e.at.name or ""]
+-- if resolved then
+-- -- use proper replace helper
+-- e.__p__.dt[e.ni] = resolved
+-- resolved.__p__ = e.__p__
+-- resolve(resolved)
+-- end
+-- end
+-- end
+-- end
+-- resolve(xmlroot)
--
+
for i=1,#interfaces do
local interface = interfaces[i]
local i_commands = { }
local i_environments = { }
- local i_instances = { }
local start = elements.start[interface] or elements.start.en
local stop = elements.stop [interface] or elements.stop .en
for e in xml.collected(xmlroot,"cd:interface/cd:command") do
@@ -455,31 +304,38 @@ function scripts.interface.editor(editor,split,forcedinterfaces)
if name ~= "" then
local c = commands[name]
local n = c and (c[interface] or c.en) or name
--- for e in xml.collected(e,"/instances") do
--- print(n,e)
--- end
if at.generated == "yes" then
+ for e in xml.collected(e,"/cd:instances/cd:constant") do
+ local name = e.at.value
+ if name then
+ local c = variables[name]
+ local n = c and (c[interface] or c.en) or name
+ if type == "environment" then
+ i_commands[n] = true
+ elseif split then
+ i_environments[n] = true
+ else
+ i_commands[start..n] = true
+ i_commands[stop ..n] = true
+ end
+ end
+ end
-- skip (for now)
--- if at.variant == "instance" then
--- i_instances = n
--- end
elseif type ~= "environment" then
- i_commands[#i_commands+1] = n
+ i_commands[n] = true
elseif split then
- i_environments[#i_environments+1] = n
+ i_environments[n] = true
else
-- variables ?
- i_commands[#i_commands+1] = start .. n
- i_commands[#i_commands+1] = stop .. n
+ i_commands[start..n] = true
+ i_commands[stop ..n] = true
end
end
end
- if #i_commands > 0 then
- sort(i_commands)
- sort(i_environments)
+ if next(i_commands) then
collected[interface] = {
- commands = i_commands,
- environments = i_environments,
+ commands = sortedkeys(i_commands),
+ environments = sortedkeys(i_environments),
}
end
end
@@ -526,7 +382,7 @@ function scripts.interface.mkii()
texresult[#texresult+1] = format("%% definitions for interface %s for language %s\n%%",what,language)
xmlresult[#xmlresult+1] = format("\t<!-- definitions for interface %s for language %s -->\n",what,language)
xmlresult[#xmlresult+1] = format("\t<cd:%s>",what)
- local sorted = table.sortedkeys(t)
+ local sorted = sortedkeys(t)
for i=1,#sorted do
local key = sorted[i]
local v = t[key]
diff --git a/scripts/context/lua/mtx-server-ctx-help.lua b/scripts/context/lua/mtx-server-ctx-help.lua
index 04217dab9..2e8b87f32 100644
--- a/scripts/context/lua/mtx-server-ctx-help.lua
+++ b/scripts/context/lua/mtx-server-ctx-help.lua
@@ -245,6 +245,7 @@ local function getnames(root,interface)
local found = { }
local names = { }
local groups = { }
+ local extra = { }
for e in xmlcollected(root,'cd:interface/cd:interface') do
local category = match(e.at.file or "","^i%-(.*)%.xml$")
local list = { }
@@ -256,6 +257,7 @@ local function getnames(root,interface)
names[#names+1] = t
list[#list+1] = t
found[idname] = e
+ extra[csname] = e
else
-- variant
end
@@ -268,11 +270,11 @@ local function getnames(root,interface)
end
sort(names, function(a,b) return lower(a[2]) < lower(b[2]) end)
sort(groups, function(a,b) return lower(a[1]) < lower(b[1]) end)
- return names, groups, found
+ return names, groups, found, extra
end
local loaded = setmetatableindex(function(loaded,interface)
- local names, groups, found = getnames(usedsetuproot,interface)
+ local names, groups, found, extra = getnames(usedsetuproot,interface)
local current = {
interface = interface,
root = usedsetuproot,
@@ -280,13 +282,14 @@ local loaded = setmetatableindex(function(loaded,interface)
names = names,
groups = groups,
found = found,
+ extra = extra,
}
loaded[interface] = current
return current
end)
local function collect(current,name,interface,lastmode)
- local command = current.found[name]
+ local command = current.found[name] or current.extra[name]
if command then
local definitions = current.definitions
local attributes = command.at or { }
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index ec4e81506..b2101937a 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -14018,7 +14018,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-aux"] = package.loaded["lxml-aux"] or true
--- original size: 29836, stripped down to: 21175
+-- original size: 29835, stripped down to: 21174
if not modules then modules={} end modules ['lxml-aux']={
version=1.001,
@@ -14670,7 +14670,7 @@ local obsolete=xml.obsolete
xml.strip_whitespace=xml.strip obsolete.strip_whitespace=xml.strip
xml.collect_elements=xml.collect obsolete.collect_elements=xml.collect
xml.delete_element=xml.delete obsolete.delete_element=xml.delete
-xml.replace_element=xml.replace obsolete.replace_element=xml.replacet
+xml.replace_element=xml.replace obsolete.replace_element=xml.replace
xml.each_element=xml.each obsolete.each_element=xml.each
xml.process_elements=xml.process obsolete.process_elements=xml.process
xml.insert_element_after=xml.insertafter obsolete.insert_element_after=xml.insertafter
@@ -20422,7 +20422,7 @@ end -- of closure
-- used libraries : l-lua.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 841486
+-- original bytes : 841485
-- stripped bytes : 305240
-- end library merge
@@ -20718,6 +20718,7 @@ local helpinfo = [[
</subcategory>
<subcategory>
<flag name="expand-braces"><short>expand complex variable</short></flag>
+ <flag name="resolve-path"><short>expand variable (completely resolve paths)</short></flag>
<flag name="expand-path"><short>expand variable (resolve paths)</short></flag>
<flag name="expand-var"><short>expand variable (resolve references)</short></flag>
<flag name="show-path"><short>show path expansion of ...</short></flag>
@@ -21701,6 +21702,13 @@ elseif e_argument("expand-path") then
environment.initializearguments(environment.arguments_after)
resolvers.dowithfilesandreport(resolvers.expandpath, environment.files)
+elseif e_argument("resolve-path") then
+
+ resolvers.load("nofiles")
+ runners.register_arguments(filename)
+ environment.initializearguments(environment.arguments_after)
+ resolvers.dowithfilesandreport(resolvers.cleanedpathlist, environment.files)
+
elseif e_argument("expand-var") or e_argument("expand-variable") then
-- luatools: runners.execute_ctx_script("mtx-base","--expand-var",filename)
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index ec4e81506..b2101937a 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -14018,7 +14018,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-aux"] = package.loaded["lxml-aux"] or true
--- original size: 29836, stripped down to: 21175
+-- original size: 29835, stripped down to: 21174
if not modules then modules={} end modules ['lxml-aux']={
version=1.001,
@@ -14670,7 +14670,7 @@ local obsolete=xml.obsolete
xml.strip_whitespace=xml.strip obsolete.strip_whitespace=xml.strip
xml.collect_elements=xml.collect obsolete.collect_elements=xml.collect
xml.delete_element=xml.delete obsolete.delete_element=xml.delete
-xml.replace_element=xml.replace obsolete.replace_element=xml.replacet
+xml.replace_element=xml.replace obsolete.replace_element=xml.replace
xml.each_element=xml.each obsolete.each_element=xml.each
xml.process_elements=xml.process obsolete.process_elements=xml.process
xml.insert_element_after=xml.insertafter obsolete.insert_element_after=xml.insertafter
@@ -20422,7 +20422,7 @@ end -- of closure
-- used libraries : l-lua.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 841486
+-- original bytes : 841485
-- stripped bytes : 305240
-- end library merge
@@ -20718,6 +20718,7 @@ local helpinfo = [[
</subcategory>
<subcategory>
<flag name="expand-braces"><short>expand complex variable</short></flag>
+ <flag name="resolve-path"><short>expand variable (completely resolve paths)</short></flag>
<flag name="expand-path"><short>expand variable (resolve paths)</short></flag>
<flag name="expand-var"><short>expand variable (resolve references)</short></flag>
<flag name="show-path"><short>show path expansion of ...</short></flag>
@@ -21701,6 +21702,13 @@ elseif e_argument("expand-path") then
environment.initializearguments(environment.arguments_after)
resolvers.dowithfilesandreport(resolvers.expandpath, environment.files)
+elseif e_argument("resolve-path") then
+
+ resolvers.load("nofiles")
+ runners.register_arguments(filename)
+ environment.initializearguments(environment.arguments_after)
+ resolvers.dowithfilesandreport(resolvers.cleanedpathlist, environment.files)
+
elseif e_argument("expand-var") or e_argument("expand-variable") then
-- luatools: runners.execute_ctx_script("mtx-base","--expand-var",filename)
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index ec4e81506..b2101937a 100644
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -14018,7 +14018,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-aux"] = package.loaded["lxml-aux"] or true
--- original size: 29836, stripped down to: 21175
+-- original size: 29835, stripped down to: 21174
if not modules then modules={} end modules ['lxml-aux']={
version=1.001,
@@ -14670,7 +14670,7 @@ local obsolete=xml.obsolete
xml.strip_whitespace=xml.strip obsolete.strip_whitespace=xml.strip
xml.collect_elements=xml.collect obsolete.collect_elements=xml.collect
xml.delete_element=xml.delete obsolete.delete_element=xml.delete
-xml.replace_element=xml.replace obsolete.replace_element=xml.replacet
+xml.replace_element=xml.replace obsolete.replace_element=xml.replace
xml.each_element=xml.each obsolete.each_element=xml.each
xml.process_elements=xml.process obsolete.process_elements=xml.process
xml.insert_element_after=xml.insertafter obsolete.insert_element_after=xml.insertafter
@@ -20422,7 +20422,7 @@ end -- of closure
-- used libraries : l-lua.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 841486
+-- original bytes : 841485
-- stripped bytes : 305240
-- end library merge
@@ -20718,6 +20718,7 @@ local helpinfo = [[
</subcategory>
<subcategory>
<flag name="expand-braces"><short>expand complex variable</short></flag>
+ <flag name="resolve-path"><short>expand variable (completely resolve paths)</short></flag>
<flag name="expand-path"><short>expand variable (resolve paths)</short></flag>
<flag name="expand-var"><short>expand variable (resolve references)</short></flag>
<flag name="show-path"><short>show path expansion of ...</short></flag>
@@ -21701,6 +21702,13 @@ elseif e_argument("expand-path") then
environment.initializearguments(environment.arguments_after)
resolvers.dowithfilesandreport(resolvers.expandpath, environment.files)
+elseif e_argument("resolve-path") then
+
+ resolvers.load("nofiles")
+ runners.register_arguments(filename)
+ environment.initializearguments(environment.arguments_after)
+ resolvers.dowithfilesandreport(resolvers.cleanedpathlist, environment.files)
+
elseif e_argument("expand-var") or e_argument("expand-variable") then
-- luatools: runners.execute_ctx_script("mtx-base","--expand-var",filename)
diff --git a/scripts/context/stubs/win64/mtxrun.lua b/scripts/context/stubs/win64/mtxrun.lua
index ec4e81506..b2101937a 100644
--- a/scripts/context/stubs/win64/mtxrun.lua
+++ b/scripts/context/stubs/win64/mtxrun.lua
@@ -14018,7 +14018,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-aux"] = package.loaded["lxml-aux"] or true
--- original size: 29836, stripped down to: 21175
+-- original size: 29835, stripped down to: 21174
if not modules then modules={} end modules ['lxml-aux']={
version=1.001,
@@ -14670,7 +14670,7 @@ local obsolete=xml.obsolete
xml.strip_whitespace=xml.strip obsolete.strip_whitespace=xml.strip
xml.collect_elements=xml.collect obsolete.collect_elements=xml.collect
xml.delete_element=xml.delete obsolete.delete_element=xml.delete
-xml.replace_element=xml.replace obsolete.replace_element=xml.replacet
+xml.replace_element=xml.replace obsolete.replace_element=xml.replace
xml.each_element=xml.each obsolete.each_element=xml.each
xml.process_elements=xml.process obsolete.process_elements=xml.process
xml.insert_element_after=xml.insertafter obsolete.insert_element_after=xml.insertafter
@@ -20422,7 +20422,7 @@ end -- of closure
-- used libraries : l-lua.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 841486
+-- original bytes : 841485
-- stripped bytes : 305240
-- end library merge
@@ -20718,6 +20718,7 @@ local helpinfo = [[
</subcategory>
<subcategory>
<flag name="expand-braces"><short>expand complex variable</short></flag>
+ <flag name="resolve-path"><short>expand variable (completely resolve paths)</short></flag>
<flag name="expand-path"><short>expand variable (resolve paths)</short></flag>
<flag name="expand-var"><short>expand variable (resolve references)</short></flag>
<flag name="show-path"><short>show path expansion of ...</short></flag>
@@ -21701,6 +21702,13 @@ elseif e_argument("expand-path") then
environment.initializearguments(environment.arguments_after)
resolvers.dowithfilesandreport(resolvers.expandpath, environment.files)
+elseif e_argument("resolve-path") then
+
+ resolvers.load("nofiles")
+ runners.register_arguments(filename)
+ environment.initializearguments(environment.arguments_after)
+ resolvers.dowithfilesandreport(resolvers.cleanedpathlist, environment.files)
+
elseif e_argument("expand-var") or e_argument("expand-variable") then
-- luatools: runners.execute_ctx_script("mtx-base","--expand-var",filename)