Originally Posted by Napoleon
BTW, when you say it can do network stuff, what do you mean exactly?
I've been thinking about writing something in python to parse a pdf's doi (for scientific articles) and automagically download the corresponding reference in bibtex format in order to have a well organized paper database and also to create the manifest file accordingly (title, author, journal & year). Do you think it is possible with this release of lua?.
The basic network module has all the basic network functions for tcp/udp: you can connect to hosts on the internet and talk to them. The higher level functions allow you to download files over http or ftp in a few lines of code. There are also helpers to manage MIME, URLS, etc. The docs are here: http://www.tecgraf.puc-rio.br/~diego...roduction.html
Here is how you would fetch a page:
local http = require("socket.http")
b, c = http.request("http://www.google.com/search?q=lua+iliad")
file = io.open('/tmp/page.html', 'wb')
file:write(b) -- b is the content
print('status= ', c) -- 200=ok, 404=not found...
I do not know what 'pdf's doi' means... Lua has less libraries than perl or python, but it has all the basic stuff. Handling text (regexp and all the expected string functions are there). I've had no problems with the xml parser to read the Iliad registry...