On Tue, May 3, 2011 at 12:04 PM, steve donovan
<[email protected]> wrote:
> etc it would sometimes be very convenient if a Lua application could
> query LuaRocks directly.  Then it would be straightforward to build
> custom tools to manage LR directly.

Here's a first draft of such an API:

https://github.com/stevedonovan/LuaRocksTools/tree/master/api

There are some kiddie examples and a readme, and the module itself is
luarocks/api.lua.

Basically wraps up what you can get from the 'list', 'search' and
'show' commands, nothing too clever.

E.g. the output of luarocks.api.show() is a table which looks like this:

{
  description = [[
      LuaFileSystem is a Lua library developed to complement the set of
      functions related to file systems offered by the standard Lua
      distribution. LuaFileSystem offers a portable way to access the
      underlying directory structure and file attributes.
   ]],
  build_type = "module",
  repo = "C:\\LuaRocks",
  modules = {
    "lfs"
  },
  version = "1.5.0-2",
  homepage = "http://www.keplerproject.org/luafilesystem/";,
  dependencies = {
  },
  license = "MIT",
  summary = "File System Library for the Lua Programming Language",
  rock_dir = "C:\\LuaRocks/lib/luarocks/rocks/luafilesystem/1.5.0-2"
}

steve d.

_______________________________________________
Luarocks-developers mailing list
[email protected]
http://lists.luaforge.net/cgi-bin/mailman/listinfo/luarocks-developers

Reply via email to