lua-users home
lua-l archive

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



> Sputnik (a wiki written in Lua) has a bugtracker addon.
hm... i'll take a look at it (addon). tnx.

You can see it in action at http://sputnik.freewisdom.org/en/Tickets

Note one non-obvious feature: you can ask for "http://sputnik.freewisdom.org/en/Ticket:000027.raw", then run it as Lua in a sandbox, take the environment with getfenv, then access the fields you want:

    ticket_as_lua = socket.http.request("http://sputnik.freewisdom.org/en/Ticket:000027.raw")
    ticket_f = loadstring(ticket_as_lua)
    setfenv(ticket_f, {})
    ticket_f()
    ticket = getfenv(ticket_f)
    print(ticket.priority)

This should print "high"
   
At the moment you can't get the list of tickets remotely (except by filtering http://sputnik.freewisdom.org/en/_sitemap.xml), but I am planning to extend Tickets to make it possible to get a list of tickets either as a plain text or as a lua table.  (This shouldn't take more than a dozen lines of code.)

 - yuri

--
http://sputnik.freewisdom.org/