Documentation update.

This commit is contained in:
Arun Prakash Jana 2016-11-12 22:36:31 +05:30
parent 03b351b11e
commit 299d95aa45
3 changed files with 29 additions and 34 deletions

View File

@ -51,7 +51,7 @@ Though a terminal utility, it's possible to add bookmarks to `buku` without touc
- Add, open, tag, comment on, search, update, remove, shorten URLs - Add, open, tag, comment on, search, update, remove, shorten URLs
- Portable, merge-able database, to sync between systems - Portable, merge-able database, to sync between systems
- Import/export bookmarks in markdown or HTML (FF, Chrome, IE compatible) - Import/export bookmarks in markdown or HTML (FF, Chrome compatible)
- Fetch page title from web, refresh all titles in a go - Fetch page title from web, refresh all titles in a go
- Open (multiple) search results directly in default browser - Open (multiple) search results directly in default browser
- Manual password protection using AES256 encryption - Manual password protection using AES256 encryption
@ -145,8 +145,9 @@ Shell completion scripts for Bash, Fish and Zsh can be found in respective subdi
edit options: edit options:
--url keyword specify url, works with -u only --url keyword specify url, works with -u only
--tag [+|-] [...] set comma-separated tags, works with -a, -u --tag [+|-] [...] set comma-separated tags
clear tags, if no arguments clear tags, if no arguments
works with -a, -u
append specified tags, if preceded by '+' append specified tags, if preceded by '+'
remove specified tags, if preceded by '-' remove specified tags, if preceded by '-'
-t, --title [...] manually set title, works with -a, -u -t, --title [...] manually set title, works with -a, -u
@ -154,18 +155,18 @@ Shell completion scripts for Bash, Fish and Zsh can be found in respective subdi
-a: do not set title, -u: clear title -a: do not set title, -u: clear title
-c, --comment [...] description of the bookmark, works with -c, --comment [...] description of the bookmark, works with
-a, -u; clears comment, if no arguments -a, -u; clears comment, if no arguments
--immutable N disable title fetch from web during update --immutable N disable title fetch from web on update
works with -a, -u works with -a, -u
N=0: mutable (default), N=1: immutable N=0: mutable (default), N=1: immutable
search options: search options:
-s, --sany keyword [...] -s, --sany keyword [...]
search bookmarks for ANY matching keyword search records for ANY matching keyword
-S, --sall keyword [...] -S, --sall keyword [...]
search bookmarks with ALL keywords search records with ALL keywords
special keywords - special keywords -
"blank": list entries with empty title/tag "blank": entries with empty title/tag
"immutable": list entries with locked title "immutable": entries with locked title
--deep match substrings ('pen' matches 'opened') --deep match substrings ('pen' matches 'opened')
--sreg expr run a regex search --sreg expr run a regex search
--stag [...] search bookmarks by tag --stag [...] search bookmarks by tag
@ -180,16 +181,16 @@ Shell completion scripts for Bash, Fish and Zsh can be found in respective subdi
power toys: power toys:
-e, --export file export bookmarks to Firefox format html -e, --export file export bookmarks to Firefox format html
use --tag to export only specific tags use --tag to export only specific tags
-i, --import file import bookmarks from html file; Firefox, -i, --import file import bookmarks from html file; Firefox
Google Chrome and IE formats supported and Google Chrome formats supported
--markdown use markdown with -e and -i --markdown use markdown with -e and -i
supported format: [title](url), 1 per line supported format: [title](url), 1 per line
-m, --merge file merge bookmarks from another buku database -m, --merge file merge bookmarks from another buku database
-p, --print [...] show details of bookmark by DB index -p, --print [...] show details of bookmark by DB index
accepts indices and ranges accepts indices and ranges
show all bookmarks, if no arguments show all bookmarks, if no arguments
-f, --format N modify -p, search output. N=1: show only URL, -f, --format N fields to show in -p or search output
N=2: show URL and tag, N=3: show only title 1: URL, 2: URL and tag, 3: title
-r, --replace oldtag [newtag ...] -r, --replace oldtag [newtag ...]
replace oldtag with newtag everywhere replace oldtag with newtag everywhere
delete oldtag, if no newtag delete oldtag, if no newtag
@ -204,8 +205,7 @@ Shell completion scripts for Bash, Fish and Zsh can be found in respective subdi
-z, --debug show debug information and additional logs -z, --debug show debug information and additional logs
prompt keys: prompt keys:
1-N open the Nth search result in web browser 1-N browse search result indices and/or ranges
ranges, space-separated result indices work
double Enter exit buku double Enter exit buku
symbols: symbols:
@ -355,7 +355,6 @@ All bookmarks are exported if --tag is not specified.
$ buku -i bookmarks.html $ buku -i bookmarks.html
$ buku -i bookmarks.md --markdown $ buku -i bookmarks.md --markdown
HTML exports from Firefox, Google Chrome and IE are supported.
9. **Delete only comment** for bookmark at 15012014: 9. **Delete only comment** for bookmark at 15012014:
$ buku -u 15012014 -c $ buku -u 15012014 -c

