From 41df6a896ad3ab1d8bb6286423e9540b2b34f576 Mon Sep 17 00:00:00 2001 From: Marius Date: Wed, 20 Mar 2013 23:00:13 +0200 Subject: beta 2013.03.20 21:07 --- scripts/context/lua/mtx-context.lua | 260 ++++++++++++++++++++-------- scripts/context/lua/mtx-fonts.lua | 146 +++++++++------- scripts/context/lua/mtxrun.lua | 326 ++++++++++++++++++++++++++---------- 3 files changed, 514 insertions(+), 218 deletions(-) (limited to 'scripts/context/lua') diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua index d06b60b77..ad25b52ce 100644 --- a/scripts/context/lua/mtx-context.lua +++ b/scripts/context/lua/mtx-context.lua @@ -19,85 +19,195 @@ local lpegpatterns, lpegmatch, Cs, P = lpeg.patterns, lpeg.match, lpeg.Cs, lpeg. local getargument = environment.getargument or environment.argument local setargument = environment.setargument -local basicinfo = [[ ---run process (one or more) files (default action) ---make create context formats - ---ctx=name use ctx file (process management specification) ---interface use specified user interface (default: en) - ---autopdf close pdf file in viewer and start pdf viewer afterwards ---purge(all) purge files either or not after a run (--pattern=...) - ---usemodule=list load the given module or style, normally part o fthe distribution ---environment=list load the given environment file first (document styles) ---mode=list enable given the modes (conditional processing in styles) ---path=list also consult the given paths when files are looked for ---arguments=list set variables that can be consulted during a run (key/value pairs) ---randomseed=number set the randomseed ---result=name rename the resulting output to the given name ---trackers=list set tracker variables (show list with --showtrackers) ---directives=list set directive variables (show list with --showdirectives) ---silent=list disable logcatgories (show list with --showlogcategories) ---noconsole disable logging to the console (logfile only) ---purgeresult purge result file before run - ---forcexml force xml stub ---forcecld force cld (context lua document) stub ---forcelua force lua stub (like texlua) ---forcemp force mp stub - ---arrange run extra imposition pass, given that the style sets up imposition ---noarrange ignore imposition specifications in the style - ---jit use luajittex with jit turned off (only use the faster virtual machine) ---jiton use luajittex with jit turned on (in most cases not faster, even slower) - ---once only run once (no multipass data file is produced) ---batchmode run without stopping and don't show messages on the console ---nonstopmode run without stopping - ---generate generate file database etc. (as luatools does) ---paranoid don't descend to .. and ../.. ---version report installed context version - ---global assume given file present elsewhere ---nofile use dummy file as jobname - ---expert expert options -]] - -local expertinfo = [[ -expert options: - ---touch update context version number (remake needed afterwards, also provide --expert) ---nostatistics omit runtime statistics at the end of the run ---update update context from website (not to be confused with contextgarden) ---profile profile job (use: mtxrun --script profile --analyze) ---timing generate timing and statistics overview - ---extra=name process extra (mtx-context- in distribution) ---extras show extras -]] - -local specialinfo = [[ -special options: - ---pdftex process file with texexec using pdftex ---xetex process file with texexec using xetex ---mkii process file with texexec - ---pipe don't check for file and enter scroll mode (--dummyfile=whatever.tmp) +local helpinfo = [[ + + + + mtx-context + ConTeXt Process Management + 0.60 + + + + + + process (one or more) files (default action) + + + create context formats + + + + + use ctx file (process management specification) + + + use specified user interface (default: en) + + + + + close pdf file in viewer and start pdf viewer afterwards + + + purge files either or not after a run (=...) + + + purge all files either or not after a run (=...) + + + + + load the given module or style, normally part of the distribution + + + load the given environment file first (document styles) + + + enable given the modes (conditional processing in styles) + + + also consult the given paths when files are looked for + + + set variables that can be consulted during a run (key/value pairs) + + + set the randomseed + + + rename the resulting output to the given name + + + set tracker variables (show list with ) + + + set directive variables (show list with ) + + + disable logcatgories (show list with ) + + + disable logging to the console (logfile only) + + + purge result file before run + + + + + force xml stub + + + force cld (context lua document) stub + + + force lua stub (like texlua) + + + force mp stub + + + + + run extra imposition pass, given that the style sets up imposition + + + ignore imposition specifications in the style + + + + + use luajittex with jit turned off (only use the faster virtual machine) + + + use luajittex with jit turned on (in most cases not faster, even slower) + + + + + only run once (no multipass data file is produced) + + + run without stopping and do not show messages on the console + + + run without stopping + + + + + generate file database etc. (as luatools does) + + + do not descend to .. and ../.. + + + report installed context version + + + + + assume given file present elsewhere + + + use dummy file as jobname + + + + + + + update context version number (remake needed afterwards, also provide ) + + + omit runtime statistics at the end of the run + + + update context from website (not to be confused with contextgarden) + + + profile job (use: mtxrun profile ) + + + generate timing and statistics overview + + + + + process extra (mtx-context-... in distribution) + + + show extras + + + + + + + process file with texexec using pdftex + + + process file with texexec using xetex + + + process file with texexec + + + + + do not check for file and enter scroll mode (=whatever.tmp) + + + + + ]] local application = logs.application { name = "mtx-context", banner = "ConTeXt Process Management 0.60", - helpinfo = { - basic = basicinfo, - extra = extrainfo, - expert = expertinfo, - } + helpinfo = helpinfo, } -- local luatexflags = { @@ -1468,6 +1578,8 @@ elseif getargument("extras") then scripts.context.extras(environment.files[1] or getargument("extras")) elseif getargument("extra") then scripts.context.extra() +elseif getargument("exporthelp") then + application.export(getargument("exporthelp"),environment.files[1]) elseif getargument("help") then if environment.files[1] == "extras" then scripts.context.extras() diff --git a/scripts/context/lua/mtx-fonts.lua b/scripts/context/lua/mtx-fonts.lua index 6dfd6b108..659059fa1 100644 --- a/scripts/context/lua/mtx-fonts.lua +++ b/scripts/context/lua/mtx-fonts.lua @@ -6,42 +6,70 @@ if not modules then modules = { } end modules ['mtx-fonts'] = { license = "see context related readme files" } -local helpinfo = [[ ---save save open type font in raw table ---unpack save a tma file in a more readale format - ---reload [--force] generate new font database (use force when in doubt) ---reload --simple generate 'luatex-fonts-names.lua' (not for context!) - ---list --name list installed fonts, filter by name [--pattern] ---list --spec list installed fonts, filter by spec [--filter] ---list --file list installed fonts, filter by file [--pattern] - ---pattern=str filter files using pattern ---filter=list key-value pairs ---all show all found instances (combined with other flags) ---info give more details ---track=list enable trackers ---statistics some info about the database - -examples of searches: +local getargument = environment.getargument +local setargument = environment.setargument +local givenfiles = environment.files -mtxrun --script font --list somename (== --pattern=*somename*) - -mtxrun --script font --list --name somename -mtxrun --script font --list --name --pattern=*somename* - -mtxrun --script font --list --spec somename -mtxrun --script font --list --spec somename-bold-italic -mtxrun --script font --list --spec --pattern=*somename* -mtxrun --script font --list --spec --filter="fontname=somename" -mtxrun --script font --list --spec --filter="familyname=somename,weight=bold,style=italic,width=condensed" -mtxrun --script font --list --spec --filter="familyname=crap*,weight=bold,style=italic" - -mtxrun --script font --list --all -mtxrun --script font --list --file somename -mtxrun --script font --list --file --all somename -mtxrun --script font --list --file --pattern=*somename* +local helpinfo = [[ + + + + mtx-fonts + ConTeXt Font Database Management + 0.21 + + + + + save open type font in raw table + save a tma file in a more readale format + + + generate new font database (use when in doubt) + :generate luatex-fonts-names.lua (not for context!) + + + : list installed fonts, filter by name [] + : list installed fonts, filter by spec [] + : list installed fonts, filter by file [] + + + filter files using pattern + key-value pairs + show all found instances (combined with other flags) + give more details + enable trackers + some info about the database + + + + + + Examples of searches + + mtxrun --script font --list somename (== --pattern=*somename*) + + + mtxrun --script font --list --name somename + mtxrun --script font --list --name --pattern=*somename* + + + mtxrun --script font --list --spec somename + mtxrun --script font --list --spec somename-bold-italic + mtxrun --script font --list --spec --pattern=*somename* + mtxrun --script font --list --spec --filter="fontname=somename" + mtxrun --script font --list --spec --filter="familyname=somename,weight=bold,style=italic,width=condensed" + mtxrun --script font --list --spec --filter="familyname=crap*,weight=bold,style=italic" + + + mtxrun --script font --list --all + mtxrun --script font --list --file somename + mtxrun --script font --list --file --all somename + mtxrun --script font --list --file --pattern=*somename* + + + + ]] local application = logs.application { @@ -139,10 +167,10 @@ function fonts.names.simple() end function scripts.fonts.reload() - if environment.argument("simple") then + if getargument("simple") then fonts.names.simple() else - fonts.names.load(true,environment.arguments.force) + fonts.names.load(true,arguments.force) end end @@ -210,7 +238,7 @@ end local function reloadbase(reload) if reload then report("fontnames, reloading font database") - names.load(true,environment.arguments.force) + names.load(true,arguments.force) report("fontnames, done\n\n") end end @@ -276,16 +304,16 @@ end function scripts.fonts.list() - local all = environment.argument("all") - local info = environment.argument("info") - local reload = environment.argument("reload") - local pattern = environment.argument("pattern") - local filter = environment.argument("filter") - local given = environment.files[1] + local all = getargument("all") + local info = getargument("info") + local reload = getargument("reload") + local pattern = getargument("pattern") + local filter = getargument("filter") + local given = givenfiles[1] reloadbase(reload) - if environment.argument("name") then + if getargument("name") then if pattern then --~ mtxrun --script font --list --name --pattern=*somename* list_matches(fonts.names.list(string.topattern(pattern,true),reload,all),info) @@ -297,7 +325,7 @@ function scripts.fonts.list() else report("not supported: --list --name ",name) end - elseif environment.argument("spec") then + elseif getargument("spec") then if pattern then --~ mtxrun --script font --list --spec --pattern=*somename* report("not supported: --list --spec --pattern",name) @@ -310,7 +338,7 @@ function scripts.fonts.list() else report("not supported: --list --spec ",name) end - elseif environment.argument("file") then + elseif getargument("file") then if pattern then --~ mtxrun --script font --list --file --pattern=*somename* list_specifications(fonts.names.collectfiles(string.topattern(pattern,true),reload,all),info) @@ -338,7 +366,7 @@ function scripts.fonts.list() end function scripts.fonts.unpack() - local name = file.removesuffix(file.basename(environment.files[1] or "")) + local name = file.removesuffix(file.basename(givenfiles[1] or "")) if name and name ~= "" then local cache = containers.define("fonts", "otf", 2.730, true) local cleanname = containers.cleanname(name) @@ -355,8 +383,8 @@ function scripts.fonts.unpack() end function scripts.fonts.save() - local name = environment.files[1] or "" - local sub = environment.files[2] or "" + local name = givenfiles[1] or "" + local sub = givenfiles[2] or "" local function save(savename,fontblob) if fontblob then savename = savename:lower() .. ".lua" @@ -396,21 +424,23 @@ function scripts.fonts.save() end end -if environment.argument("names") then - environment.setargument("reload",true) - environment.setargument("simple",true) +if getargument("names") then + setargument("reload",true) + setargument("simple",true) end -if environment.argument("list") then +if getargument("list") then scripts.fonts.list() -elseif environment.argument("reload") then +elseif getargument("reload") then scripts.fonts.reload() -elseif environment.argument("save") then +elseif getargument("save") then scripts.fonts.save() -elseif environment.argument("unpack") then +elseif getargument("unpack") then scripts.fonts.unpack() -elseif environment.argument("statistics") then +elseif getargument("statistics") then fonts.names.statistics() +elseif getargument("exporthelp") then + application.export(getargument("exporthelp"),givenfiles[1]) else application.help() end diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua index 0648e94e7..92c9a763a 100644 --- a/scripts/context/lua/mtxrun.lua +++ b/scripts/context/lua/mtxrun.lua @@ -6072,7 +6072,7 @@ do -- create closure to overcome 200 locals limit package.loaded["trac-log"] = package.loaded["trac-log"] or true --- original size: 20644, stripped down to: 14615 +-- original size: 21510, stripped down to: 15167 if not modules then modules={} end modules ['trac-log']={ version=1.001, @@ -6137,6 +6137,7 @@ logs=logs or {} local logs=logs local moreinfo=[[ More information about ConTeXt and the tools that come with it can be found at: +]].."\n"..[[ maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net wiki : http://contextgarden.net @@ -6536,11 +6537,14 @@ function logs.reportbanner() end function logs.reportline () end function logs.simplelines () end function logs.help () end +local Carg,C,lpegmatch=lpeg.Carg,lpeg.C,lpeg.match +local p_newline=lpeg.patterns.newline +local linewise=( + Carg(1)*C((1-p_newline)^1)/function(t,s) t.report(s) end+Carg(1)*p_newline^2/function(t) t.report() end+p_newline +)^1 local function reportlines(t,str) if str then - for line in gmatch(str,"(.-)[\n\r]") do - t.report(line) - end + lpegmatch(linewise,str,1,t) end end local function reportbanner(t) @@ -6561,8 +6565,7 @@ local function reporthelp(t,...) if type(helpinfo)=="string" then reportlines(t,helpinfo) elseif type(helpinfo)=="table" then - local n=select("#",...) - for i=1,n do + for i=1,select("#",...) do reportlines(t,t.helpinfo[select(i,...)]) if i0 then dt[#dt+1]=spacing end - local resolved=(namespace=="" and xmlns[#xmlns]) or nsremap[namespace] or namespace + local resolved=namespace=="" and xmlns[#xmlns] or nsremap[namespace] or namespace top=stack[#stack] dt=top.dt local t={ ns=namespace or "",rn=resolved,tg=tag,at=at,dt={},__p__=top } @@ -8064,7 +8092,7 @@ local function add_begin(spacing,namespace,tag) if #spacing>0 then dt[#dt+1]=spacing end - local resolved=(namespace=="" and xmlns[#xmlns]) or nsremap[namespace] or namespace + local resolved=namespace=="" and xmlns[#xmlns] or nsremap[namespace] or namespace top={ ns=namespace or "",rn=resolved,tg=tag,at=at,dt={},__p__=stack[#stack] } setmetatable(top,mt) dt=top.dt @@ -8078,9 +8106,9 @@ local function add_end(spacing,namespace,tag) local toclose=remove(stack) top=stack[#stack] if #stack<1 then - errorstr=format("nothing to close with %s %s",tag,xml.checkerror(top,toclose) or "") + errorstr=formatters["unable to close %s %s"](tag,xml.checkerror(top,toclose) or "") elseif toclose.tg~=tag then - errorstr=format("unable to close %s with %s %s",toclose.tg,tag,xml.checkerror(top,toclose) or "") + errorstr=formatters["unable to close %s with %s %s"](toclose.tg,tag,xml.checkerror(top,toclose) or "") end dt=top.dt dt[#dt+1]=toclose @@ -8125,9 +8153,9 @@ local function attribute_specification_error(str) return str end xml.placeholders={ - unknown_dec_entity=function(str) return (str=="" and "&error;") or format("&%s;",str) end, - unknown_hex_entity=function(str) return format("&#x%s;",str) end, - unknown_any_entity=function(str) return format("&#x%s;",str) end, + unknown_dec_entity=function(str) return str=="" and "&error;" or formatters["&%s;"](str) end, + unknown_hex_entity=function(str) return formatters["&#x%s;"](str) end, + unknown_any_entity=function(str) return formatters["&#x%s;"](str) end, } local placeholders=xml.placeholders local function fromhex(s) @@ -8135,7 +8163,7 @@ local function fromhex(s) if n then return utfchar(n) else - return format("h:%s",s),true + return formatters["h:%s"](s),true end end local function fromdec(s) @@ -8143,7 +8171,7 @@ local function fromdec(s) if n then return utfchar(n) else - return format("d:%s",s),true + return formatters["d:%s"](s),true end end local rest=(1-P(";"))^0 @@ -8469,9 +8497,9 @@ local function _xmlconvert_(data,settings) if errorhandler then local currentresource=settings.currentresource if currentresource and currentresource~="" then - xml.errorhandler(format("load error in [%s]: %s",currentresource,errorstr)) + xml.errorhandler(formatters["load error in [%s]: %s"](currentresource,errorstr)) else - xml.errorhandler(format("load error: %s",errorstr)) + xml.errorhandler(formatters["load error: %s"](errorstr)) end end end @@ -8607,7 +8635,7 @@ local function verbose_element(e,handlers) local ats=eat and next(eat) and {} if ats then for k,v in next,eat do - ats[#ats+1]=format('%s=%q',k,escaped(v)) + ats[#ats+1]=formatters['%s=%q'](k,escaped(v)) end end if ern and trace_entities and ern~=ens then @@ -8722,7 +8750,7 @@ local function xserialize(e,handlers) end local handlers={} local function newhandlers(settings) - local t=table.copy(handlers.verbose or {}) + local t=table.copy(handlers[settings and settings.parent or "verbose"] or {}) if settings then for k,v in next,settings do if type(v)=="table" then @@ -8803,7 +8831,7 @@ local xmlstringhandler=newhandlers { local function xmltostring(root) if not root then return "" - elseif type(root)=='string' then + elseif type(root)=="string" then return root else return serialize(root,xmlstringhandler) or "" @@ -8892,7 +8920,7 @@ end function xml.tocdata(e,wrapper) local whatever=type(e)=="table" and xmltostring(e.dt) or e or "" if wrapper then - whatever=format("<%s>%s",wrapper,whatever,wrapper) + whatever=formatters["<%s>%s"](wrapper,whatever,wrapper) end local t={ special=true,ns="",tg="@cd@",at={},rn="",dt={ whatever },__p__=e } setmetatable(t,getmetatable(e)) @@ -11144,6 +11172,99 @@ function finalizers.upperall(collected) end +end -- of closure + +do -- create closure to overcome 200 locals limit + +package.loaded["trac-xml"] = package.loaded["trac-xml"] or true + +-- original size: 3490, stripped down to: 2879 + +if not modules then modules={} end modules ['trac-xml']={ + version=1.001, + comment="companion to trac-log.mkiv", + author="Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright="PRAGMA ADE / ConTeXt Development Team", + license="see context related readme files" +} +local formatters=string.formatters +local reporters=logs.reporters +local xmlserialize=xml.serialize +local xmlcollected=xml.collected +local xmltext=xml.text +local xmlfirst=xml.first +local function showhelp(specification,...) + local root=xml.convert(specification.helpinfo or "") + if not root then + return + end + local xs=xml.gethandlers("string") + xml.sethandlersfunction(xs,"short",function(e,handler) xmlserialize(e.dt,handler) end) + xml.sethandlersfunction(xs,"ref",function(e,handler) handler.handle("--"..e.at.name) end) + local wantedcategories=select("#",...)==0 and true or table.tohash {... } + local nofcategories=xml.count(root,"/application/flags/category") + local report=specification.report + for category in xmlcollected(root,"/application/flags/category") do + local categoryname=category.at.name or "" + if wantedcategories==true or wantedcategories[categoryname] then + if nofcategories>1 then + report("%s options:",categoryname) + report() + end + for subcategory in xmlcollected(category,"/subcategory") do + for flag in xmlcollected(subcategory,"/flag") do + local name=flag.at.name + local value=flag.at.value + local short=xmltext(xmlfirst(flag,"/short")) + if value then + report("--%-24s %s",formatters["%s=%s"](name,value),short) + else + report("--%-24s %s",name,short) + end + end + report() + end + end + end + for category in xmlcollected(root,"/application/examples/category") do + local title=xmltext(xmlfirst(category,"/title")) + if title and title~="" then + report() + report(title) + report() + end + for subcategory in xmlcollected(category,"/subcategory") do + for example in xmlcollected(subcategory,"/example") do + local command=xmltext(xmlfirst(example,"/command")) + local comment=xmltext(xmlfirst(example,"/comment")) + report(command) + end + report() + end + end +end +local reporthelp=reporters.help +local exporthelp=reporters.export +function reporters.help(t,...) + local helpinfo=t.helpinfo + if type(helpinfo)=="string" and string.find(helpinfo,"^<%?xml") then + showhelp(t,...) + else + reporthelp(t,...) + end +end +function reporters.export(t,method,filename) + dofile(resolvers.findfile("trac-exp.lua","tex")) + local exporters=logs.exporters + local result=method and exporters and exporters[method] and exporters[method](t,method) or exporthelp(t) + if type(filename)=="string" and filename~="" then + io.savedata(filename,result) + else + reporters.lines(t,result) + end +end + + end -- of closure do -- create closure to overcome 200 locals limit @@ -15390,10 +15511,10 @@ end end -- of closure --- used libraries : l-lua.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-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.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-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-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 luat-sta.lua luat-fmt.lua +-- used libraries : l-lua.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-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.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-mrg.lua util-tpl.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 luat-sta.lua luat-fmt.lua -- skipped libraries : - --- original bytes : 636443 --- stripped bytes : 230487 +-- original bytes : 640903 +-- stripped bytes : 231417 -- end library merge @@ -15459,6 +15580,8 @@ local ownlibs = { -- order can be made better 'lxml-aux.lua', 'lxml-xml.lua', + 'trac-xml.lua', + 'data-ini.lua', 'data-exp.lua', 'data-env.lua', @@ -15603,59 +15726,85 @@ if not environment.experiments then environment.experiments = e_experiments end local instance = resolvers.reset() local helpinfo = [[ ---script run an mtx script (lua prefered method) (--noquotes), no script gives list ---execute run a script or program (texmfstart method) (--noquotes) ---resolve resolve prefixed arguments ---ctxlua run internally (using preloaded libs) ---internal run script using built in libraries (same as --ctxlua) ---locate locate given filename in database (default) or system (--first --all --detail) - ---autotree use texmf tree cf. env 'texmfstart_tree' or 'texmfstarttree' ---tree=pathtotree use given texmf tree (default file: 'setuptex.tmf') ---environment=name use given (tmf) environment file ---path=runpath go to given path before execution ---ifchanged=filename only execute when given file has changed (md checksum) ---iftouched=old,new only execute when given file has changed (time stamp) - ---makestubs create stubs for (context related) scripts ---removestubs remove stubs (context related) scripts ---stubpath=binpath paths where stubs wil be written ---windows create windows (mswin) stubs ---unix create unix (linux) stubs - ---verbose give a bit more info ---trackers=list enable given trackers ---progname=str format or backend - ---edit launch editor with found file ---launch (--all) launch files like manuals, assumes os support - ---timedrun run a script an time its run ---autogenerate regenerate databases if needed (handy when used to run context in an editor) - ---usekpse use kpse as fallback (when no mkiv and cache installed, often slower) ---forcekpse force using kpse (handy when no mkiv and cache installed but less functionality) - ---prefixes show supported prefixes - ---generate generate file database - ---variables show configuration variables ---configurations show configuration order - ---directives show (known) directives ---trackers show (known) trackers ---experiments show (known) experiments - ---expand-braces expand complex variable ---expand-path expand variable (resolve paths) ---expand-var expand variable (resolve references) ---show-path show path expansion of ... ---var-value report value of variable ---find-file report file location ---find-path report path of file - ---pattern=str filter variables + + + + mtxrun + ConTeXt TDS Runner Tool + 1.31 + + + + + run an mtx script (lua prefered method) (), no script gives list + run a script or program (texmfstart method) () + resolve prefixed arguments + run internally (using preloaded libs) + run script using built in libraries (same as ) + locate given filename in database (default) or system ( ) + + + use texmf tree cf. env texmfstart_tree or texmfstarttree + use given texmf tree (default file: setuptex.tmf) + use given (tmf) environment file + go to given path before execution + only execute when given file has changed (md checksum) + only execute when given file has changed (time stamp) + + + create stubs for (context related) scripts + remove stubs (context related) scripts + paths where stubs wil be written + create windows (mswin) stubs + create unix (linux) stubs + + + give a bit more info + enable given trackers + format or backend + + + launch editor with found file + launch files like manuals, assumes os support () + + + run a script an time its run + regenerate databases if needed (handy when used to run context in an editor) + + + use kpse as fallback (when no mkiv and cache installed, often slower) + force using kpse (handy when no mkiv and cache installed but less functionality) + + + show supported prefixes + + + generate file database + + + show configuration variables + show configuration order + + + show (known) directives + show (known) trackers + show (known) experiments + + + expand complex variable + expand variable (resolve paths) + expand variable (resolve references) + show path expansion of ... + report value of variable + report file location + report path of file + + + filter variables + + + + ]] local application = logs.application { @@ -16617,6 +16766,11 @@ elseif e_argument("experiments") then experiments.show() +elseif e_argument("exporthelp") then + + runners.loadbase() + application.export(e_argument("exporthelp"),filename) + elseif e_argument("help") or filename=='help' or filename == "" then application.help() -- cgit v1.2.3