From 339e7993c9b618505e136f80bc294f29979d4958 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 7 Jul 2022 12:12:17 -0500 Subject: Add usage --- README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/README.md b/README.md index a8c7369..ec8b396 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,40 @@ Or, for round-tripping ... fucktrain FILE.bf | trainfuck ``` +## USAGE + +`trainfuck -h`: + +``` +TRAINFUCK: CHOO CHOO +Usage: +trainfuck -h|--help +trainfuck [-w WIDTH] [FLAGS...] INPUTFILE [-o OUTPUTFILE] + +Parameters: +INPUTFILE The trainfuck file to process. + If INPUTFILE ends in .tf or .trainfuck, it will be interpreted + as a TRAINFUCK file; if it ends in .bf or .brainfuck, it will + be interpreted as a BRAINFUCK file. Otherwise, the file will + be assumed to be the default filetype (trainfuck). + +-w WIDTH Set the brainfuck output width (default: 42). +-o OUTPUTFILE Where to send transpiled brainfuck (default: /dev/stderr). +-- Stop processing arguments; interpret the rest as filenames + +FLAGS: +-h, --help Show this help +-c, --comments Show comments (default) + -C, --no-comments Hide comments + -z, --compact Show "compact" comments (default) + -Z, --no-compact Show "wide" comments + -x, --execute Execute trainspiled brainfuck + -X, --no-execute Only trainspile, do not execute (default) + -t, --trainfuck Force TRAINFUCK mode: interpret files as trainfuck + -b, --brainfuck Force BRAINFUCK mode: interpret files as brainfuck + -q, --quiet Don't print any more than is necessary +``` + ## INSTALL ``` -- cgit 1.4.1-21-gabe81