aboutsummaryrefslogtreecommitdiff
path: root/etc/README
diff options
context:
space:
mode:
Diffstat (limited to 'etc/README')
-rw-r--r--etc/README30
1 files changed, 19 insertions, 11 deletions
diff --git a/etc/README b/etc/README
index eacb262..d650843 100644
--- a/etc/README
+++ b/etc/README
@@ -4,34 +4,42 @@ This directory contains code that is more useful than the examples. This code
4 lua.lua 4 lua.lua
5 5
6These are modules to suport dynamic loading of LuaSocket by the stand alone 6These are modules to suport dynamic loading of LuaSocket by the stand alone
7Lua Interpreter with the use of the "require" function. For my Mac OS X 7Lua Interpreter with the use of new "require" and "requirelib" functions.
8system, I place all files in /Users/diego/tec/luasocket 8For my Mac OS X box, for instance, I place all files in
9and set the following environment variables: 9/Users/diego/tec/luasocket and set the following environment variables:
10 10
11 LUA_PATH=/Users/diego/tec/luasocket/?.lua
12 LUA_INIT=@/Users/diego/tec/luasocket/lua.lua 11 LUA_INIT=@/Users/diego/tec/luasocket/lua.lua
13 LUA_FUNCNAME=? 12 LUA_PATH=/Users/diego/tec/luasocket/?.lua;?.lua
14 LUA_LIBNAME=/Users/diego/tec/luasocket/?.dylib 13 LUA_PATHLIB=/Users/diego/tec/luasocket/?.dylib;?.dylib
15 14
16With that, I can run any luasocket application with the command line: 15With that, I can run any luasocket application with the command line:
17 16
18 lua -l socket <script> 17 lua <script>
19 18
19as long as the script uses "require" to load the needed namespaces.
20Much nicer than having to build a new executable just to initialize 20Much nicer than having to build a new executable just to initialize
21LuaSocket! 21LuaSocket!
22 22
23
24 tftp.lua -- Trivial FTP client 23 tftp.lua -- Trivial FTP client
25 24
26This module implements file retrieval by the TFTP protocol. Its main use 25This module implements file retrieval by the TFTP protocol. Its main use
27is to test the UDP code, but someone might find it usefull. 26was to test the UDP code, but since someone found it usefull, I turned it
27into a module that is almost official (no uploads, yet).
28
29 dict.lua -- Dict client
30
31The dict.lua module started with a cool simple client for the DICT
32protocol, written by Luiz Henrique Figueiredo. This new version has been
33converted into a library, similar to the HTTP and FTP libraries, that can
34be used from within any luasocket application. Take a look on the source
35code and you will be able to figure out how to use it.
28 36
29 get.lua -- file retriever 37 get.lua -- file retriever
30 38
31This little program is a client that uses the FTP and HTTP code to 39This little program is a client that uses the FTP and HTTP code to
32implement a command line file graber. Just run 40implement a command line file graber. Just run
33 41
34 lua -l socket get.lua <remote-file> [<local-file>] 42 lua get.lua <remote-file> [<local-file>]
35 43
36to download a remote file (either ftp:// or http://) to the specified 44to download a remote file (either ftp:// or http://) to the specified
37local file. The program also prints the download throughput, elapsed 45local file. The program also prints the download throughput, elapsed
@@ -44,7 +52,7 @@ similar to check-links.pl by Jamie Zawinski, but uses all facilities of
44the LuaSocket library and the Lua language. It has not been thoroughly 52the LuaSocket library and the Lua language. It has not been thoroughly
45tested, but it should work. Just run 53tested, but it should work. Just run
46 54
47 lua -l socket check-links.lua {<url>} > output 55 lua check-links.lua {<url>} > output
48 56
49and open the result to see a list of broken links. 57and open the result to see a list of broken links.
50 58