lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> Is it possible to make the script(s) that process the Lua bug list
> available? I had the thought that it would be a good test for
> performance related changes to Lua, as it demonstrates the scenario of
> a large data script.

Here it is. Unless we change the HTMLlayout, this script is never used
to process the whole bug file, but it could. Try it.

-- create "bugs" page from database

local write=io.write

local M={
 ["01"]="Jan",["02"]="Feb",["03"]="Mar",["04"]="Apr",["05"]="May",["06"]="Jun",
 ["07"]="Jul",["08"]="Aug",["09"]="Sep",["10"]="Oct",["11"]="Nov",["12"]="Dec",
}

function Bug(a)
 write'<A HREF="#5.3.3-X">X</A> &middot;\n'
 write'<LI>\n'
 write'<A NAME="5.3.3-X"></A>'
 write(a.what,'.\n')
 if a.report then
  a.report=string.gsub(a.report,", (%d+)/(%d+)/(%d+)",
	function (y,m,d) return " on "..d.." "..M[m].." "..y end)
  write('<BR><SPAN CLASS="note">reported by ',a.report,'.')
 end
 if a.since then
  write('\nexisted since ',a.since,'.')
 end
 if a.fix then
  write('\nfixed in ',a.fix,'.')
 end
 write('</SPAN>\n')
 if a.example then
  write('<P>Example:<PRE CLASS="example">\n',a.example,'\n</PRE>\n')
 end
 if a.patch then
  write('<P>Patch:<PRE CLASS="patch">\n',a.patch,'\n</PRE>\n')
 else
  write('<P>Patch: no patch yet\n')
 end
 write('\n')
 --write'<P><HR CLASS="separator"><P>\n\n'
end

dofile("db.lua")