aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--Cargo.toml41
-rw-r--r--notmuch/.gitignore2
-rw-r--r--notmuch/.travis.yml (renamed from .travis.yml)0
-rw-r--r--notmuch/Cargo.toml37
-rw-r--r--notmuch/LICENSE.md (renamed from LICENSE.md)0
-rw-r--r--notmuch/README.md (renamed from README.md)0
-rw-r--r--notmuch/src/config_list.rs (renamed from src/config_list.rs)0
-rw-r--r--notmuch/src/database.rs (renamed from src/database.rs)0
-rw-r--r--notmuch/src/directory.rs (renamed from src/directory.rs)0
-rw-r--r--notmuch/src/error.rs (renamed from src/error.rs)0
-rw-r--r--notmuch/src/ffi.rs (renamed from src/ffi.rs)0
-rw-r--r--notmuch/src/filenames.rs (renamed from src/filenames.rs)0
-rw-r--r--notmuch/src/index.rs (renamed from src/index.rs)0
-rw-r--r--notmuch/src/lib.rs (renamed from src/lib.rs)0
-rw-r--r--notmuch/src/macros.rs (renamed from src/macros.rs)0
-rw-r--r--notmuch/src/message.rs (renamed from src/message.rs)0
-rw-r--r--notmuch/src/message_properties.rs (renamed from src/message_properties.rs)0
-rw-r--r--notmuch/src/messages.rs (renamed from src/messages.rs)0
-rw-r--r--notmuch/src/query.rs (renamed from src/query.rs)0
-rw-r--r--notmuch/src/tags.rs (renamed from src/tags.rs)0
-rw-r--r--notmuch/src/thread.rs (renamed from src/thread.rs)0
-rw-r--r--notmuch/src/threads.rs (renamed from src/threads.rs)0
-rw-r--r--notmuch/src/utils.rs (renamed from src/utils.rs)0
-rw-r--r--notmuch/tests/fixtures.rs (renamed from tests/fixtures.rs)0
-rw-r--r--notmuch/tests/lib.rs (renamed from tests/lib.rs)0
-rw-r--r--notmuch/tests/main.rs (renamed from tests/main.rs)0
-rw-r--r--notmuch/tests/test_database.rs (renamed from tests/test_database.rs)0
-rw-r--r--notmuch/tests/test_message.rs (renamed from tests/test_message.rs)0
-rw-r--r--notmuch/tests/test_query.rs (renamed from tests/test_query.rs)0
-rw-r--r--notmuch/tests/test_tags.rs (renamed from tests/test_tags.rs)0
-rw-r--r--notmuch/tests/test_thread.rs (renamed from tests/test_thread.rs)0
-rw-r--r--src/main.rs9
33 files changed, 59 insertions, 33 deletions
diff --git a/.gitignore b/.gitignore
index 80faede..ea8c4bf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1 @@
-Cargo.lock
-/target/
+/target
diff --git a/Cargo.toml b/Cargo.toml
index 48e7415..ca3f1c3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,37 +1,16 @@
[package]
-name = "notmuch"
-version = "0.6.0"
-authors = ["Dirk Van Haerenborgh <vhdirk@gmail.com>"]
-homepage = "https://github.com/vhdirk/notmuch-rs"
-repository = "https://github.com/vhdirk/notmuch-rs"
-description = "Rust interface and bindings for notmuch"
-license = "GPL-3.0+"
-readme = "README.md"
-keywords = ["email", "notmuch"]
-autotests = false
+name = "mail"
+version = "0.1.0"
+authors = ["Gustav Sörnäs <gustav@sornas.net>"]
+edition = "2018"
-[badges]
-travis-ci = { repository = "vhdirk/notmuch-rs" }
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-libc = "0.2"
-# clippy = { version = "0.0.211", optional = true }
-supercow = "0.1.0"
+crossterm = "0.19" # terminal control (cursor, style)
+termimad = "0.10" # markdown renderer
-[dev-dependencies]
-dirs = "1.0"
-tempfile = "3"
-gethostname = "0.2.0"
-maildir = "0.3.2"
-lettre = "0.9.2"
-lettre_email = "0.9.2"
+notmuch = "0.6"
-[features]
-v0_21 = []
-v0_26 = ["v0_21"]
-default = ["v0_26"]
-
-[[test]]
-name = "tests"
-path = "tests/lib.rs"
-harness = true \ No newline at end of file
+[profile.release]
+lto = "thin"
diff --git a/notmuch/.gitignore b/notmuch/.gitignore
new file mode 100644
index 0000000..80faede
--- /dev/null
+++ b/notmuch/.gitignore
@@ -0,0 +1,2 @@
+Cargo.lock
+/target/
diff --git a/.travis.yml b/notmuch/.travis.yml
index 26d147c..26d147c 100644
--- a/.travis.yml
+++ b/notmuch/.travis.yml
diff --git a/notmuch/Cargo.toml b/notmuch/Cargo.toml
new file mode 100644
index 0000000..48e7415
--- /dev/null
+++ b/notmuch/Cargo.toml
@@ -0,0 +1,37 @@
+[package]
+name = "notmuch"
+version = "0.6.0"
+authors = ["Dirk Van Haerenborgh <vhdirk@gmail.com>"]
+homepage = "https://github.com/vhdirk/notmuch-rs"
+repository = "https://github.com/vhdirk/notmuch-rs"
+description = "Rust interface and bindings for notmuch"
+license = "GPL-3.0+"
+readme = "README.md"
+keywords = ["email", "notmuch"]
+autotests = false
+
+[badges]
+travis-ci = { repository = "vhdirk/notmuch-rs" }
+
+[dependencies]
+libc = "0.2"
+# clippy = { version = "0.0.211", optional = true }
+supercow = "0.1.0"
+
+[dev-dependencies]
+dirs = "1.0"
+tempfile = "3"
+gethostname = "0.2.0"
+maildir = "0.3.2"
+lettre = "0.9.2"
+lettre_email = "0.9.2"
+
+[features]
+v0_21 = []
+v0_26 = ["v0_21"]
+default = ["v0_26"]
+
+[[test]]
+name = "tests"
+path = "tests/lib.rs"
+harness = true \ No newline at end of file
diff --git a/LICENSE.md b/notmuch/LICENSE.md
index 2fb2e74..2fb2e74 100644
--- a/LICENSE.md
+++ b/notmuch/LICENSE.md
diff --git a/README.md b/notmuch/README.md
index 1fcbddf..1fcbddf 100644
--- a/README.md
+++ b/notmuch/README.md
diff --git a/src/config_list.rs b/notmuch/src/config_list.rs
index 2c1a6a4..2c1a6a4 100644
--- a/src/config_list.rs
+++ b/notmuch/src/config_list.rs
diff --git a/src/database.rs b/notmuch/src/database.rs
index 44ad040..44ad040 100644
--- a/src/database.rs
+++ b/notmuch/src/database.rs
diff --git a/src/directory.rs b/notmuch/src/directory.rs
index 1c8a3df..1c8a3df 100644
--- a/src/directory.rs
+++ b/notmuch/src/directory.rs
diff --git a/src/error.rs b/notmuch/src/error.rs
index 64d0716..64d0716 100644
--- a/src/error.rs
+++ b/notmuch/src/error.rs
diff --git a/src/ffi.rs b/notmuch/src/ffi.rs
index 5c276d8..5c276d8 100644
--- a/src/ffi.rs
+++ b/notmuch/src/ffi.rs
diff --git a/src/filenames.rs b/notmuch/src/filenames.rs
index 12e5857..12e5857 100644
--- a/src/filenames.rs
+++ b/notmuch/src/filenames.rs
diff --git a/src/index.rs b/notmuch/src/index.rs
index 4db6bc7..4db6bc7 100644
--- a/src/index.rs
+++ b/notmuch/src/index.rs
diff --git a/src/lib.rs b/notmuch/src/lib.rs
index 1eefaf2..1eefaf2 100644
--- a/src/lib.rs
+++ b/notmuch/src/lib.rs
diff --git a/src/macros.rs b/notmuch/src/macros.rs
index a36197b..a36197b 100644
--- a/src/macros.rs
+++ b/notmuch/src/macros.rs
diff --git a/src/message.rs b/notmuch/src/message.rs
index 55a544f..55a544f 100644
--- a/src/message.rs
+++ b/notmuch/src/message.rs
diff --git a/src/message_properties.rs b/notmuch/src/message_properties.rs
index bd20aa0..bd20aa0 100644
--- a/src/message_properties.rs
+++ b/notmuch/src/message_properties.rs
diff --git a/src/messages.rs b/notmuch/src/messages.rs
index cfba547..cfba547 100644
--- a/src/messages.rs
+++ b/notmuch/src/messages.rs
diff --git a/src/query.rs b/notmuch/src/query.rs
index 50b56e5..50b56e5 100644
--- a/src/query.rs
+++ b/notmuch/src/query.rs
diff --git a/src/tags.rs b/notmuch/src/tags.rs
index 5f3ec60..5f3ec60 100644
--- a/src/tags.rs
+++ b/notmuch/src/tags.rs
diff --git a/src/thread.rs b/notmuch/src/thread.rs
index ffc1f2f..ffc1f2f 100644
--- a/src/thread.rs
+++ b/notmuch/src/thread.rs
diff --git a/src/threads.rs b/notmuch/src/threads.rs
index 9adb2c5..9adb2c5 100644
--- a/src/threads.rs
+++ b/notmuch/src/threads.rs
diff --git a/src/utils.rs b/notmuch/src/utils.rs
index b5b90f0..b5b90f0 100644
--- a/src/utils.rs
+++ b/notmuch/src/utils.rs
diff --git a/tests/fixtures.rs b/notmuch/tests/fixtures.rs
index 7075905..7075905 100644
--- a/tests/fixtures.rs
+++ b/notmuch/tests/fixtures.rs
diff --git a/tests/lib.rs b/notmuch/tests/lib.rs
index 44ec82f..44ec82f 100644
--- a/tests/lib.rs
+++ b/notmuch/tests/lib.rs
diff --git a/tests/main.rs b/notmuch/tests/main.rs
index 17db2bc..17db2bc 100644
--- a/tests/main.rs
+++ b/notmuch/tests/main.rs
diff --git a/tests/test_database.rs b/notmuch/tests/test_database.rs
index 098e271..098e271 100644
--- a/tests/test_database.rs
+++ b/notmuch/tests/test_database.rs
diff --git a/tests/test_message.rs b/notmuch/tests/test_message.rs
index 7af6f2c..7af6f2c 100644
--- a/tests/test_message.rs
+++ b/notmuch/tests/test_message.rs
diff --git a/tests/test_query.rs b/notmuch/tests/test_query.rs
index ad8f299..ad8f299 100644
--- a/tests/test_query.rs
+++ b/notmuch/tests/test_query.rs
diff --git a/tests/test_tags.rs b/notmuch/tests/test_tags.rs
index 3d39486..3d39486 100644
--- a/tests/test_tags.rs
+++ b/notmuch/tests/test_tags.rs
diff --git a/tests/test_thread.rs b/notmuch/tests/test_thread.rs
index 89f1ea0..89f1ea0 100644
--- a/tests/test_thread.rs
+++ b/notmuch/tests/test_thread.rs
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());
+ }
+}