moved select_tag_from_bookmarks back to append_tag
This commit is contained in:
parent
ef78c7cd1e
commit
cfb2abfbc5
23
buku
23
buku
@ -446,21 +446,6 @@ class BukuDb:
|
||||
:tag_manual: string of comma-separated tags to add manually
|
||||
"""
|
||||
|
||||
self.select_tags_from_bookmarks(index)
|
||||
resultset = self.cur.fetchall()
|
||||
for row in resultset:
|
||||
tags = '%s%s' % (row[1], tag_manual[1:])
|
||||
tags = parse_tags([tags])
|
||||
self.cur.execute('UPDATE bookmarks SET tags = ? WHERE id = ?', (tags, row[0],))
|
||||
|
||||
self.conn.commit()
|
||||
|
||||
def select_tags_from_bookmarks(self, index):
|
||||
""" Select either the tags for one bookmark or all bookmarks
|
||||
|
||||
:param index: int position of record, 0 for all
|
||||
"""
|
||||
|
||||
if index == 0:
|
||||
resp = input('Tags will be appended for ALL bookmarks. Enter \x1b[1my\x1b[21m to confirm: ')
|
||||
if resp != 'y':
|
||||
@ -470,6 +455,14 @@ class BukuDb:
|
||||
else:
|
||||
self.cur.execute('SELECT id, tags FROM bookmarks WHERE id = ?', (index,))
|
||||
|
||||
resultset = self.cur.fetchall()
|
||||
for row in resultset:
|
||||
tags = '%s%s' % (row[1], tag_manual[1:])
|
||||
tags = parse_tags([tags])
|
||||
self.cur.execute('UPDATE bookmarks SET tags = ? WHERE id = ?', (tags, row[0],))
|
||||
|
||||
self.conn.commit()
|
||||
|
||||
def delete_tag_at_index(self, index, tag_manual):
|
||||
""" Delete tags for bookmark at index
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user