12
buku.1
View File

@ -11,7 +11,7 @@ is a command-line tool to save, tag and search bookmarks.
.PP .PP
* Add, open, tag, comment on, search, update, remove, shorten URLs * Add, open, tag, comment on, search, update, remove, shorten URLs
* Portable merge-able database, to sync between systems * Portable merge-able database, to sync between systems
* Import/export bookmarks in markdown or HTML (FF, Chrome, IE compatible) * Import/export bookmarks in markdown or HTML (FF, Chrome compatible)
* Fetch page title from web, refresh all titles in a go * Fetch page title from web, refresh all titles in a go
* Open (multiple) search results directly in default browser * Open (multiple) search results directly in default browser
* Manual password protection using AES256 encryption * Manual password protection using AES256 encryption
@ -128,7 +128,7 @@ Decrypt (unlock) the DB file with
Export bookmarks to Firefox bookmarks formatted HTML. Works with --tag to export only specific tags. Export bookmarks to Firefox bookmarks formatted HTML. Works with --tag to export only specific tags.
.TP .TP
.BI \-i " " \--import " file" .BI \-i " " \--import " file"
Import bookmarks exported from Firefox, Google Chrome or IE in HTML format. Import bookmarks exported from Firefox or Google Chrome in HTML format.
.TP .TP
.BI \--markdown .BI \--markdown
Use markdown for --export and --import. Supported format is '[title](url)', one entry per line. Use markdown for --export and --import. Supported format is '[title](url)', one entry per line.
@ -140,7 +140,7 @@ Merge bookmarks from another Buku database file.
Show details (DB index, URL, title, tags and comment) of bookmark record by DB index. If no arguments, all records with actual index from DB are shown. Accepts hyphenated ranges and space-separated indices. Show details (DB index, URL, title, tags and comment) of bookmark record by DB index. If no arguments, all records with actual index from DB are shown. Accepts hyphenated ranges and space-separated indices.
.TP .TP
.BI \-f " " \--format " N" .BI \-f " " \--format " N"
Show selective monochrome output with specific fields. Works with --print and search options. Useful for creating batch update scripts. Show selective monochrome output with specific fields. Works with --print and search options. Useful for creating batch scripts.
.br .br
.I N .I N
= 1, show only URL. = 1, show only URL.
@ -191,7 +191,7 @@ Show debug information and additional logs.
.SH PROMPT KEYS .SH PROMPT KEYS
.TP .TP
.BI "1-N" .BI "1-N"
Open Open the
.I Nth .I Nth
search result in browser. Multiple bookmarks are opened if ranges or space-separated result indices are specified. search result in browser. Multiple bookmarks are opened if ranges or space-separated result indices are specified.
.TP .TP
@ -274,10 +274,6 @@ All bookmarks are exported if --tag is not specified.
.IP .IP
.B buku -i bookmarks.html .B buku -i bookmarks.html
.B buku -i bookmarks.md --markdown .B buku -i bookmarks.md --markdown
.EE
.PP
.IP "" 4
HTML exports from Firefox, Google Chrome and IE are supported.
.PP .PP
.IP 9. 4 .IP 9. 4
\fBDelete only comment\fR for bookmark at 15012014: \fBDelete only comment\fR for bookmark at 15012014:

