aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
new file mode 100644
index 0000000..1b30c67
--- /dev/null
+++ b/src/main.rs
@@ -0,0 +1,9 @@
+fn main() {
+ let db = notmuch::Database::open(&"/home/gustav/.mail", notmuch::DatabaseMode::ReadOnly).unwrap();
+ let query = db.create_query("tag:inbox and tag:unread").unwrap();
+ let threads = query.search_threads().unwrap();
+
+ for thread in threads {
+ println!("thread {:?}, {:?}", thread.subject(), thread.authors());
+ }
+}