add some docs
This commit is contained in:
parent
523e6eaf7a
commit
a5fa969718
7 changed files with 52 additions and 2 deletions
5
Cargo.lock
generated
5
Cargo.lock
generated
|
@ -985,6 +985,7 @@ dependencies = [
|
||||||
"inotify",
|
"inotify",
|
||||||
"log",
|
"log",
|
||||||
"panorama-imap",
|
"panorama-imap",
|
||||||
|
"panorama-smtp",
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"pgp",
|
"pgp",
|
||||||
"pin-project",
|
"pin-project",
|
||||||
|
@ -1018,6 +1019,10 @@ dependencies = [
|
||||||
"webpki-roots",
|
"webpki-roots",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "panorama-smtp"
|
||||||
|
version = "0.1.0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "parking_lot"
|
name = "parking_lot"
|
||||||
version = "0.11.1"
|
version = "0.11.1"
|
||||||
|
|
|
@ -9,7 +9,7 @@ readme = "README.md"
|
||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0-or-later"
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = ["imap"]
|
members = ["imap", "smtp"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0.38"
|
anyhow = "1.0.38"
|
||||||
|
@ -41,5 +41,9 @@ path = "imap"
|
||||||
version = "0"
|
version = "0"
|
||||||
features = ["rfc2177-idle"]
|
features = ["rfc2177-idle"]
|
||||||
|
|
||||||
|
[dependencies.panorama-smtp]
|
||||||
|
path = "smtp"
|
||||||
|
version = "0"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
clippy = []
|
clippy = []
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
# Summary
|
# Summary
|
||||||
|
|
||||||
- [Intro](./intro.md)
|
- [Intro](./intro.md)
|
||||||
|
- [Config](./config.md)
|
||||||
|
|
26
docs/src/config.md
Normal file
26
docs/src/config.md
Normal file
|
@ -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/
|
|
@ -4,4 +4,4 @@ Panorama is a personal information manager.
|
||||||
|
|
||||||
[Click here for API docs][1]
|
[Click here for API docs][1]
|
||||||
|
|
||||||
[1]: https://iptq.github.io/panorama/api/panorama/
|
[1]: https://pim.mzhang.io/api/panorama/
|
||||||
|
|
7
smtp/Cargo.toml
Normal file
7
smtp/Cargo.toml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
[package]
|
||||||
|
name = "panorama-smtp"
|
||||||
|
version = "0.1.0"
|
||||||
|
authors = ["Michael Zhang <mail@mzhang.io>"]
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
|
[dependencies]
|
7
smtp/src/lib.rs
Normal file
7
smtp/src/lib.rs
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
#[test]
|
||||||
|
fn it_works() {
|
||||||
|
assert_eq!(2 + 2, 4);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue