Skip to content

parse getopt-style help texts from somecommand --help

License

Notifications You must be signed in to change notification settings

milahu/parse-helptext

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

parse-helptext

parse getopt-style help texts from someprogram --help

return one of

  • json
  • argument parser for bash. useful to write program wrappers in bash: modify arguments, run the program in a sandbox (bubblewrap), run code before and after the program, trap exit to handle program crashes, ...

usage

see test/update.sh

examples

see test/cases/

similar projects

helptext parsers

argparse in bash

todo

  • write an actual parser for helptext: pyparsing, tree-sitter, ...

licence

GNU GPLv2

Languages

  • Shell 71.2%
  • Python 28.8%