1if not modules then modules = { } end modules ['mtx-server-ctx-startup'] = { 2 version = 1.001, 3 comment = "Overview Of Goodies", 4 author = "Hans Hagen", 5 copyright = "PRAGMA ADE / ConTeXt Development Team", 6 license = "see context related readme files" 7} 8 9dofile(resolvers.findfile("trac-lmx.lua","tex")) 10 11function doit(configuration,filename,hashed) 12 13 local list = { } 14 local root = file.dirname(resolvers.findfile("mtx-server.lua") or ".") 15 if root == "" then root = "." end 16 local pattern = root .. "/mtx-server-ctx-*.lua" 17 local files = dir.glob(pattern) 18 for i=1,#files do 19 local filename = file.basename(files[i]) 20 local name = string.match(filename,"mtx%-server%-ctx%-(.-)%.lua$") 21 if name and name ~= "startup" then 22 list[#list+1] = string.format("<a href='%s' target='ctx-%s'>%s</a><br/><br/>",filename,name,name) 23 end 24 end 25 26 local variables = { 27 ['color-background-one'] = lmx.get('color-background-green'), 28 ['color-background-two'] = lmx.get('color-background-blue'), 29 ['title'] = "Overview Of Goodies", 30 ['color-background-one'] = lmx.get('color-background-green'), 31 ['color-background-two'] = lmx.get('color-background-blue'), 32 ['maintext'] = table.concat(list,"\n"), 33 } 34 35 return { content = lmx.convert('context-base.lmx',false,variables) } 36 37end 38 39return doit, true 40 |