diff --git a/README.md b/README.md index 59934b8..9f4016e 100644 --- a/README.md +++ b/README.md @@ -42,4 +42,22 @@ Options: -l, --loop Continuing download loop. When this option is set every 5 Minutes the program searches for new images -``` \ No newline at end of file +``` + +## sher.py +Searches for string occurences in a file (line by line) or directory +(all directory and filenames in the tree). + +```commandline +Usage: sher.py [options] + +Options: + -h, --help show this help message and exit + -f S_FILE, --file=S_FILE + Searching lines in the given file. + -d S_DIR, --directory=S_DIR + Searching files in a directory. + -q QUERY, --query=QUERY + The search term. Supporting "". + -l, --loop Runs the program in an endless loop. + ``` \ No newline at end of file diff --git a/sher.py b/sher.py index 4166269..f7b09dc 100644 --- a/sher.py +++ b/sher.py @@ -9,9 +9,10 @@ sources = {} def optparse_init() -> tuple: parser = optparse.OptionParser() parser.add_option('-f', '--file', type='string', dest='s_file', help='Searching lines in the given file.') - parser.add_option('-d', '--directory', type='string', dest='s_dir', help='Searching files in a directorys.') - parser.add_option('-q', '--query', type='string', dest='query', help='The search term.') - parser.add_option('-l', '--loop', action='store_true', default=False, dest='loop', help='Looping over the input?') + parser.add_option('-d', '--directory', type='string', dest='s_dir', help='Searching files in a directory.') + parser.add_option('-q', '--query', type='string', dest='query', help='The search term. Supporting "".') + parser.add_option('-l', '--loop', action='store_true', default=False, dest='loop', help="""Runs the program in + an endless loop.""") return parser.parse_args()