Add comment in Json output.
This commit is contained in:
parent
450247af05
commit
8c7ef3ec34
@ -153,7 +153,7 @@ Shell completion scripts for Bash, Fish and Zsh can be found in respective subdi
|
|||||||
-r, --replace oldtag [newtag ...]
|
-r, --replace oldtag [newtag ...]
|
||||||
replace oldtag with newtag in all bookmarks
|
replace oldtag with newtag in all bookmarks
|
||||||
delete oldtag, if no newtag
|
delete oldtag, if no newtag
|
||||||
-j, --json Json formatted output, works with -p, -s
|
-j, --json Json formatted output, for -p, -s, -S, --st
|
||||||
-o, --open N open bookmark at DB index N in web browser
|
-o, --open N open bookmark at DB index N in web browser
|
||||||
-z, --debug show debug information and additional logs
|
-z, --debug show debug information and additional logs
|
||||||
|
|
||||||
|
5
buku
5
buku
@ -701,7 +701,7 @@ def formatJson(resultset, single=False):
|
|||||||
elif showOpt == 2:
|
elif showOpt == 2:
|
||||||
record = { 'url': row[1], 'tags': row[3][1:-1] }
|
record = { 'url': row[1], 'tags': row[3][1:-1] }
|
||||||
else:
|
else:
|
||||||
record = { 'url': row[1], 'title': row[2], 'tags': row[3][1:-1]}
|
record = { 'url': row[1], 'title': row[2], 'comment': row[4], 'tags': row[3][1:-1]}
|
||||||
|
|
||||||
marks.append(record)
|
marks.append(record)
|
||||||
else:
|
else:
|
||||||
@ -715,6 +715,7 @@ def formatJson(resultset, single=False):
|
|||||||
else:
|
else:
|
||||||
marks['url'] = row[1]
|
marks['url'] = row[1]
|
||||||
marks['title'] = row[2]
|
marks['title'] = row[2]
|
||||||
|
marks['comment'] = row[4]
|
||||||
marks['tags'] = row[3][1:-1]
|
marks['tags'] = row[3][1:-1]
|
||||||
|
|
||||||
return json.dumps(marks, sort_keys=True, indent=4)
|
return json.dumps(marks, sort_keys=True, indent=4)
|
||||||
@ -1177,7 +1178,7 @@ power_group=argparser.add_argument_group(title="power toys",
|
|||||||
-r, --replace oldtag [newtag ...]
|
-r, --replace oldtag [newtag ...]
|
||||||
replace oldtag with newtag in all bookmarks
|
replace oldtag with newtag in all bookmarks
|
||||||
delete oldtag, if no newtag
|
delete oldtag, if no newtag
|
||||||
-j, --json Json formatted output, works with -p, -s
|
-j, --json Json formatted output, for -p, -s, -S, --st
|
||||||
-o, --open N open bookmark at DB index N in web browser
|
-o, --open N open bookmark at DB index N in web browser
|
||||||
-z, --debug show debug information and additional logs''')
|
-z, --debug show debug information and additional logs''')
|
||||||
power_group.add_argument('-p', '--print', nargs='?', dest='printindex', type=int, const=0, metavar='N', help=argparse.SUPPRESS)
|
power_group.add_argument('-p', '--print', nargs='?', dest='printindex', type=int, const=0, metavar='N', help=argparse.SUPPRESS)
|
||||||
|
2
buku.1
2
buku.1
@ -130,7 +130,7 @@ if
|
|||||||
is omitted.
|
is omitted.
|
||||||
.TP
|
.TP
|
||||||
.BI \-j " " \--json
|
.BI \-j " " \--json
|
||||||
Output data formatted as json (works with -p and -s)
|
Output data formatted as json, works with -p, -s, -S, --st.
|
||||||
.TP
|
.TP
|
||||||
.BI \-o " " \--open " N"
|
.BI \-o " " \--open " N"
|
||||||
Open URL at DB index
|
Open URL at DB index
|
||||||
|
Loading…
Reference in New Issue
Block a user