aboutsummaryrefslogtreecommitdiff
path: root/db.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--db.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/db.py b/db.py
index 52df438..40de215 100644
--- a/db.py
+++ b/db.py
@@ -87,3 +87,11 @@ def bookmark(path):
bookmark["private"] = [m.group(1) for l in lines for m in [private.search(l)] if m][0]
bookmark["comment"] = [m.group(1) for m in [comment.search("".join(lines))] if m][0]
return bookmark
+
+
+def bookmarks(path):
+ bookmarks = []
+ for root, dirs, files in os.walk(path, topdown=False):
+ for name in files:
+ bookmarks.append(bookmark(path / Path(name)))
+ return bookmarks