Modified README and sher.py help

- fixed typo in help
- improved help descriptions
- Added entry for sher.py in README
pull/8/head
Julius 6 years ago
parent a027c4038e
commit 879af60f73

@ -43,3 +43,21 @@ Options:
every 5 Minutes the program searches for every 5 Minutes the program searches for
new images new images
``` ```
## 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.
```

@ -9,9 +9,10 @@ sources = {}
def optparse_init() -> tuple: def optparse_init() -> tuple:
parser = optparse.OptionParser() parser = optparse.OptionParser()
parser.add_option('-f', '--file', type='string', dest='s_file', help='Searching lines in the given file.') 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('-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.') 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='Looping over the input?') parser.add_option('-l', '--loop', action='store_true', default=False, dest='loop', help="""Runs the program in
an endless loop.""")
return parser.parse_args() return parser.parse_args()

Loading…
Cancel
Save