From a5fa969718ba3dff64ccccd9da418c9e5c43afdb Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Wed, 24 Feb 2021 06:50:27 -0600 Subject: [PATCH] add some docs --- Cargo.lock | 5 +++++ Cargo.toml | 6 +++++- docs/src/SUMMARY.md | 1 + docs/src/config.md | 26 ++++++++++++++++++++++++++ docs/src/intro.md | 2 +- smtp/Cargo.toml | 7 +++++++ smtp/src/lib.rs | 7 +++++++ 7 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 docs/src/config.md create mode 100644 smtp/Cargo.toml create mode 100644 smtp/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index f7878bd..5116a36 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -985,6 +985,7 @@ dependencies = [ "inotify", "log", "panorama-imap", + "panorama-smtp", "parking_lot", "pgp", "pin-project", @@ -1018,6 +1019,10 @@ dependencies = [ "webpki-roots", ] +[[package]] +name = "panorama-smtp" +version = "0.1.0" + [[package]] name = "parking_lot" version = "0.11.1" diff --git a/Cargo.toml b/Cargo.toml index 1963319..a086051 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ readme = "README.md" license = "GPL-3.0-or-later" [workspace] -members = ["imap"] +members = ["imap", "smtp"] [dependencies] anyhow = "1.0.38" @@ -41,5 +41,9 @@ path = "imap" version = "0" features = ["rfc2177-idle"] +[dependencies.panorama-smtp] +path = "smtp" +version = "0" + [features] clippy = [] diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md index 976f211..415ddc2 100644 --- a/docs/src/SUMMARY.md +++ b/docs/src/SUMMARY.md @@ -1,3 +1,4 @@ # Summary - [Intro](./intro.md) +- [Config](./config.md) diff --git a/docs/src/config.md b/docs/src/config.md new file mode 100644 index 0000000..04404e4 --- /dev/null +++ b/docs/src/config.md @@ -0,0 +1,26 @@ +# Config + +Configuration is done by editing `$XDG_CONFIG_HOME/panorama/panorama.toml`. It +follows the [TOML][1] file format, and the data structures are defined in code +at `src/config.rs`. + +Example configuration: + +```toml +version = "0.1" + +[[mail]] +imap.server = "mail.example.com" +imap.port = 143 +imap.tls = "starttls" +imap.auth = "plain" +imap.username = "foo" +imap.password = "bar" +``` + +As one of the primary goals of panorama, the application should automatically +detect changes made to this file after it has started, and automatically +re-establish the connections required. As a result, there's no UI for editing +the configuration within the application itself. + +[1]: https://toml.io/en/ diff --git a/docs/src/intro.md b/docs/src/intro.md index 94140c2..84649da 100644 --- a/docs/src/intro.md +++ b/docs/src/intro.md @@ -4,4 +4,4 @@ Panorama is a personal information manager. [Click here for API docs][1] -[1]: https://iptq.github.io/panorama/api/panorama/ +[1]: https://pim.mzhang.io/api/panorama/ diff --git a/smtp/Cargo.toml b/smtp/Cargo.toml new file mode 100644 index 0000000..30c21ad --- /dev/null +++ b/smtp/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "panorama-smtp" +version = "0.1.0" +authors = ["Michael Zhang "] +edition = "2018" + +[dependencies] diff --git a/smtp/src/lib.rs b/smtp/src/lib.rs new file mode 100644 index 0000000..31e1bb2 --- /dev/null +++ b/smtp/src/lib.rs @@ -0,0 +1,7 @@ +#[cfg(test)] +mod tests { + #[test] + fn it_works() { + assert_eq!(2 + 2, 4); + } +}