24
buku.py
View File

@ -1883,8 +1883,7 @@ class ExtendedArgumentParser(argparse.ArgumentParser):
def print_extended_help(file=None): def print_extended_help(file=None):
file.write(''' file.write('''
prompt keys: prompt keys:
1-N open the Nth search result in web browser 1-N browse search result indices and/or ranges
ranges, space-separated result indices work
double Enter exit buku double Enter exit buku
symbols: symbols:
@ -1971,8 +1970,9 @@ def main():
edit_grp = argparser.add_argument_group( edit_grp = argparser.add_argument_group(
title='edit options', title='edit options',
description='''--url keyword specify url, works with -u only description='''--url keyword specify url, works with -u only
--tag [+|-] [...] set comma-separated tags, works with -a, -u --tag [+|-] [...] set comma-separated tags
clear tags, if no arguments clear tags, if no arguments
works with -a, -u
append specified tags, if preceded by '+' append specified tags, if preceded by '+'
remove specified tags, if preceded by '-' remove specified tags, if preceded by '-'
-t, --title [...] manually set title, works with -a, -u -t, --title [...] manually set title, works with -a, -u
@ -1980,7 +1980,7 @@ def main():
-a: do not set title, -u: clear title -a: do not set title, -u: clear title
-c, --comment [...] description of the bookmark, works with -c, --comment [...] description of the bookmark, works with
-a, -u; clears comment, if no arguments -a, -u; clears comment, if no arguments
--immutable N disable title fetch from web during update --immutable N disable title fetch from web on update
works with -a, -u works with -a, -u
N=0: mutable (default), N=1: immutable''') N=0: mutable (default), N=1: immutable''')
addarg = edit_grp.add_argument addarg = edit_grp.add_argument
@ -1997,12 +1997,12 @@ def main():
search_grp = argparser.add_argument_group( search_grp = argparser.add_argument_group(
title='search options', title='search options',
description='''-s, --sany keyword [...] description='''-s, --sany keyword [...]
search bookmarks for ANY matching keyword search records for ANY matching keyword
-S, --sall keyword [...] -S, --sall keyword [...]
search bookmarks with ALL keywords search records with ALL keywords
special keywords - special keywords -
"blank": list entries with empty title/tag "blank": entries with empty title/tag
"immutable": list entries with locked title "immutable": entries with locked title
--deep match substrings ('pen' matches 'opened') --deep match substrings ('pen' matches 'opened')
--sreg expr run a regex search --sreg expr run a regex search
--stag [...] search bookmarks by tag --stag [...] search bookmarks by tag
@ -2036,16 +2036,16 @@ def main():
title='power toys', title='power toys',
description='''-e, --export file export bookmarks to Firefox format html description='''-e, --export file export bookmarks to Firefox format html
use --tag to export only specific tags use --tag to export only specific tags
-i, --import file import bookmarks from html file; Firefox, -i, --import file import bookmarks from html file; Firefox
Google Chrome and IE formats supported and Google Chrome formats supported
--markdown use markdown with -e and -i --markdown use markdown with -e and -i
supported format: [title](url), 1 per line supported format: [title](url), 1 per line
-m, --merge file merge bookmarks from another buku database -m, --merge file merge bookmarks from another buku database
-p, --print [...] show details of bookmark by DB index -p, --print [...] show details of bookmark by DB index
accepts indices and ranges accepts indices and ranges
show all bookmarks, if no arguments show all bookmarks, if no arguments
-f, --format N modify -p, search output. N=1: show only URL, -f, --format N fields to show in -p or search output
N=2: show URL and tag, N=3: show only title 1: URL, 2: URL and tag, 3: title
-r, --replace oldtag [newtag ...] -r, --replace oldtag [newtag ...]
replace oldtag with newtag everywhere replace oldtag with newtag everywhere
delete oldtag, if no newtag delete oldtag, if no newtag