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:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user