add some docs

This commit is contained in:
Michael Zhang 2021-02-24 06:50:27 -06:00
parent 523e6eaf7a
commit a5fa969718
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B
7 changed files with 52 additions and 2 deletions

5
Cargo.lock generated
View file

@ -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"

View file

@ -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 = []

View file

@ -1,3 +1,4 @@
# Summary
- [Intro](./intro.md)
- [Config](./config.md)

26
docs/src/config.md Normal file
View 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/

View file

@ -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/

7
smtp/Cargo.toml Normal file
View 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
View file

@ -0,0 +1,7 @@
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
assert_eq!(2 + 2, 4);
}
}