Added README.md and versioning.

This commit is contained in:
2017-07-06 00:53:28 -05:00
parent 9a2fcf29dc
commit b0e6e4d66f
2 changed files with 63 additions and 1 deletions

View File

@@ -35,6 +35,7 @@ when isMainModule:
var outFile: File
try:
let VERSION = "0.1.0"
let usage = """
Usage:
log_happy [options]
@@ -43,9 +44,10 @@ Usage:
Options:
-v Print version information and exit.
-e<label>;<pattern> Add something to expect to see in the log stream.
-E<label>;<patterh> Add something to expect not to see in the log stream.
-d<def-file> Specify a JSON definitions blob.
-d<def-file> Read expectations from a JSON definitions file.
-i<in-file> Read JSON definitions from <in-file>.
-o<out-file> Write the log to <out-file>. Usefull for viewing
output later when executing commands.
@@ -134,6 +136,10 @@ Expectations JSON definitions follow this format:
expected: m[0] == "e",
found: false))
elif arg == "-v":
stdout.writeLine "log_happy v" & VERSION
quit(QuitSuccess)
elif arg == "-f": follow = true
elif arg == "--": cmd = ""
else: exitErr "unrecognized argument: " & arg