Document noninteractive option, close conn-cur before exit.

This commit is contained in:
Arun Prakash Jana 2016-05-28 19:06:09 +05:30
parent 7741a1ef6d
commit acd8f30056
No known key found for this signature in database
GPG Key ID: C0A712ED95043DCB
3 changed files with 18 additions and 6 deletions

View File

@ -28,7 +28,7 @@ Copyright (C) 2015-2016 [Arun Prakash Jana](mailto:engineerarun@gmail.com).
- Add, tag, comment on, search, update, remove bookmarks
- Fetch page title from the web (default) or add manually
- Import HTML bookmark exports from Firefox, Google Chrome or IE (**not released yet**)
- Import HTML bookmark exports from Firefox, Google Chrome or IE
- Open search results directly in browser
- Manual password protection using AES256 encryption
- Modify or delete tags, list all unique tags alphabetically
@ -60,12 +60,16 @@ Copyright (C) 2015-2016 [Arun Prakash Jana](mailto:engineerarun@gmail.com).
`buku` requires Python 3.x to work.
For optional encryption support, install PyCrypto module. Run:
Optional dependencies:
- Encryption: PyCrypto
- Import bookmarks: Beautiful Soup
$ sudo pip3 install pycrypto
Run:
$ sudo pip3 install pycrypto beautifulsoup4
or on Ubuntu:
$ sudo apt-get install python3-crypto
$ sudo apt-get install python3-crypto python3-bs4
## Installing from this repository
@ -162,6 +166,7 @@ Shell completion scripts for Bash, Fish and Zsh can be found in respective subdi
replace oldtag with newtag everywhere
delete oldtag, if no newtag
-j, --json Json formatted output for -p, -s, -S, --st
--noprompt do not show the prompt, run and exit
-o, --open N open bookmark at DB index N in web browser
-z, --debug show debug information and additional logs

8
buku
View File

@ -633,9 +633,13 @@ class BukuDb:
if not os.path.exists(fp):
printmsg((fp + ' not found'), 'ERROR')
sys.exit(1)
self.close_quit(1)
import bs4
try:
import bs4
except ImportError:
printmsg('Beautiful Soup not found', 'ERROR')
self.close_quit(1)
with open(fp, encoding='utf-8') as f:
soup = bs4.BeautifulSoup(f, 'html.parser')

3
buku.1
View File

@ -143,6 +143,9 @@ is omitted.
.BI \-j " " \--json
Output data formatted as json, works with -p, -s, -S, --st.
.TP
.BI \--noprompt
Do not show the prompt, run and exit.
.TP
.BI \-o " " \--open " N"
Open URL at DB index
.I N