From c10f5dbdbb8091c3ab40f1112a5e49b55165b07f Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Fri, 29 Mar 2013 00:44:00 +0100 Subject: beta 2013.03.29 00:44 --- scripts/context/lua/mtx-base.lua | 4 +- scripts/context/lua/mtx-mkii-help.lua | 376 ------------------------------- scripts/context/lua/mtxrun.lua | 47 ++-- scripts/context/stubs/mswin/ctxtools.exe | Bin 0 -> 6144 bytes scripts/context/stubs/mswin/mtxrun.lua | 47 ++-- scripts/context/stubs/mswin/pstopdf.exe | Bin 0 -> 6144 bytes scripts/context/stubs/unix/ctxtools | 2 + scripts/context/stubs/unix/mtxrun | 47 ++-- scripts/context/stubs/unix/pstopdf | 2 + 9 files changed, 90 insertions(+), 435 deletions(-) delete mode 100644 scripts/context/lua/mtx-mkii-help.lua create mode 100755 scripts/context/stubs/mswin/ctxtools.exe create mode 100755 scripts/context/stubs/mswin/pstopdf.exe create mode 100755 scripts/context/stubs/unix/ctxtools create mode 100755 scripts/context/stubs/unix/pstopdf (limited to 'scripts') diff --git a/scripts/context/lua/mtx-base.lua b/scripts/context/lua/mtx-base.lua index e8bf991f4..bd6749717 100644 --- a/scripts/context/lua/mtx-base.lua +++ b/scripts/context/lua/mtx-base.lua @@ -27,8 +27,8 @@ local helpinfo = [[ report value of variable report file location report path of file - [or make luatex format - [or run luatex format + [or ] make luatex format + [or ] run luatex format assemble and compile lua inifile give a bit more info show all found files diff --git a/scripts/context/lua/mtx-mkii-help.lua b/scripts/context/lua/mtx-mkii-help.lua deleted file mode 100644 index e43f47bf0..000000000 --- a/scripts/context/lua/mtx-mkii-help.lua +++ /dev/null @@ -1,376 +0,0 @@ -local helpinfo = [[ - - - - texexec - TeXExec - 6.2.1 - - - - - make formats - check versions - process file - process mp file - process mpx file - process mp file to stand-alone graphics - process mp/ctx file to stand-alone graphics - list of file content - generate overview of figures - generate module documentation - impose pages (booklets) - select pages from file(s) - copy pages from file(s) - trim pages from file(s) - combine multiple pages - split file in pages - - - - - - -]] - - -local texexec = logs.application { - name = "texexec", - banner = "TeXExec 6.2.1", - helpinfo = helpinfo, -} - -local helpinfo = [[ - - - - texutil - TeXUtil - 9.1.0 - - - - - convert tui file into tuo file - generate figure dimensions file - filter essential log messages - remove most temporary files - remove all temporary files - generate documentation file from source - analyze pdf file - - - - - -]] - -local texutil = logs.application { - name = "texutil", - banner = "TeXUtil 9.1.0", - helpinfo = helpinfo, -} - -local helpinfo = [[ - - - - ctxtools - CtxTools - 1.3.5 - - - - - update context version - report context version - generate jedit syntax files [ - generate bbedit syntax files [ - generate scite syntax files [ - generate raw syntax files [ - generate interface files (xml) [nl de ..] - remove temporary files [ [basename] - [filename] - ) # no help, hidden temporary feature - convert pdftex mapfiles to dvipdfmx [ [texmfroot] - create doctype entity definition from enco-uc.tex - add context copyright notice [ - replace line-endings [ [pattern] - [filename] - download latest version and remake formats [ - remove utf bom [ - - - - - - -]] - -local ctxtools = logs.application { - name = "ctxtools", - banner = "CtxTools 1.3.5", - helpinfo = helpinfo, -} - -local helpinfo = [[ - - - - textools - TeXTools - 1.3.1 - - - - - [pattern] [ - [pattern] [ - [pattern] [ - [pattern] [ - filename [ - [pattern] [ - [pattern] [ - [pattern] [ - [texmfroot] [ - filename [ - fromroot toroot [ - [ [ - [ [ - filename - afmfile encodingname - tpm file (run in texmf root) - - - - - - -]] - -local textools = logs.application { - name = "textools", - banner = "TeXTools 1.3.1", - helpinfo = helpinfo, -} - -local helpinfo = [[ - - - - pdftools - PDFTools - 1.2.1 - - - - - [ - [ ] - filename [ - filename [ - filename - [ - [ - filename - - - - - - -]] - -local pdftools = logs.application { - name = "pdftools", - banner = "PDFTools 1.2.1", - helpinfo = helpinfo, -} - -local helpinfo = [[ - - - - tmftools - TMFTools - 1.1.0 - - - - - [ ] [pattern] - - - act as kpse server - - - - -]] - -local tmftools = logs.application { - name = "tmftools", - banner = "TMFTools 1.2.1", - helpinfo = helpinfo, -} - -local helpinfo = [[ - - - - xmltools - XMLTools - 1.2.2 - - - - - generate directory listing - generate graphic from mathml - report entities and elements [ ] - cleanup xml file [] - enhance xml file (partial) - filter elements from xml file [] - generate ddirectory listing - - - - -]] - -local xmltools = logs.application { - name = "xmltools", - banner = "XMLTools 1.2.1", - helpinfo = helpinfo, -} - -local helpinfo = [[ - - - - pstopdf - PStoPDF - 2.0.1 - - - - - handles exa request file - watch folders for conversions (untested) - - - - - - -]] - -local pstopdf = logs.application { - name = "pstopdf", - banner = "PStoPDF 2.0.1", - helpinfo = helpinfo, -} - -local helpinfo = [[ - - - - rlxtools - RlxTools - 1.0.1 - - - - - [ manipulatorfile resourselog - [ filename - - - - - - -]] - -local rlxtools = logs.application { - name = "rlxtools", - banner = "RlxTools 1.0.1", - helpinfo = helpinfo, -} - -local helpinfo = [[ - - - - imgtopdf - ImgToPdf - 1.1.2 - - - - - convert image into pdf - level of compression in percent - image depth in bits - colorspace (rgb,cmyk,gray) - quality in percent - path where files are looked for - path where files end up - determine settings automatically - - - - -]] - -local imgtopdf = logs.application { - name = "imgtopdf", - banner = "ImgToPdf 1.1.2", - helpinfo = helpinfo, -} - --- texmfstart.rb is normally replaced by mtxrun --- runtools.rb is run from within context --- concheck.rb is run from within editors --- texsync.rb is no longer in the zip --- mpstools.rb is no longer in the zip --- rscortool.rb is only run indirectly --- rsfiltool.rb is only run indirectly --- rslibtool.rb is only run indirectly - - -local application = logs.application { - name = "mkii-help", - banner = "MkII Help generator 1.00", -} - -local filename = environment.files[1] - -if not filename then - application.report("no mkii script given") - return -end - -local mkiiapplication - -if filename == "texexec" then mkiiapplication = texexec -elseif filename == "texutil" then mkiiapplication = texutil -elseif filename == "ctxtools" then mkiiapplication = ctxtools -elseif filename == "textools" then mkiiapplication = textools -elseif filename == "pdftools" then mkiiapplication = pdftools -elseif filename == "tmftools" then mkiiapplication = tmftools -elseif filename == "xmltools" then mkiiapplication = xmltools -elseif filename == "pstopdf" then mkiiapplication = pstopdf -elseif filename == "rlxtools" then mkiiapplication = rlxtools -elseif filename == "imgtopdf" then mkiiapplication = imgtopdf end - -if not mkiiapplication then - application.report("no valid mkii script given") - return -end - -if environment.argument("exporthelp") then - mkiiapplication.export(environment.argument("exporthelp"),environment.files[2]) -else - mkiiapplication.help() -end diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua index 49c43be78..22089df7a 100644 --- a/scripts/context/lua/mtxrun.lua +++ b/scripts/context/lua/mtxrun.lua @@ -11211,7 +11211,7 @@ do -- create closure to overcome 200 locals limit package.loaded["trac-xml"] = package.loaded["trac-xml"] or true --- original size: 5962, stripped down to: 4596 +-- original size: 6351, stripped down to: 4919 if not modules then modules={} end modules ['trac-xml']={ version=1.001, @@ -11324,25 +11324,27 @@ function reporters.help(t,...) reporthelp(t,...) end end -function reporters.export(t,method,filename) +function reporters.export(t,methods,filename) if not xmlfound(t) then return exporthelp(t) end - if not method or method=="" then - method=environment.arguments["exporthelp"] + if not methods or methods=="" then + methods=environment.arguments["exporthelp"] end if not filename or filename=="" then filename=environment.files[1] end dofile(resolvers.findfile("trac-exp.lua","tex")) local exporters=logs.exporters - if not exporters or not method then + if not exporters or not methods then return exporthelp(t) end - if method=="all" then - method=table.keys(exporters) + if methods=="all" then + methods=table.keys(exporters) + elseif type(methods)=="string" then + methods=utilities.parsers.settings_to_array(methods) else - method={ method } + return exporthelp(t) end if type(filename)~="string" or filename=="" then filename=false @@ -11350,17 +11352,24 @@ function reporters.export(t,method,filename) t.report("export file %a will not be saved on the current path (safeguard)",filename) return end - for i=1,#method do - local m=method[i] - local result=exporters[m](t,m) - if result and result~="" then - if filename then - local fullname=file.replacesuffix(filename,m) - t.report("saving export in %a",fullname) - io.savedata(fullname,result) + for i=1,#methods do + local method=methods[i] + local exporter=exporters[method] + if exporter then + local result=exporter(t,method) + if result and result~="" then + if filename then + local fullname=file.replacesuffix(filename,method) + t.report("saving export in %a",fullname) + io.savedata(fullname,result) + else + reporters.lines(t,result) + end else - reporters.lines(t,result) + t.report("no output from exporter %a",method) end + else + t.report("unknown exporter %a",method) end end end @@ -15614,8 +15623,8 @@ 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 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 : 644433 --- stripped bytes : 232542 +-- original bytes : 644822 +-- stripped bytes : 232608 -- end library merge diff --git a/scripts/context/stubs/mswin/ctxtools.exe b/scripts/context/stubs/mswin/ctxtools.exe new file mode 100755 index 000000000..2d45f2749 Binary files /dev/null and b/scripts/context/stubs/mswin/ctxtools.exe differ diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua index 49c43be78..22089df7a 100644 --- a/scripts/context/stubs/mswin/mtxrun.lua +++ b/scripts/context/stubs/mswin/mtxrun.lua @@ -11211,7 +11211,7 @@ do -- create closure to overcome 200 locals limit package.loaded["trac-xml"] = package.loaded["trac-xml"] or true --- original size: 5962, stripped down to: 4596 +-- original size: 6351, stripped down to: 4919 if not modules then modules={} end modules ['trac-xml']={ version=1.001, @@ -11324,25 +11324,27 @@ function reporters.help(t,...) reporthelp(t,...) end end -function reporters.export(t,method,filename) +function reporters.export(t,methods,filename) if not xmlfound(t) then return exporthelp(t) end - if not method or method=="" then - method=environment.arguments["exporthelp"] + if not methods or methods=="" then + methods=environment.arguments["exporthelp"] end if not filename or filename=="" then filename=environment.files[1] end dofile(resolvers.findfile("trac-exp.lua","tex")) local exporters=logs.exporters - if not exporters or not method then + if not exporters or not methods then return exporthelp(t) end - if method=="all" then - method=table.keys(exporters) + if methods=="all" then + methods=table.keys(exporters) + elseif type(methods)=="string" then + methods=utilities.parsers.settings_to_array(methods) else - method={ method } + return exporthelp(t) end if type(filename)~="string" or filename=="" then filename=false @@ -11350,17 +11352,24 @@ function reporters.export(t,method,filename) t.report("export file %a will not be saved on the current path (safeguard)",filename) return end - for i=1,#method do - local m=method[i] - local result=exporters[m](t,m) - if result and result~="" then - if filename then - local fullname=file.replacesuffix(filename,m) - t.report("saving export in %a",fullname) - io.savedata(fullname,result) + for i=1,#methods do + local method=methods[i] + local exporter=exporters[method] + if exporter then + local result=exporter(t,method) + if result and result~="" then + if filename then + local fullname=file.replacesuffix(filename,method) + t.report("saving export in %a",fullname) + io.savedata(fullname,result) + else + reporters.lines(t,result) + end else - reporters.lines(t,result) + t.report("no output from exporter %a",method) end + else + t.report("unknown exporter %a",method) end end end @@ -15614,8 +15623,8 @@ 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 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 : 644433 --- stripped bytes : 232542 +-- original bytes : 644822 +-- stripped bytes : 232608 -- end library merge diff --git a/scripts/context/stubs/mswin/pstopdf.exe b/scripts/context/stubs/mswin/pstopdf.exe new file mode 100755 index 000000000..2d45f2749 Binary files /dev/null and b/scripts/context/stubs/mswin/pstopdf.exe differ diff --git a/scripts/context/stubs/unix/ctxtools b/scripts/context/stubs/unix/ctxtools new file mode 100755 index 000000000..2e6bd4afa --- /dev/null +++ b/scripts/context/stubs/unix/ctxtools @@ -0,0 +1,2 @@ +#!/bin/sh +mtxrun --script ctxtools "$@" diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun index 49c43be78..22089df7a 100755 --- a/scripts/context/stubs/unix/mtxrun +++ b/scripts/context/stubs/unix/mtxrun @@ -11211,7 +11211,7 @@ do -- create closure to overcome 200 locals limit package.loaded["trac-xml"] = package.loaded["trac-xml"] or true --- original size: 5962, stripped down to: 4596 +-- original size: 6351, stripped down to: 4919 if not modules then modules={} end modules ['trac-xml']={ version=1.001, @@ -11324,25 +11324,27 @@ function reporters.help(t,...) reporthelp(t,...) end end -function reporters.export(t,method,filename) +function reporters.export(t,methods,filename) if not xmlfound(t) then return exporthelp(t) end - if not method or method=="" then - method=environment.arguments["exporthelp"] + if not methods or methods=="" then + methods=environment.arguments["exporthelp"] end if not filename or filename=="" then filename=environment.files[1] end dofile(resolvers.findfile("trac-exp.lua","tex")) local exporters=logs.exporters - if not exporters or not method then + if not exporters or not methods then return exporthelp(t) end - if method=="all" then - method=table.keys(exporters) + if methods=="all" then + methods=table.keys(exporters) + elseif type(methods)=="string" then + methods=utilities.parsers.settings_to_array(methods) else - method={ method } + return exporthelp(t) end if type(filename)~="string" or filename=="" then filename=false @@ -11350,17 +11352,24 @@ function reporters.export(t,method,filename) t.report("export file %a will not be saved on the current path (safeguard)",filename) return end - for i=1,#method do - local m=method[i] - local result=exporters[m](t,m) - if result and result~="" then - if filename then - local fullname=file.replacesuffix(filename,m) - t.report("saving export in %a",fullname) - io.savedata(fullname,result) + for i=1,#methods do + local method=methods[i] + local exporter=exporters[method] + if exporter then + local result=exporter(t,method) + if result and result~="" then + if filename then + local fullname=file.replacesuffix(filename,method) + t.report("saving export in %a",fullname) + io.savedata(fullname,result) + else + reporters.lines(t,result) + end else - reporters.lines(t,result) + t.report("no output from exporter %a",method) end + else + t.report("unknown exporter %a",method) end end end @@ -15614,8 +15623,8 @@ 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 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 : 644433 --- stripped bytes : 232542 +-- original bytes : 644822 +-- stripped bytes : 232608 -- end library merge diff --git a/scripts/context/stubs/unix/pstopdf b/scripts/context/stubs/unix/pstopdf new file mode 100755 index 000000000..116f5f4a3 --- /dev/null +++ b/scripts/context/stubs/unix/pstopdf @@ -0,0 +1,2 @@ +#!/bin/sh +mtxrun --script pstopdf "$@" -- cgit v1.2.3