ADD: html_dumplib.lua, added the functionality to save text-files.

ADD: tnp3.lua, now will save the dumped data to BIN and EML
FIX: tnp3.lua, added some clearcommando buffer to help the pm3 not to be blocked
This commit is contained in:
iceman1001 2014-11-10 21:46:21 +01:00
commit f595de25e9
2 changed files with 61 additions and 23 deletions

View file

@ -47,6 +47,18 @@ local function save_HTML(javascript, filename)
end
local function save_TEXT(data,filename)
-- Open the output file
local outfile = io.open(filename, "wb")
if outfile == nil then
return oops(string.format("Could not write to file %s",tostring(filename)))
end
outfile:write(data)
io.close(outfile)
return filename
end
local function save_BIN(data, filename)
-- Open the output file
@ -180,5 +192,7 @@ end
return {
convert_bin_to_html = convert_bin_to_html,
convert_eml_to_html = convert_eml_to_html,
convert_eml_to_bin = convert_eml_to_bin,
convert_eml_to_bin = convert_eml_to_bin,
SaveAsBinary = save_BIN,
SaveAsText = save_TEXT,
}