mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
colors
This commit is contained in:
parent
95bc1230d7
commit
2474385ab0
5 changed files with 66 additions and 45 deletions
|
@ -1,19 +1,31 @@
|
|||
-- The getopt-functionality is loaded from pm3/getopt.lua
|
||||
-- Have a look there for further details
|
||||
getopt = require('getopt')
|
||||
local getopt = require('getopt')
|
||||
local ansicolors = require('ansicolors')
|
||||
|
||||
copyright = ''
|
||||
usage = 'script run parameters.lua -a 1 -blala -c -de'
|
||||
author = 'Martin Holst Swende'
|
||||
version = 'v1.0.1'
|
||||
version = 'v1.0.2'
|
||||
desc = [[
|
||||
This is an example script to demonstrate handle parameters in scripts.
|
||||
For more info, check the comments in the code
|
||||
]]
|
||||
example = [[
|
||||
1. script run parameters -a mytestparam_input -c
|
||||
]]
|
||||
usage = [[
|
||||
script run parameters [-h] [-a <txt>] [-b <txt>] [-c] [-d] [-e]
|
||||
]]
|
||||
arguments = [[
|
||||
-h This help
|
||||
-a <txt> text
|
||||
-b <txt> text
|
||||
-c test param w/o input
|
||||
-d test param w/o input
|
||||
-e test param w/o input
|
||||
]]
|
||||
|
||||
---
|
||||
-- Usage help
|
||||
local function help()
|
||||
|
@ -21,9 +33,12 @@ local function help()
|
|||
print(author)
|
||||
print(version)
|
||||
print(desc)
|
||||
print('Example usage')
|
||||
print(example)
|
||||
print(ansicolors.cyan..'Usage'..ansicolors.reset)
|
||||
print(usage)
|
||||
print(ansicolors.cyan..'Arguments'..ansicolors.reset)
|
||||
print(arguments)
|
||||
print(ansicolors.cyan..'Example usage'..ansicolors.reset)
|
||||
print(example)
|
||||
end
|
||||
|
||||
local function main(args)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue