Disable -t for --title
This commit is contained in:
parent
0d87104679
commit
46e2e4a704
@ -172,7 +172,7 @@ EDIT OPTIONS:
|
||||
--tag [+|-] [...] comma-separated tags
|
||||
clear bookmark tagset, if no arguments
|
||||
'+' appends to, '-' removes from tagset
|
||||
-t, --title [...] bookmark title; if no arguments:
|
||||
--title [...] bookmark title; if no arguments:
|
||||
-a: do not set title, -u: clear title
|
||||
-c, --comment [...] description of the bookmark
|
||||
clears description, if no arguments
|
||||
@ -302,7 +302,7 @@ The following steps explore the procedure on Linux with Ubuntu as the reference
|
||||
|
||||
#### Test drive
|
||||
|
||||
Copy or select a URL with mouse and press the keyboard shortcut to add it to the `buku` database. The addition might take a few seconds to reflect depending on your internet speed and the time `buku` needs to fetch the title from the URL. To avoid title fetch from the web, add the `-t` option to the script.
|
||||
Copy or select a URL with mouse and press the keyboard shortcut to add it to the `buku` database. The addition might take a few seconds to reflect depending on your internet speed and the time `buku` needs to fetch the title from the URL. To avoid title fetch from the web, add the `--title` option to the script.
|
||||
|
||||
To verify that the bookmark has indeed been added, run:
|
||||
|
||||
@ -377,14 +377,14 @@ The first command picks editor from the environment variable `EDITOR`. The secon
|
||||
where, >: title, +: comment, #: tags
|
||||
3. **Add** a bookmark with tags `search engine` & `privacy` and **immutable custom title** `DDG`:
|
||||
|
||||
$ buku -a https://ddg.gg search engine, privacy -t 'DDG' --immutable 1
|
||||
$ buku -a https://ddg.gg search engine, privacy --title 'DDG' --immutable 1
|
||||
336. https://ddg.gg (L)
|
||||
> DDG
|
||||
# privacy,search engine
|
||||
Note that URL must precede tags.
|
||||
4. **Add** a bookmark **without a title** (works for update too):
|
||||
|
||||
$ buku -a https://ddg.gg search engine, privacy -t
|
||||
$ buku -a https://ddg.gg search engine, privacy --title
|
||||
5. **Edit and update** a bookmark from editor:
|
||||
|
||||
$ buku -w 15012014
|
||||
|
@ -36,10 +36,10 @@ _buku () {
|
||||
--shorten
|
||||
--sreg
|
||||
--stag
|
||||
-t --title
|
||||
--tacit
|
||||
--tag
|
||||
--threads
|
||||
--title
|
||||
-u --update
|
||||
--url
|
||||
-V
|
||||
|
@ -29,10 +29,10 @@ complete -c buku -s S -l sall -r --description 'match all keywords'
|
||||
complete -c buku -l shorten -r --description 'shorten a URL using tny.im'
|
||||
complete -c buku -l sreg -r --description 'match a regular expression'
|
||||
complete -c buku -l stag --description 'search by tag or show tags'
|
||||
complete -c buku -s t -l title --description 'set custom title'
|
||||
complete -c buku -l tacit --description 'reduce verbosity'
|
||||
complete -c buku -l tag --description 'set tags, use + to append, - to remove'
|
||||
complete -c buku -l threads -r --description 'max connections for full refresh'
|
||||
complete -c buku -l title --description 'set custom title'
|
||||
complete -c buku -s u -l update --description 'update bookmark'
|
||||
complete -c buku -l url -r --description 'set url'
|
||||
complete -c buku -s V --description 'check latest upstream release'
|
||||
|
@ -34,10 +34,10 @@ args=(
|
||||
'(--shorten)--shorten[shorten a URL using tny.im]:index/url'
|
||||
'(--sreg)--sreg[match a regular exression]:regex'
|
||||
'(--stag)--stag[search by tag or show tags]'
|
||||
'(-t --title)'{-t,--title}'[set custom title]'
|
||||
'(--tacit)--tacit[reduce verbosity]'
|
||||
'(--tag)--tag[set tags, use + to append, - to remove]'
|
||||
'(--threads)--threads[max connections for full refresh]:value'
|
||||
'(--title)--title[set custom title]'
|
||||
'(-u --update)'{-u,--update}'[update bookmark]'
|
||||
'(--url)--url[set url]:url'
|
||||
'(-V)-V[check latest upstream release]'
|
||||
|
6
buku.1
6
buku.1
@ -111,7 +111,7 @@ Specify the URL, works with --update only. Fetches and updates title if --title
|
||||
.BI \--tag " [+|-] [...]"
|
||||
Specify comma separated tags, works with --add, --update. Clears the tags, if no arguments passed. Appends or deletes tags, if list of tags is preceded by '+' or '-' respectively.
|
||||
.TP
|
||||
.BI \-t " " \--title " [...]"
|
||||
.BI \--title " [...]"
|
||||
Manually specify the title, works with --add, --update. Omits or clears the title, if no arguments passed.
|
||||
.TP
|
||||
.BI \-c " " \--comment " [...]"
|
||||
@ -327,7 +327,7 @@ In the output, >: title, +: comment, #: tags.
|
||||
.PP
|
||||
.EX
|
||||
.IP
|
||||
.B buku -a https://ddg.gg search engine, privacy -t 'DDG' --immutable 1
|
||||
.B buku -a https://ddg.gg search engine, privacy --title 'DDG' --immutable 1
|
||||
.EE
|
||||
.PP
|
||||
.IP "" 4
|
||||
@ -338,7 +338,7 @@ Note that URL must precede tags.
|
||||
.PP
|
||||
.EX
|
||||
.IP
|
||||
.B buku -a https://ddg.gg search engine, privacy -t
|
||||
.B buku -a https://ddg.gg search engine, privacy --title
|
||||
.EE
|
||||
.PP
|
||||
.IP 5. 4
|
||||
|
10
buku.py
10
buku.py
@ -713,9 +713,9 @@ class BukuDb:
|
||||
|
||||
# Update title
|
||||
#
|
||||
# 1. if -t has no arguments, delete existing title
|
||||
# 2. if -t has arguments, update existing title
|
||||
# 3. if -t option is omitted at cmdline:
|
||||
# 1. if --title has no arguments, delete existing title
|
||||
# 2. if --title has arguments, update existing title
|
||||
# 3. if --title option is omitted at cmdline:
|
||||
# if URL is passed, update the title from web using the URL
|
||||
# 4. if no other argument (url, tag, comment, immutable) passed,
|
||||
# update title from web using DB URL (if title is mutable)
|
||||
@ -2568,7 +2568,7 @@ POSITIONAL ARGUMENTS:
|
||||
--tag [+|-] [...] comma-separated tags
|
||||
clear bookmark tagset, if no arguments
|
||||
'+' appends to, '-' removes from tagset
|
||||
-t, --title [...] bookmark title; if no arguments:
|
||||
--title [...] bookmark title; if no arguments:
|
||||
-a: do not set title, -u: clear title
|
||||
-c, --comment [...] description of the bookmark
|
||||
clears description, if no arguments
|
||||
@ -2577,7 +2577,7 @@ POSITIONAL ARGUMENTS:
|
||||
addarg = edit_grp.add_argument
|
||||
addarg('--url', nargs=1, help=HIDE)
|
||||
addarg('--tag', nargs='*', help=HIDE)
|
||||
addarg('-t', '--title', nargs='*', help=HIDE)
|
||||
addarg('--title', nargs='*', help=HIDE)
|
||||
addarg('-c', '--comment', nargs='*', help=HIDE)
|
||||
addarg('--immutable', type=int, default=-1, choices={0, 1}, help=HIDE)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user