diff --git a/README.md b/README.md index de7408f..5e98010 100644 --- a/README.md +++ b/README.md @@ -106,8 +106,8 @@ Shell completion scripts for Bash, Fish and Zsh can be found in respective subdi **NOTE:** If you are using `buku` v1.9 or below please refer to the installed man page or program help. usage: buku [-a URL [tags ...]] [-u [N [URL tags ...]]] - [-t [...]] [-d [N]] [-h] - [-s keyword [...]] [-S keyword [...]] + [-t [...]] [-c [...]] [-d [N]] [-h] + [-s keyword [...]] [-S keyword [...]] [--st keyword [...]] [-k [N]] [-l [N]] [-p [N]] [-f N] [-r oldtag [newtag ...]] [-j] [-o N] [-z] @@ -137,6 +137,8 @@ Shell completion scripts for Bash, Fish and Zsh can be found in respective subdi special keywords - "tags" : list all tags alphabetically "blank": list entries with empty title/tag + --st, --stag keyword [...] + search bookmarks by tag encryption options: -l, --lock [N] encrypt DB file with N (> 0, default 8) @@ -176,6 +178,7 @@ Shell completion scripts for Bash, Fish and Zsh can be found in respective subdi - Substrings match (`match` matches `rematched`) for URL, title and tags. - `-s` : match any of the keywords in URL, title or tags. - `-S` : match all the keywords in URL, title or tags. + - `--st` : search bookmarks by tag. - You can search bookmarks by tag (see [examples](#examples)). - Search results are indexed serially. This index is different from actual database index of a bookmark record which is shown within `[]` after the URL. - Auto DB compaction: when a record is deleted, the last record is moved to the index. @@ -222,7 +225,7 @@ The last index is moved to the deleted index to keep the DB compact. 10. **Search** bookmarks with **tag** `general kernel concepts`: - $ buku -S ',general kernel concepts,' + $ buku --st general kernel concepts Note the commas (,) before and after the tag. Comma is the tag delimiter in DB. 11. List **all unique tags** alphabetically: diff --git a/buku b/buku index 83eb8a6..c8990f5 100755 --- a/buku +++ b/buku @@ -1105,7 +1105,7 @@ argparser = ExtendedArgumentParser( formatter_class=argparse.RawTextHelpFormatter, usage='''buku [-a URL [tags ...]] [-u [N [URL tags ...]]] [-t [...]] [-c [...]] [-d [N]] [-h] - [-s keyword [...]] [-S keyword [...]] + [-s keyword [...]] [-S keyword [...]] [--st keyword [...]] [-k [N]] [-l [N]] [-p [N]] [-f N] [-r oldtag [newtag ...]] [-j] [-o N] [-z]''', add_help=False @@ -1143,7 +1143,8 @@ search_group=argparser.add_argument_group(title="search options", special keywords - "tags" : list all tags alphabetically "blank": list entries with empty title/tag ---st --stag tag search bookmarks by tag''') +--st, --stag keyword [...] + search bookmarks by tag''') search_group.add_argument('-s', '--sany', nargs='+', metavar='keyword', help=argparse.SUPPRESS) search_group.add_argument('-S', '--sall', nargs='+', metavar='keyword', help=argparse.SUPPRESS) search_group.add_argument('--st', '--stag', nargs='+', dest='stag', metavar='keyword', help=argparse.SUPPRESS) diff --git a/buku.1 b/buku.1 index 7efd256..bebdbd5 100644 --- a/buku.1 +++ b/buku.1 @@ -7,7 +7,7 @@ buku \- A private command-line bookmark manager. Your mini web! .br [-t [...]] [-c [...]] [-d [N]] [-h] .br - [-s keyword [...]] [-S keyword [...]] + [-s keyword [...]] [-S keyword [...]] [--st keyword [...]] .br [-k [N]] [-l [N]] [-p [N]] [-f N] .br @@ -37,6 +37,7 @@ Search works in mysterious ways: - Substrings match ('match' matches 'rematched') for URL, title and tags. - -s : match any of the keywords in URL, title or tags. - -S : match all the keywords in URL, title or tags. + - --st : search bookmarks by tag. - You can search bookmarks by tag (see examples below). - Search results are indexed serially. This index is different from actual database index of a bookmark record which is shown within '[]' after the URL. .PP @@ -87,6 +88,9 @@ Special keywords: "tags" : list all tags alphabetically .br "blank": list entries with empty title/tag +.TP +.BI \--st " " \--stag " keyword [...]" +Search bookmarks by tag. .SH ENCRYPTION OPTIONS .TP .BI \-l " " \--lock " [N]" @@ -237,7 +241,7 @@ The last index is moved to the deleted index to keep the DB compact. .PP .EX .IP -.B buku -S ',general kernel concepts,' +.B buku --st general kernel concepts .EE .PP .IP "" 4