Almost there.
This commit is contained in:
parent
84f03fda7c
commit
6c565dd7c0
11 changed files with 20 additions and 14 deletions
|
@ -5,7 +5,6 @@
|
|||
-- RCS ID: $Id$
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
require"luasocket"
|
||||
require"http"
|
||||
|
||||
socket.http.TIMEOUT = 10
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
require"mime.lua"
|
||||
require"ltn12.lua"
|
||||
|
||||
local marker = '\n'
|
||||
if arg and arg[1] == '-d' then marker = '\r\n' end
|
||||
local filter = mime.normalize(marker)
|
||||
local source = ltn12.source.chain(ltn12.source.file(io.stdin), filter)
|
||||
local sink = ltn12.sink.file(io.stdout)
|
||||
ltn12.pump(source, sink)
|
||||
ltn12.pump.all(source, sink)
|
||||
|
|
|
@ -4,6 +4,10 @@
|
|||
-- Author: Diego Nehab
|
||||
-- RCS ID: $Id$
|
||||
-----------------------------------------------------------------------------
|
||||
require"http"
|
||||
require"ftp"
|
||||
require"url"
|
||||
|
||||
-- formats a number of seconds into human readable form
|
||||
function nicetime(s)
|
||||
local l = "s"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue