This commit is contained in:
Johnathan Jenkins 2016-11-06 11:50:24 -08:00
commit 07bee8dc4f
2 changed files with 9 additions and 6 deletions

View File

@ -318,7 +318,9 @@ where, >: title, +: comment, #: tags
2. **Add** a bookmark with tags `linux news` and `open source` & **immutable custom title** `Linux magazine`:
$ buku -a http://tuxdiary.com linux news, open source -t 'Linux magazine' --immutable 1
Added at index 15012014
336. http://tuxdiary.com (L)
> Linux magazine
# linux news,open source
Note that URL must precede tags.
3. **Add** a bookmark **without a title** (works for update too):

11
buku.py Normal file → Executable file
View File

@ -736,7 +736,7 @@ class BukuDb:
print('Title: [%s]' % title)
self.cur.execute(query, (title, row[0],))
print('Index %d updated\n' % row[0])
print('\x1B[92mIndex %d updated\x1B[0m\n' % row[0])
if interrupted:
logger.warning('^C pressed. Aborting DB refresh...')
break
@ -1432,11 +1432,12 @@ def network_handler(url):
try:
while True:
urlconn, resp = connect_server(url)
logger.debug('HTTP response: [%s] %s', resp.status, resp.reason)
if resp is None:
if resp:
logger.debug('HTTP resp: [%s] %s', resp.status, resp.reason)
else:
break
elif resp.status == 200:
if resp.status == 200:
get_page_title(resp)
break
elif resp.status in {301, 302, 303, 307, 308}: