1 local reader
= require('hf_reader')
2 local getopt
= require('getopt')
3 local ansicolors
= require('ansicolors')
9 This script tries to detect a HF card. Just like 'hf search' does but this is experimental
21 -- This is only meant to be used when errors occur
22 local function dbg(args
)
23 if not DEBUG
then return end
24 if type(args
) == 'table' then
35 -- This is only meant to be used when errors occur
36 local function oops(err
)
38 core
.clearCommandBuffer()
48 print(ansicolors
.cyan
..'Usage'..ansicolors
.reset
)
50 print(ansicolors
.cyan
..'Arguments'..ansicolors
.reset
)
52 print(ansicolors
.cyan
..'Example usage'..ansicolors
.reset
)
57 local function main(args
)
58 -- Arguments for the script
59 for o
, a
in getopt
.getopt(args
, 'h') do
60 if o
== 'h' then return help() end
63 print("WORK IN PROGRESS - not expected to be functional yet")
64 info
, err
= reader
.waitForTag()
72 for k
,v
in pairs(info
) do
73 print(string.format(" %s : %s", tostring(k
), tostring(v
)))