if not modules then modules = { } end modules ['mtx-mk-help'] = { version = 1.001, comment = "a script for making help files", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files" } --[[ mtxrun --exporthelp=all %targetpath%\mkiv\mtxrun.tmp context --exporthelp=all %targetpath%\mkiv\context.tmp mtxrun --script context --exporthelp=all %targetpath%\mkiv\mtx-context.tmp mtxrun --script babel --exporthelp=all %targetpath%\mkiv\mtx-babel.tmp mtxrun --script base --exporthelp=all %targetpath%\mkiv\mtx-base.tmp mtxrun --script cache --exporthelp=all %targetpath%\mkiv\mtx-cache.tmp mtxrun --script chars --exporthelp=all %targetpath%\mkiv\mtx-chars.tmp mtxrun --script check --exporthelp=all %targetpath%\mkiv\mtx-check.tmp mtxrun --script colors --exporthelp=all %targetpath%\mkiv\mtx-colors.tmp mtxrun --script convert --exporthelp=all %targetpath%\mkiv\mtx-convert.tmp mtxrun --script epub --exporthelp=all %targetpath%\mkiv\mtx-epub.tmp mtxrun --script fcd --exporthelp=all %targetpath%\mkiv\mtx-fcd.tmp mtxrun --script flac --exporthelp=all %targetpath%\mkiv\mtx-flac.tmp mtxrun --script fonts --exporthelp=all %targetpath%\mkiv\mtx-fonts.tmp mtxrun --script grep --exporthelp=all %targetpath%\mkiv\mtx-grep.tmp mtxrun --script interface --exporthelp=all %targetpath%\mkiv\mtx-interface.tmp mtxrun --script metapost --exporthelp=all %targetpath%\mkiv\mtx-metapost.tmp mtxrun --script metatex --exporthelp=all %targetpath%\mkiv\mtx-metatex.tmp mtxrun --script modules --exporthelp=all %targetpath%\mkiv\mtx-modules.tmp mtxrun --script mtxworks --exporthelp=all %targetpath%\mkiv\mtx-mtxworks.tmp mtxrun --script package --exporthelp=all %targetpath%\mkiv\mtx-package.tmp mtxrun --script patterns --exporthelp=all %targetpath%\mkiv\mtx-patterns.tmp mtxrun --script pdf --exporthelp=all %targetpath%\mkiv\mtx-pdf.tmp mtxrun --script profile --exporthelp=all %targetpath%\mkiv\mtx-profile.tmp mtxrun --script rsync --exporthelp=all %targetpath%\mkiv\mtx-rsync.tmp mtxrun --script scite --exporthelp=all %targetpath%\mkiv\mtx-scite.tmp mtxrun --script server --exporthelp=all %targetpath%\mkiv\mtx-server.tmp mtxrun --script texworks --exporthelp=all %targetpath%\mkiv\mtx-texworks.tmp mtxrun --script timing --exporthelp=all %targetpath%\mkiv\mtx-timing.tmp mtxrun --script tools --exporthelp=all %targetpath%\mkiv\mtx-tools.tmp mtxrun --script unzip --exporthelp=all %targetpath%\mkiv\mtx-unzip.tmp mtxrun --script update --exporthelp=all %targetpath%\mkiv\mtx-update.tmp mtxrun --script watch --exporthelp=all %targetpath%\mkiv\mtx-watch.tmp mtxrun --script mk-help luatools --exporthelp=all %targetpath%\mkiv\luatools.tmp mtxrun --script mk-help texmfstart --exporthelp=all %targetpath%\mkii\texmfstart.tmp mtxrun --script mk-help texexec --exporthelp=all %targetpath%\mkii\texexec.tmp mtxrun --script mk-help texutil --exporthelp=all %targetpath%\mkii\texutil.tmp mtxrun --script mk-help ctxtools --exporthelp=all %targetpath%\mkii\ctxtools.tmp mtxrun --script mk-help textools --exporthelp=all %targetpath%\mkii\textools.tmp mtxrun --script mk-help pdftools --exporthelp=all %targetpath%\mkii\pdftools.tmp mtxrun --script mk-help tmftools --exporthelp=all %targetpath%\mkii\tmftools.tmp mtxrun --script mk-help xmltools --exporthelp=all %targetpath%\mkii\xmltools.tmp mtxrun --script mk-help pstopdf --exporthelp=all %targetpath%\mkii\pstopdf.tmp mtxrun --script mk-help rlxtools --exporthelp=all %targetpath%\mkii\rlxtools.tmp mtxrun --script mk-help imgtopdf --exporthelp=all %targetpath%\mkii\imgtopdf.tmp ]]-- local helpinfo = os.resultof("mtxrun --exporthelp") or "" local helpinfo = string.match(helpinfo,[[^.-(.-)]]) or [[]] local texmfstart = logs.application { name = "texmfstart", banner = "texmfstart 7.0.0", helpinfo = [[]] .. helpinfo, } -- let's also put luatools here: local helpinfo = os.resultof("luatools --exporthelp") or "" local helpinfo = string.match(helpinfo,[[^.-(.-)]]) or [[]] local helpinfo = string.gsub(helpinfo,"mtx%-base","luatools") local luatools = logs.application { name = "luatools", banner = "luatools 1.35", helpinfo = [[]] .. helpinfo, } -- 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, } local helpinfo = [[ mptopdf convert MetaPost figures to PDF 1.4.1 use the metafun format to process the file (default is mpost) use texexec (context) to process text snippets use latex to process text snippets ]] local mptopdf = logs.application { name = "mptopdf", banner = "MPtoPDF 1.4.1", 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 = "mk-help", banner = "Mk Help generator 1.00", } local filename = environment.files[1] if not filename then application.report("no mk script given") return end local mkapplication if filename == "texmfstart" then mkapplication = texmfstart elseif filename == "luatools" then mkapplication = luatools elseif filename == "texexec" then mkapplication = texexec elseif filename == "texutil" then mkapplication = texutil elseif filename == "ctxtools" then mkapplication = ctxtools elseif filename == "textools" then mkapplication = textools elseif filename == "pdftools" then mkapplication = pdftools elseif filename == "tmftools" then mkapplication = tmftools elseif filename == "xmltools" then mkapplication = xmltools elseif filename == "pstopdf" then mkapplication = pstopdf elseif filename == "rlxtools" then mkapplication = rlxtools elseif filename == "imgtopdf" then mkapplication = imgtopdf elseif filename == "mptopdf" then mkapplication = mptopdf end if not mkapplication then application.report("no valid mk script given") return end if environment.argument("exporthelp") then mkapplication.export(environment.argument("exporthelp"),environment.files[2]) else mkapplication.help() end