diff options
-rw-r--r-- | etc/README | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/etc/README b/etc/README new file mode 100644 index 0000000..34b7074 --- /dev/null +++ b/etc/README | |||
@@ -0,0 +1,58 @@ | |||
1 | This directory contains code that is more useful than the examples. This code | ||
2 | *is* supported. | ||
3 | |||
4 | lua.lua and luasocket.lua | ||
5 | |||
6 | These are modules to suport dynamic loading of LuaSocket by the stand alone | ||
7 | Lua Interpreter with the use of the "require" function. For my Mac OS X | ||
8 | system, I place lua.lua in /usr/local/lua, luasocket.lua and the | ||
9 | libluasocket.dylib in /usr/local/lua/luasocket and set the following | ||
10 | environment variables: | ||
11 | |||
12 | LUA_PATH=/usr/local/lua/?/?.lua | ||
13 | LUA_INIT=@/usr/local/lua/lua.lua | ||
14 | LUA_FUNCNAME=_? | ||
15 | LUA_LIBNAME=/usr/local/lua/?/lib?.dylib | ||
16 | |||
17 | With that, I can run any luasocket application with the command line: | ||
18 | |||
19 | lua -l luasocket <script> | ||
20 | |||
21 | Much nicer than having to build a new executable just to initialize | ||
22 | LuaSocket! | ||
23 | |||
24 | |||
25 | tftp.lua -- Trivial FTP client | ||
26 | |||
27 | This module implements file retrieval by the TFTP protocol. Its main use | ||
28 | is to test the UDP code, but someone might find it usefull. | ||
29 | |||
30 | get.lua -- file retriever | ||
31 | |||
32 | This little program is a client that uses the FTP and HTTP code to | ||
33 | implement a command line file graber. Just run | ||
34 | |||
35 | lua -l luasocket get.lua <remote-file> [<local-file>] | ||
36 | |||
37 | to download a remote file (either ftp:// or http://) to the specified | ||
38 | local file. The program also prints the download throughput, elapsed | ||
39 | time, bytes already downloaded etc during download. | ||
40 | |||
41 | check-links.lua -- HTML link checker program | ||
42 | |||
43 | This little program scans a HTML file and checks for broken links. It is | ||
44 | similar to check-links.pl by Jamie Zawinski, but uses all facilities of | ||
45 | the LuaSocket library and the Lua language. It has not been thoroughly | ||
46 | tested, but it should work. Just run | ||
47 | |||
48 | lua -l luasocket check-links.lua {<url>} > output | ||
49 | |||
50 | and open the result to see a list of broken links. | ||
51 | |||
52 | cl-compat.lua | ||
53 | |||
54 | This module implements an old (and higher level) interface to SMTP provided | ||
55 | by the CGILUA toolkit. It runs on top of the LuaSocket SMTP interface. | ||
56 | |||
57 | Good luck, | ||
58 | Diego. | ||