mirror of
https://github.com/soywod/himalaya.git
synced 2024-07-08 18:45:13 +00:00
add todos, update readme help text
This commit is contained in:
parent
cb8610a35f
commit
b023704d31
|
@ -7,8 +7,6 @@ himalaya --help
|
||||||
```
|
```
|
||||||
|
|
||||||
```help
|
```help
|
||||||
Himalaya 0.1.0
|
|
||||||
soywod <clement.douin@posteo.net>
|
|
||||||
📫 Minimalist CLI email client
|
📫 Minimalist CLI email client
|
||||||
|
|
||||||
USAGE:
|
USAGE:
|
||||||
|
@ -21,8 +19,10 @@ FLAGS:
|
||||||
SUBCOMMANDS:
|
SUBCOMMANDS:
|
||||||
forward Forwards an email by its UID
|
forward Forwards an email by its UID
|
||||||
help Prints this message or the help of the given subcommand(s)
|
help Prints this message or the help of the given subcommand(s)
|
||||||
query Prints emails filtered by the given IMAP query
|
list Lists all available mailboxes
|
||||||
read Reads an email by its UID
|
read Reads an email by its UID
|
||||||
reply Replies to an email by its UID
|
reply Replies to an email by its UID
|
||||||
|
search Lists emails matching the given IMAP query
|
||||||
|
send Send a draft by its UID
|
||||||
write Writes a new email
|
write Writes a new email
|
||||||
```
|
```
|
||||||
|
|
30
src/main.rs
30
src/main.rs
|
@ -104,11 +104,9 @@ fn run() -> Result<()> {
|
||||||
.default_value("text/plain"),
|
.default_value("text/plain"),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.subcommand(SubCommand::with_name("write").about("Writes a new email"))
|
|
||||||
.subcommand(
|
.subcommand(
|
||||||
SubCommand::with_name("forward")
|
SubCommand::with_name("write")
|
||||||
.about("Forwards an email by its UID")
|
.about("Writes a new email")
|
||||||
.arg(uid_arg())
|
|
||||||
.arg(mailbox_arg()),
|
.arg(mailbox_arg()),
|
||||||
)
|
)
|
||||||
.subcommand(
|
.subcommand(
|
||||||
|
@ -123,6 +121,17 @@ fn run() -> Result<()> {
|
||||||
.long("all"),
|
.long("all"),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
.subcommand(
|
||||||
|
SubCommand::with_name("forward")
|
||||||
|
.about("Forwards an email by its UID")
|
||||||
|
.arg(uid_arg())
|
||||||
|
.arg(mailbox_arg()),
|
||||||
|
)
|
||||||
|
.subcommand(
|
||||||
|
SubCommand::with_name("send")
|
||||||
|
.about("Send a draft by its UID")
|
||||||
|
.arg(uid_arg()),
|
||||||
|
)
|
||||||
.get_matches();
|
.get_matches();
|
||||||
|
|
||||||
if let Some(_) = matches.subcommand_matches("list") {
|
if let Some(_) = matches.subcommand_matches("list") {
|
||||||
|
@ -184,11 +193,24 @@ fn run() -> Result<()> {
|
||||||
let config = Config::new_from_file()?;
|
let config = Config::new_from_file()?;
|
||||||
let draft = editor::open_with_new_template()?;
|
let draft = editor::open_with_new_template()?;
|
||||||
|
|
||||||
|
// TODO: save as draft instead (IMAP)
|
||||||
println!("Sending ...");
|
println!("Sending ...");
|
||||||
smtp::send(&config, draft.as_bytes());
|
smtp::send(&config, draft.as_bytes());
|
||||||
println!("Done!");
|
println!("Done!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let Some(_) = matches.subcommand_matches("reply") {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
if let Some(_) = matches.subcommand_matches("forward") {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
if let Some(_) = matches.subcommand_matches("send") {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue