From eb5aa0b136b11e94c25d07392592a6017e28294d Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Tue, 24 May 2016 21:30:54 +0530 Subject: [PATCH] Increase spacing. --- buku | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/buku b/buku index 481bf0d..8834c7b 100755 --- a/buku +++ b/buku @@ -98,6 +98,7 @@ class BukuDb: self.conn = conn self.cur = cur + @staticmethod def get_dbfile_path(): """Determine the DB file path: @@ -115,6 +116,7 @@ class BukuDb: return os.path.join(data_home, 'buku') + @staticmethod def move_legacy_dbfile(): """Move database file from earlier path used in versions <= 1.8 @@ -142,6 +144,7 @@ class BukuDb: os.rmdir(olddbpath) + @staticmethod def initdb(): """Initialize the database connection. Create DB file and/or bookmarks table @@ -188,6 +191,7 @@ class BukuDb: return (conn, cur) + def get_bookmark_index(self, url): """Check if URL already exists in DB @@ -202,6 +206,7 @@ class BukuDb: return resultset[0][0] + def add_bookmark(self, url, tag_manual=None, title_manual=None, desc=None): """Add a new bookmark @@ -419,6 +424,7 @@ class BukuDb: else: print(format_json(results)) + def compactdb(self, index): """When an entry at index is deleted, move the last entry in DB to index, if index is lesser. @@ -470,6 +476,7 @@ class BukuDb: except IndexError: print("Index out of bound") + def print_bookmark(self, index, empty=False): """Print bookmark details at index or all bookmarks if index is None Print only bookmarks with blank title or tag if empty is True @@ -525,6 +532,7 @@ class BukuDb: else: print(format_json(results, True)) + def list_tags(self): """Print all unique tags ordered alphabetically """ @@ -588,6 +596,7 @@ class BukuDb: if update: self.conn.commit() + def browse_by_index(self, index): """Open URL at index in browser @@ -1154,6 +1163,8 @@ def printmsg(msg, level=None): print("%s" % msg) +# Custom Action classes for argparse + class CustomUpdateAction(argparse.Action): """Class to capture if optional param 'update' is actually used, even if sans arguments