From 162455c38e2060e2fb5f7f3012d60a41c2ca80f6 Mon Sep 17 00:00:00 2001 From: Dima Gerasimov Date: Wed, 4 Mar 2020 23:28:15 +0000 Subject: [PATCH] fix materialistic glob --- my/materialistic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/my/materialistic.py b/my/materialistic.py index 8eefa6e..2f822e4 100644 --- a/my/materialistic.py +++ b/my/materialistic.py @@ -41,11 +41,11 @@ class Saved(NamedTuple): def _last_export(): - return max(get_files(paths.materialistic.export_path, glob='*.db')) + return max(get_files(paths.materialistic.export_path, glob='**/*.db')) def raw() -> Iterator[Row]: - db = dataset.connect('sqlite:///' + str(_last_export)) + db = dataset.connect('sqlite:///' + str(_last_export())) st = db['saved'] # TODO wonder if it's 'save time'? yield from st.all(order_by='time')