Append update.

This commit is contained in:
Arun Prakash Jana 2016-06-12 16:18:10 +05:30
parent 87397e3788
commit 9c37d30da6
No known key found for this signature in database
GPG Key ID: C0A712ED95043DCB
5 changed files with 22 additions and 10 deletions

View File

@ -127,8 +127,9 @@ Shell completion scripts for Bash, Fish and Zsh can be found in respective subdi
edit options:
--url keyword specify url, works with -u only
--tag [...] set comma-separated tags, works with -a, -u
--tag [+] [...] set comma-separated tags, works with -a, -u
clears tags, if no arguments
appends tags, if preceded by '+'
-t, --title [...] manually set title, works with -a, -u
if no arguments:
-a: do not set title, -u: clear title
@ -282,13 +283,16 @@ The same number of iterations must be used for one lock & unlock instance. Defau
20. **Delete tag** 'old tag' from DB:
$ buku -r 'old tag'
21. **Open URL** at index 15012014 in browser:
21. **Append tags** 'tag 1', 'tag 2' to existing tags of bookmark at index 15012014:
$ buku -u 15012014 --tag + tag 1, tag 2
22. **Open URL** at index 15012014 in browser:
$ buku -o 15012014
22. To list bookmarks with no title or tags for **bookkeeping**:
23. To list bookmarks with no title or tags for **bookkeeping**:
$ buku -S blank
23. More **help**:
24. More **help**:
$ buku
$ man buku

View File

@ -20,7 +20,7 @@ complete -c buku -s r -l replace -r --description 'replace a tag'
complete -c buku -s s -l sany -r --description 'search any keyword'
complete -c buku -s S -l sall -r --description 'search all keywords'
complete -c buku -l st -l stag --description 'search by tag or show tags'
complete -c buku -l tag --description 'set tags'
complete -c buku -l tag --description 'set tags, use + to append'
complete -c buku -s t -l title --description 'set custom title'
complete -c buku -s u -l update --description 'update bookmark'
complete -c buku -l url --description 'set url'

View File

@ -25,7 +25,7 @@ args=(
'(-s --sany)'{-s,--sany}'[search any keyword]:keyword(s)'
'(-s --sall)'{-s,--sall}'[search all keywords]:keyword(s)'
'(-st --stag)'{--st,--stag}'[search by tag or show tags]'
'(--tag)'{--tag}'[set tags]'
'(--tag)'{--tag}'[set tags, use + to append]'
'(-t --title)'{-t,--title}'[set custom title]'
'(-u --update)'{-u,--update}'[update bookmark]'
'(--url)'{--url}'[set url]'

3
buku
View File

@ -1471,8 +1471,9 @@ if __name__ == '__main__':
edit_group = argparser.add_argument_group(
title='edit options',
description='''--url keyword specify url, works with -u only
--tag [...] set comma-separated tags, works with -a, -u
--tag [+] [...] set comma-separated tags, works with -a, -u
clears tags, if no arguments
appends tags, if preceded by '+'
-t, --title [...] manually set title, works with -a, -u
if no arguments:
-a: do not set title, -u: clear title

13
buku.1
View File

@ -69,8 +69,8 @@ Show program help and exit.
.BI \--url " [...]"
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.
.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 '+'.
.TP
.BI \-t " " \--title " [...]"
Manually specify the title, works with -a, -u. Omits or clears the title, if no arguments passed.
@ -346,13 +346,20 @@ The same number of iterations must be used for one lock & unlock instance. Defau
.B buku -r 'old tag'
.PP
.IP 21. 4
\fBAppend tags\fR 'tag 1', 'tag 2' to existing tags of bookmark at index 15012014:
.PP
.EX
.IP
.B buku -u 15012014 --tag + tag 1, tag 2
.PP
.IP 22. 4
\fBOpen URL\fR at index 15012014 in browser:
.PP
.EX
.IP
.B buku -o 15012014
.PP
.IP 22. 4
.IP 23. 4
To list bookmarks with no title or tags for \fBbookkeeping\fR:
.PP
.EX