getopt = require('getopt')
bin = require('bin')
-example = "script run 14araw -x 6000F57b"
+example = "script run htmldump -o mifarecard_foo.html"
author = "Martin Holst Swende"
-usage = "script run htmldump [-f <file>]"
+usage = "script run htmldump [-i <file>] [-o <file>]"
desc =[[
This script takes a dumpfile and produces a html based dump, which is a
bit more easily analyzed.
local function main(args)
- print(desc)
local input = "dumpdata.bin"
local output = os.date("%Y-%m-%d_%H%M%S.html");
for o, a in getopt.getopt(args, 'i:o:h') do
local infile = io.open(input, "r")
if infile == nil then
- return ("Could not read file ", input)
+ return oops("Could not read file ", input)
end
--lokal skel = require("skel")
local dumpdata = readdump(infile)