From 24f50b2d73df79473b1847755f8ac2e62b5a5026 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Mon, 11 Jul 2016 22:48:40 +0530 Subject: [PATCH] Update tag help. --- README.md | 10 ++++++---- buku | 8 ++++---- buku.1 | 5 +++-- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 57753d3..fefe3e6 100644 --- a/README.md +++ b/README.md @@ -141,9 +141,10 @@ Please substitute `$version` with the appropriate package version. edit options: --url keyword specify url, works with -u only - --tag [+] [...] set comma-separated tags, works with -a, -u - clears tags, if no arguments - appends tags, if preceded by '+' + --tag [+|-] [...] set comma-separated tags, works with -a, -u + clear tags, if no arguments + append specified tags, if preceded by '+' + remove specified tags, if preceded by '-' -t, --title [...] manually set title, works with -a, -u if no arguments: -a: do not set title, -u: clear title @@ -308,9 +309,10 @@ The same number of iterations must be used for one lock & unlock instance. Defau 21. **Delete tag** 'old tag' from DB: $ buku -r 'old tag' -22. **Append tags** 'tag 1', 'tag 2' to existing tags of bookmark at index 15012014: +22. **Append (or delete) tags** 'tag 1', 'tag 2' to (or from) existing tags of bookmark at index 15012014: $ buku -u 15012014 --tag + tag 1, tag 2 + $ buku -u 15012014 --tag - tag 1, tag 2 23. **Open URL** at index 15012014 in browser: $ buku -o 15012014 diff --git a/buku b/buku index 5528c46..f86c0fc 100755 --- a/buku +++ b/buku @@ -552,7 +552,7 @@ class BukuDb: if meta == '': print('\x1B[91mTitle: []\x1B[0m') logger.debug('Title: [%s]', meta) - elif not to_update and not append_tag and not delete_tag: + elif not to_update and not (append_tag or delete_tag): self.refreshdb(index) if index > 0: self.print_bookmark(index) @@ -1517,9 +1517,9 @@ if __name__ == '__main__': title='edit options', description='''--url keyword specify url, works with -u only --tag [+|-] [...] set comma-separated tags, works with -a, -u - clears tags, if no arguments - appends tags, if preceded by '+' - or delete tags, if preceded by '-' + clear tags, if no arguments + append specified tags, if preceded by '+' + remove specified tags, if preceded by '-' -t, --title [...] manually set title, works with -a, -u if no arguments: -a: do not set title, -u: clear title diff --git a/buku.1 b/buku.1 index 60dad5f..8ff98f4 100644 --- a/buku.1 +++ b/buku.1 @@ -67,7 +67,7 @@ Show program help and exit. Specify the URL, works with -u only. Fetches and updates title if --title is not used. .TP .BI \--tag " [+|-] [...]" -Specify comma separated tags, works with -a, -u. Clears the tags, if no arguments passed. Appends tags, if list of tags is preceded by '+'.Delete tags, if list of tags is preceded by '-'. +Specify comma separated tags, works with -a, -u. Clears the tags, if no arguments passed. Appends or deletes tags, if list of tags is preceded by '+' or '-' respectively. .TP .BI \-t " " \--title " [...]" Manually specify the title, works with -a, -u. Omits or clears the title, if no arguments passed. @@ -351,11 +351,12 @@ The same number of iterations must be used for one lock & unlock instance. Defau .B buku -r 'old tag' .PP .IP 22. 4 -\fBAppend tags\fR 'tag 1', 'tag 2' to existing tags of bookmark at index 15012014: +\fBAppend (or delete) tags\fR 'tag 1', 'tag 2' to (or from) existing tags of bookmark at index 15012014: .PP .EX .IP .B buku -u 15012014 --tag + tag 1, tag 2 +.B buku -u 15012014 --tag - tag 1, tag 2 .PP .IP 23. 4 \fBOpen URL\fR at index 15012014 in browser: