A more uniform help.

This commit is contained in:
Arun Prakash Jana 2016-04-26 03:58:59 +05:30
parent 923b5b7e34
commit aaa85e7857
No known key found for this signature in database
GPG Key ID: C0A712ED95043DCB

21
buku
View File

@ -1034,7 +1034,7 @@ class ExtendedArgumentParser(argparse.ArgumentParser):
def print_extended_help(file=None):
file.write(textwrap.dedent("""
prompt keys:
1-N open Nth search result in browser
1-N open the Nth search result in web browser
Enter exit buku
Version %.1f
@ -1063,20 +1063,21 @@ addarg('-d', '--delete', nargs='?', dest='delete', type=int, const=0, metavar='N
"delete all bookmarks, if N is omitted\n"
" ")
addarg('-s', '--sany', nargs='+', metavar='KEYWORD',
help="search bookmarks for any keyword\n"
help="search bookmarks for ANY matching keyword\n"
" ")
addarg('-S', '--sall', nargs='+', metavar='KEYWORD',
help="search bookmarks with all keywords\n"
"keyword='tags' : list all tags alphabetically\n"
"keyword='blank': list entries with empty title/tag\n"
help="search bookmarks with ALL keywords\n"
"special keywords:\n"
"'tags' - list all tags alphabetically\n"
"'blank'- list entries with empty title/tag\n"
" ")
addarg('-t', '--title', dest='titleManual', metavar='title',
help="manually set title, works with -a, -u\n"
"title='blank': clear title\n"
" ")
addarg('-u', '--update', nargs='*', dest='update', action=customAction, metavar=('N', 'URL tags'),
help="update fields of the bookmark at DB index N\n"
"if URL is omitted (and -m is not used), refresh\n"
help="update fields of bookmark at DB index N\n"
"if URL is omitted (and -m unused), refresh\n"
"title of bookmark at index N from the web;\n"
"refresh all titles, if N is omitted\n"
" ")
@ -1094,14 +1095,14 @@ addarg('-l', '--lock', nargs='?', dest='encrypt', type=int, const=8, metavar='N'
"hash iterations to generate key\n"
" ")
addarg('-o', '--open', dest='openurl', type=int, metavar='N',
help="open bookmark at DB index N in browser\n"
help="open bookmark at DB index N in web browser\n"
" ")
addarg('-p', '--print', nargs='?', dest='printindex', type=int, const=0, metavar='N',
help="show details of bookmark at DB index N\n"
"show all bookmarks, if N is omitted\n"
" ")
addarg('-r', '--replace', nargs=2, dest='replace', metavar=('oldtag', 'newtag'),
help="replace oldtag with newtag\n"
help="replace oldtag with newtag for all bookmarks\n"
"newtag='blank': delete oldtag\n"
" ")
addarg('-x', '--format', dest='showOpt', type=int, choices=[1, 2], metavar='N',
@ -1109,7 +1110,7 @@ addarg('-x', '--format', dest='showOpt', type=int, choices=[1, 2], metavar='N',
"N=1: show only URL, N=2: show URL and tag\n"
" ")
addarg('-z', '--debug', dest='debug', action='store_true',
help="show debug information")
help="show debug information and additional logs")
if len(sys.argv) < 2:
argparser.print_help(sys.stderr)