mirror of
https://github.com/soywod/himalaya.git
synced 2024-11-22 02:50:19 +00:00
fix missing notmuch backend features, improve docs
This commit is contained in:
parent
8cebdf9e90
commit
4d288b9d51
13 changed files with 103 additions and 34 deletions
|
@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- `attachment` including `attachment-download` and the `attachment` subcommand
|
||||
- `template` including `template-write`, `template-reply`, `template-forward`, `template-save`, `template-send` and the `template` subcommand
|
||||
- Added wizard capability to autodetect IMAP and SMTP configurations, based on the [Thunderbird Autoconfiguration](https://wiki.mozilla.org/Thunderbird:Autoconfiguration) standard.
|
||||
- Added back Notmuch backend features.
|
||||
|
||||
### Changed
|
||||
|
||||
|
|
|
@ -1,49 +1,31 @@
|
|||
# Himalaya contributing guide
|
||||
# Contributing guide
|
||||
|
||||
Thank you for investing your time in contributing to Himalaya!
|
||||
Thank you for investing your time in contributing to Himalaya CLI!
|
||||
|
||||
## Development
|
||||
|
||||
The development environment is managed by
|
||||
[Nix](https://nixos.org/download.html). Running `nix-shell` will spawn
|
||||
a shell with everything you need to get started with the tool:
|
||||
`cargo`, `cargo-watch`, `rust-bin`, `rust-analyzer`…
|
||||
The development environment is managed by [Nix](https://nixos.org/download.html). Running `nix-shell` will spawn a shell with everything you need to get started with the lib: `cargo`, `cargo-watch`, `rust-bin`, `rust-analyzer`, `notmuch`…
|
||||
|
||||
```sh
|
||||
# starts a nix shell (the first launch may take a while)
|
||||
# Start a Nix shell
|
||||
$ nix-shell
|
||||
|
||||
# builds the CLI
|
||||
# then build the CLI
|
||||
$ cargo build
|
||||
|
||||
# runs the CLI
|
||||
$ cargo run -- list
|
||||
# run the CLI
|
||||
$ cargo run --feature pgp-gpg -- envelope list
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
If you find a **bug**, please send an email at
|
||||
[~soywod/pimalaya@todo.sr.ht](mailto:~soywod/pimalaya@todo.sr.ht).
|
||||
Himalaya CLI supports open-source, hence the choice of using [sourcehut](https://sourcehut.org/) for managing the project. The only reason why the source code is hosted on GitHub is to build releases for all major platforms (using GitHub Actions). Don't worry, contributing on sourcehut is not a big deal: you just need to send emails! You don't need to create any account. Here a small comparison guide with GitHub:
|
||||
|
||||
If you have a **question**, please send an email at
|
||||
[~soywod/pimalaya@lists.sr.ht](mailto:~soywod/pimalaya@lists.sr.ht).
|
||||
The equivalent of **GitHub Discussions** are:
|
||||
|
||||
If you want to **propose a feature** or **fix a bug**, please send a
|
||||
patch at
|
||||
[~soywod/pimalaya@lists.sr.ht](mailto:~soywod/pimalaya@lists.sr.ht)
|
||||
using [git send-email](https://git-scm.com/docs/git-send-email) (see
|
||||
[this guide](https://git-send-email.io/) on how to configure it).
|
||||
- The [Matrix](https://matrix.org/) chat room [#pimalaya.himalaya](https://matrix.to/#/#pimalaya.himalaya:matrix.org)
|
||||
- The sourcehut mailing list. You can consult existing messages [here](https://lists.sr.ht/~soywod/pimalaya). You can "open a new discussion" by sending an email at [~soywod/pimalaya@lists.sr.ht](mailto:~soywod/pimalaya@lists.sr.ht). You can also [subscribe](mailto:~soywod/pimalaya+subscribe@lists.sr.ht) and [unsubscribe](mailto:~soywod/pimalaya+unsubscribe@lists.sr.ht) to the mailing list, so you can receive a copy of all discussions.
|
||||
|
||||
If you want to **subscribe** to the mailing list, please send an email
|
||||
at
|
||||
[~soywod/pimalaya+subscribe@lists.sr.ht](mailto:~soywod/pimalaya+subscribe@lists.sr.ht).
|
||||
The equivalent of **GitHub Issues** is the sourcehut bug tracker. You can consult existing bugs [here](https://todo.sr.ht/~soywod/pimalaya), and you can "open a new issue" by sending an email at [~soywod/pimalaya@todo.sr.ht](mailto:~soywod/pimalaya@todo.sr.ht).
|
||||
|
||||
If you want to **unsubscribe** to the mailing list, please send an
|
||||
email at
|
||||
[~soywod/pimalaya+unsubscribe@lists.sr.ht](mailto:~soywod/pimalaya+unsubscribe@lists.sr.ht).
|
||||
|
||||
If you want to **discuss** about the project, feel free to join the
|
||||
[Matrix](https://matrix.org/) workspace
|
||||
[#pimalaya.himalaya](https://matrix.to/#/#pimalaya.himalaya:matrix.org)
|
||||
or contact me directly
|
||||
[@soywod](https://matrix.to/#/@soywod:matrix.org).
|
||||
The equivalent of **GitHub Pull requests** is the sourcehut mailing list. You can "open a new pull request" by sending an email containing a git patch at [~soywod/pimalaya@todo.sr.ht](mailto:~soywod/pimalaya@todo.sr.ht). The simplest way to send a patch is to use [git send-email](https://git-scm.com/docs/git-send-email), follow [this guide](https://git-send-email.io/) to configure git properly.
|
||||
|
|
|
@ -71,15 +71,17 @@ Please read the [documentation](https://pimalaya.org/himalaya/cli/latest/configu
|
|||
|
||||
## Contributing
|
||||
|
||||
A **bug tracker** is available at <https://todo.sr.ht/~soywod/pimalaya>.
|
||||
Pleas read the [contributing guide](https://github.com/soywod/himalaya/blob/master/CONTRIBUTING.md) for more detailed information.
|
||||
|
||||
A **mailing list** is available at <https://lists.sr.ht/~soywod/pimalaya>.
|
||||
A **bug tracker** is available on [sourcehut](https://todo.sr.ht/~soywod/pimalaya) [[send an email](mailto:~soywod/pimalaya@todo.sr.ht)].
|
||||
|
||||
A **mailing list** is available on [sourcehut](https://lists.sr.ht/~soywod/pimalaya) [[send an email](mailto:~soywod/pimalaya@lists.sr.ht)|[subscribe](mailto:~soywod/pimalaya+subscribe@lists.sr.ht)|[unsubscribe](mailto:~soywod/pimalaya+unsubscribe@lists.sr.ht)].
|
||||
|
||||
If you want to **report a bug**, please send an email at [~soywod/pimalaya@todo.sr.ht](mailto:~soywod/pimalaya@todo.sr.ht).
|
||||
|
||||
If you want to **propose a feature** or **fix a bug**, please send a patch at [~soywod/pimalaya@lists.sr.ht](mailto:~soywod/pimalaya@lists.sr.ht). The simplest way to send a patch is to use [git send-email](https://git-scm.com/docs/git-send-email), follow [this guide](https://git-send-email.io/) to configure git properly.
|
||||
|
||||
If you just want to **discuss** about the project, feel free to join the [Matrix](https://matrix.org/) workspace [#pimalaya.himalaya](https://matrix.to/#/#pimalaya.himalaya:matrix.org) or contact me directly [@soywod](https://matrix.to/#/@soywod:matrix.org). You can also use the mailing list [[send an email](mailto:~soywod/pimalaya@lists.sr.ht)|[subscribe](mailto:~soywod/pimalaya+subscribe@lists.sr.ht)|[unsubscribe](mailto:~soywod/pimalaya+unsubscribe@lists.sr.ht)].
|
||||
If you just want to **discuss** about the project, feel free to join the [Matrix](https://matrix.org/) workspace [#pimalaya.himalaya](https://matrix.to/#/#pimalaya.himalaya:matrix.org) or contact me directly [@soywod](https://matrix.to/#/@soywod:matrix.org). You can also use the mailing list.
|
||||
|
||||
## Sponsoring
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@ use clap::Parser;
|
|||
use email::message::copy::imap::CopyImapMessages;
|
||||
#[cfg(feature = "maildir")]
|
||||
use email::message::copy::maildir::CopyMaildirMessages;
|
||||
#[cfg(feature = "notmuch")]
|
||||
use email::message::copy::notmuch::CopyNotmuchMessages;
|
||||
use log::info;
|
||||
|
||||
#[cfg(feature = "account-sync")]
|
||||
|
@ -79,6 +81,12 @@ impl MessageCopyCommand {
|
|||
.map(CopyMaildirMessages::new_boxed)
|
||||
});
|
||||
}
|
||||
#[cfg(feature = "notmuch")]
|
||||
Some(BackendKind::Notmuch) => {
|
||||
builder.set_copy_messages(|ctx| {
|
||||
ctx.notmuch.as_ref().map(CopyNotmuchMessages::new_boxed)
|
||||
});
|
||||
}
|
||||
_ => (),
|
||||
},
|
||||
)
|
||||
|
|
|
@ -4,6 +4,8 @@ use clap::Parser;
|
|||
use email::{flag::add::imap::AddImapFlags, message::move_::imap::MoveImapMessages};
|
||||
#[cfg(feature = "maildir")]
|
||||
use email::{flag::add::maildir::AddMaildirFlags, message::move_::maildir::MoveMaildirMessages};
|
||||
#[cfg(feature = "notmuch")]
|
||||
use email::{flag::add::notmuch::AddNotmuchFlags, message::move_::notmuch::MoveNotmuchMessages};
|
||||
use log::info;
|
||||
|
||||
#[cfg(feature = "account-sync")]
|
||||
|
@ -88,6 +90,14 @@ impl MessageDeleteCommand {
|
|||
.map(AddMaildirFlags::new_boxed)
|
||||
});
|
||||
}
|
||||
#[cfg(feature = "notmuch")]
|
||||
Some(BackendKind::Notmuch) => {
|
||||
builder.set_move_messages(|ctx| {
|
||||
ctx.notmuch.as_ref().map(MoveNotmuchMessages::new_boxed)
|
||||
});
|
||||
builder
|
||||
.set_add_flags(|ctx| ctx.notmuch.as_ref().map(AddNotmuchFlags::new_boxed));
|
||||
}
|
||||
_ => (),
|
||||
},
|
||||
)
|
||||
|
|
|
@ -4,6 +4,8 @@ use clap::Parser;
|
|||
use email::message::add::imap::AddImapMessage;
|
||||
#[cfg(feature = "maildir")]
|
||||
use email::message::add::maildir::AddMaildirMessage;
|
||||
#[cfg(feature = "notmuch")]
|
||||
use email::message::add::notmuch::AddNotmuchMessage;
|
||||
#[cfg(feature = "sendmail")]
|
||||
use email::message::send::sendmail::SendSendmailMessage;
|
||||
#[cfg(feature = "smtp")]
|
||||
|
@ -93,6 +95,12 @@ impl MessageForwardCommand {
|
|||
.map(AddMaildirMessage::new_boxed)
|
||||
});
|
||||
}
|
||||
#[cfg(feature = "notmuch")]
|
||||
Some(BackendKind::Notmuch) => {
|
||||
builder.set_add_message(|ctx| {
|
||||
ctx.notmuch.as_ref().map(AddNotmuchMessage::new_boxed)
|
||||
});
|
||||
}
|
||||
_ => (),
|
||||
};
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@ use clap::Parser;
|
|||
use email::message::add::imap::AddImapMessage;
|
||||
#[cfg(feature = "maildir")]
|
||||
use email::message::add::maildir::AddMaildirMessage;
|
||||
#[cfg(feature = "notmuch")]
|
||||
use email::message::add::notmuch::AddNotmuchMessage;
|
||||
#[cfg(feature = "sendmail")]
|
||||
use email::message::send::sendmail::SendSendmailMessage;
|
||||
#[cfg(feature = "smtp")]
|
||||
|
@ -90,6 +92,12 @@ impl MessageMailtoCommand {
|
|||
.map(AddMaildirMessage::new_boxed)
|
||||
});
|
||||
}
|
||||
#[cfg(feature = "notmuch")]
|
||||
Some(BackendKind::Notmuch) => {
|
||||
builder.set_add_message(|ctx| {
|
||||
ctx.notmuch.as_ref().map(AddNotmuchMessage::new_boxed)
|
||||
});
|
||||
}
|
||||
_ => (),
|
||||
};
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@ use clap::Parser;
|
|||
use email::message::move_::imap::MoveImapMessages;
|
||||
#[cfg(feature = "maildir")]
|
||||
use email::message::move_::maildir::MoveMaildirMessages;
|
||||
#[cfg(feature = "notmuch")]
|
||||
use email::message::move_::notmuch::MoveNotmuchMessages;
|
||||
use log::info;
|
||||
|
||||
#[cfg(feature = "account-sync")]
|
||||
|
@ -79,6 +81,12 @@ impl MessageMoveCommand {
|
|||
.map(MoveMaildirMessages::new_boxed)
|
||||
});
|
||||
}
|
||||
#[cfg(feature = "notmuch")]
|
||||
Some(BackendKind::Notmuch) => {
|
||||
builder.set_move_messages(|ctx| {
|
||||
ctx.notmuch.as_ref().map(MoveNotmuchMessages::new_boxed)
|
||||
});
|
||||
}
|
||||
_ => (),
|
||||
},
|
||||
)
|
||||
|
|
|
@ -4,6 +4,8 @@ use clap::Parser;
|
|||
use email::message::{get::imap::GetImapMessages, peek::imap::PeekImapMessages};
|
||||
#[cfg(feature = "maildir")]
|
||||
use email::{flag::add::maildir::AddMaildirFlags, message::peek::maildir::PeekMaildirMessages};
|
||||
#[cfg(feature = "notmuch")]
|
||||
use email::{flag::add::notmuch::AddNotmuchFlags, message::peek::notmuch::PeekNotmuchMessages};
|
||||
use log::info;
|
||||
use mml::message::FilterParts;
|
||||
|
||||
|
@ -133,6 +135,14 @@ impl MessageReadCommand {
|
|||
.map(AddMaildirFlags::new_boxed)
|
||||
});
|
||||
}
|
||||
#[cfg(feature = "notmuch")]
|
||||
Some(BackendKind::Notmuch) => {
|
||||
builder.set_peek_messages(|ctx| {
|
||||
ctx.notmuch.as_ref().map(PeekNotmuchMessages::new_boxed)
|
||||
});
|
||||
builder
|
||||
.set_add_flags(|ctx| ctx.notmuch.as_ref().map(AddNotmuchFlags::new_boxed));
|
||||
}
|
||||
_ => (),
|
||||
},
|
||||
)
|
||||
|
|
|
@ -4,6 +4,8 @@ use clap::Parser;
|
|||
use email::message::add::imap::AddImapMessage;
|
||||
#[cfg(feature = "maildir")]
|
||||
use email::message::add::maildir::AddMaildirMessage;
|
||||
#[cfg(feature = "notmuch")]
|
||||
use email::message::add::notmuch::AddNotmuchMessage;
|
||||
#[cfg(feature = "sendmail")]
|
||||
use email::message::send::sendmail::SendSendmailMessage;
|
||||
#[cfg(feature = "smtp")]
|
||||
|
@ -95,6 +97,12 @@ impl MessageReplyCommand {
|
|||
.map(AddMaildirMessage::new_boxed)
|
||||
});
|
||||
}
|
||||
#[cfg(feature = "notmuch")]
|
||||
Some(BackendKind::Notmuch) => {
|
||||
builder.set_add_message(|ctx| {
|
||||
ctx.notmuch.as_ref().map(AddNotmuchMessage::new_boxed)
|
||||
});
|
||||
}
|
||||
_ => (),
|
||||
};
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@ use clap::Parser;
|
|||
use email::message::add::imap::AddImapMessage;
|
||||
#[cfg(feature = "maildir")]
|
||||
use email::message::add::maildir::AddMaildirMessage;
|
||||
#[cfg(feature = "notmuch")]
|
||||
use email::message::add::notmuch::AddNotmuchMessage;
|
||||
use log::info;
|
||||
use std::io::{self, BufRead, IsTerminal};
|
||||
|
||||
|
@ -75,6 +77,12 @@ impl MessageSaveCommand {
|
|||
.map(AddMaildirMessage::new_boxed)
|
||||
});
|
||||
}
|
||||
#[cfg(feature = "notmuch")]
|
||||
Some(BackendKind::Notmuch) => {
|
||||
builder.set_add_message(|ctx| {
|
||||
ctx.notmuch.as_ref().map(AddNotmuchMessage::new_boxed)
|
||||
});
|
||||
}
|
||||
_ => (),
|
||||
},
|
||||
)
|
||||
|
|
|
@ -4,6 +4,8 @@ use clap::Parser;
|
|||
use email::message::add::imap::AddImapMessage;
|
||||
#[cfg(feature = "maildir")]
|
||||
use email::message::add::maildir::AddMaildirMessage;
|
||||
#[cfg(feature = "notmuch")]
|
||||
use email::message::add::notmuch::AddNotmuchMessage;
|
||||
#[cfg(feature = "sendmail")]
|
||||
use email::message::send::sendmail::SendSendmailMessage;
|
||||
#[cfg(feature = "smtp")]
|
||||
|
@ -84,6 +86,12 @@ impl MessageSendCommand {
|
|||
.map(AddMaildirMessage::new_boxed)
|
||||
});
|
||||
}
|
||||
#[cfg(feature = "notmuch")]
|
||||
Some(BackendKind::Notmuch) => {
|
||||
builder.set_add_message(|ctx| {
|
||||
ctx.notmuch.as_ref().map(AddNotmuchMessage::new_boxed)
|
||||
});
|
||||
}
|
||||
_ => (),
|
||||
};
|
||||
match send_message_kind {
|
||||
|
|
|
@ -4,6 +4,8 @@ use clap::Parser;
|
|||
use email::message::add::imap::AddImapMessage;
|
||||
#[cfg(feature = "maildir")]
|
||||
use email::message::add::maildir::AddMaildirMessage;
|
||||
#[cfg(feature = "notmuch")]
|
||||
use email::message::add::notmuch::AddNotmuchMessage;
|
||||
#[cfg(feature = "sendmail")]
|
||||
use email::message::send::sendmail::SendSendmailMessage;
|
||||
#[cfg(feature = "smtp")]
|
||||
|
@ -84,6 +86,12 @@ impl MessageWriteCommand {
|
|||
.map(AddMaildirMessage::new_boxed)
|
||||
});
|
||||
}
|
||||
#[cfg(feature = "notmuch")]
|
||||
Some(BackendKind::Notmuch) => {
|
||||
builder.set_add_message(|ctx| {
|
||||
ctx.notmuch.as_ref().map(AddNotmuchMessage::new_boxed)
|
||||
});
|
||||
}
|
||||
_ => (),
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue