Worked on the manual.
Implemented stuffing (needs test) Added cddb and qp examples.
This commit is contained in:
parent
f67864f86c
commit
0b2542d1a6
37 changed files with 649 additions and 332 deletions
18
etc/qp.lua
Normal file
18
etc/qp.lua
Normal file
|
@ -0,0 +1,18 @@
|
|||
local convert
|
||||
arg = arg or {}
|
||||
local mode = arg and arg[1] or "-et"
|
||||
if mode == "-et" then
|
||||
local canonic = socket.mime.canonic()
|
||||
local qp = socket.mime.encode("quoted-printable")
|
||||
local wrap = socket.mime.wrap("quoted-printable")
|
||||
convert = socket.mime.chain(canonic, qp, wrap)
|
||||
elseif mode == "-eb" then
|
||||
local qp = socket.mime.encode("quoted-printable", "binary")
|
||||
local wrap = socket.mime.wrap("quoted-printable")
|
||||
convert = socket.mime.chain(qp, wrap)
|
||||
else convert = socket.mime.decode("quoted-printable") end
|
||||
while 1 do
|
||||
local chunk = io.read(4096)
|
||||
io.write(convert(chunk))
|
||||
if not chunk then break end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue