Update tag help.

This commit is contained in:
Arun Prakash Jana 2016-07-11 22:48:40 +05:30
parent 1c8d8fae4e
commit 24f50b2d73
No known key found for this signature in database
GPG Key ID: A75979F35C080412
3 changed files with 13 additions and 10 deletions

View File

@ -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

8
buku
View File

@ -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

5
buku.1
View File

@ -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: