diff --git a/CHANGELOG.md b/CHANGELOG.md index ae9dab4..4faabf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,94 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -## [0.0.9] - 2023-06-24 +## [0.1.0] - 2023-08-23 ### Added -- Added preset option `preset` to get preconfigured timer. Available options: `pomodoro`, `52/17`. -- Added preset option `cycles-count` to control how the timer loops. `0` means infinite, whereas any integer makes the timer stop automatically after n loops. -- Added preset option `timer-precision` to customize the timer format. Available options: `second`, `minute` (default), `hour`. +- Added `compile` and `interpret` feature from [mml-lib]. -## [0.0.8] - 2023-05-18 +[mml-lib]: https://crates.io/crates/mml-lib -### Changed - -- Changed the aim of the project. The timer is not Pomodoro-specific anymore, it became generic (which allows you to turn it into a Pomodoro timer, or whatever). -- Changed hooks name from `timer-started-hook` to `on-timer-start` and so on. - -## [0.0.7] - 2023-04-24 - -### Added - -- Add `zip` archive to releases. - -## [0.0.6] - 2023-04-21 - -### Changed - -- Improved cross compilation. - -## [0.0.5] - 2023-04-20 - -### Changed - -- Replaced `pimalaya` by `pimalaya-pomodoro`. - -### Removed - -- Removed durations and hooks from `TcpConfig`, since they conflicted with the ones from the main config. - -## [0.0.4] - 2023-04-14 - -### Fixed - -- Fixed hooks not triggered properly. - -## [0.0.3] - 2023-04-14 - -### Added - -- Added hooks support (check https://docs.rs/comodoro/0.0.3/comodoro/config/struct.HooksConfig.html for the list of available hooks). - -### Changed - -- Improve the way the timer is displayed via the `get` command. - -## [0.0.2] - 2023-04-10 - -### Changed - -- Rewrote the project in Rust, using the [Pimalaya](https://git.sr.ht/~soywod/pimalaya) library. - -## [0.0.1] - 2020-12-15 - -### Added - -- Added installation script. -- Added `.mli` files [#2]. - -### Changed - -- Improved README [#8]. -- Made timers customizable [#4]. - -### Fixed - -- Fixed OS specific `tmp` and `xdg` dirs [#3]. -- Fixed missing CI artifacts from releases [#6]. - -[Unreleased]: https://github.com/soywod/comodoro/compare/v0.0.8...master -[0.0.8]: https://github.com/soywod/comodoro/compare/v0.0.7...v0.0.8 -[0.0.7]: https://github.com/soywod/comodoro/compare/v0.0.6...v0.0.7 -[0.0.6]: https://github.com/soywod/comodoro/compare/v0.0.5...v0.0.6 -[0.0.5]: https://github.com/soywod/comodoro/compare/v0.0.4...v0.0.5 -[0.0.4]: https://github.com/soywod/comodoro/compare/v0.0.3...v0.0.4 -[0.0.3]: https://github.com/soywod/comodoro/compare/v0.0.2...v0.0.3 -[0.0.2]: https://github.com/soywod/comodoro/compare/v0.0.1...v0.0.2 -[0.0.1]: https://github.com/soywod/comodoro/releases/tag/v0.0.1 - -[#2]: https://github.com/soywod/comodoro/issues/2 -[#3]: https://github.com/soywod/comodoro/issues/3 -[#4]: https://github.com/soywod/comodoro/issues/4 -[#6]: https://github.com/soywod/comodoro/issues/6 -[#8]: https://github.com/soywod/comodoro/issues/8 +[Unreleased]: https://github.com/soywod/mml/compare/v0.1.0...master +[0.1.0]: https://github.com/soywod/mml/releases/tag/v0.1.0 diff --git a/Cargo.lock b/Cargo.lock index 1674836..6a091ec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1461,7 +1461,8 @@ dependencies = [ [[package]] name = "mml-lib" version = "0.1.0" -source = "git+https://git.sr.ht/~soywod/pimalaya#078b88371df44f3b64ddc45e25d317a67eb5df22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "660e8feeb44bc9b09f20a93f4d7ae7ca853034d2ff4009bb94b4b299837fd4be" dependencies = [ "async-recursion", "chumsky", @@ -1470,8 +1471,8 @@ dependencies = [ "mail-builder", "mail-parser", "nanohtml2text", + "pgp-lib", "pimalaya-keyring", - "pimalaya-pgp", "pimalaya-process", "pimalaya-secret", "shellexpand 2.1.2", @@ -1721,19 +1722,10 @@ dependencies = [ ] [[package]] -name = "pimalaya-keyring" -version = "0.0.6-beta" -source = "git+https://git.sr.ht/~soywod/pimalaya#078b88371df44f3b64ddc45e25d317a67eb5df22" -dependencies = [ - "keyring", - "log", - "thiserror", -] - -[[package]] -name = "pimalaya-pgp" +name = "pgp-lib" version = "0.0.1" -source = "git+https://git.sr.ht/~soywod/pimalaya#078b88371df44f3b64ddc45e25d317a67eb5df22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c819c823fe6bf0fd218ba918d2fd67f26db43850733408dcff2cb9f6c0570f42" dependencies = [ "async-recursion", "futures", @@ -1750,10 +1742,22 @@ dependencies = [ "z-base-32", ] +[[package]] +name = "pimalaya-keyring" +version = "0.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac7b7da6f9ce8a647ab83dda8cfd657dc0acb62e6ac1edd95f3b434341fadb03" +dependencies = [ + "keyring", + "log", + "thiserror", +] + [[package]] name = "pimalaya-process" -version = "0.0.6-beta" -source = "git+https://git.sr.ht/~soywod/pimalaya#078b88371df44f3b64ddc45e25d317a67eb5df22" +version = "0.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a9d1e1ab6334d4e4d06613cd65f3fed34e5d2d7b1488f3d1a0d2fdffdba5d1c" dependencies = [ "log", "thiserror", @@ -1762,8 +1766,9 @@ dependencies = [ [[package]] name = "pimalaya-secret" -version = "0.0.6-beta" -source = "git+https://git.sr.ht/~soywod/pimalaya#078b88371df44f3b64ddc45e25d317a67eb5df22" +version = "0.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "966d3dd6e8d9dd39ac80c20597d68b47eb5170c968fbe3ebbb425fca530037f6" dependencies = [ "log", "pimalaya-keyring", diff --git a/Cargo.toml b/Cargo.toml index 9f3b3df..aa78d9a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,5 +51,5 @@ clap_complete = "4.3" clap_mangen = "0.2" # mml -mml-lib.git = "https://git.sr.ht/~soywod/pimalaya" +mml-lib.version = "=0.1.0" mml-lib.default-features = false diff --git a/flake.nix b/flake.nix index 5d6734f..243332d 100644 --- a/flake.nix +++ b/flake.nix @@ -35,6 +35,9 @@ in { default = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + pkg-config + ]; buildInputs = with pkgs; [ # Nix rnix-lsp diff --git a/src/mml/handlers.rs b/src/mml/handlers.rs index a6355f1..653ea80 100644 --- a/src/mml/handlers.rs +++ b/src/mml/handlers.rs @@ -4,10 +4,10 @@ )] use anyhow::{Context, Result}; +#[cfg(feature = "interpreter")] +use mml::MimeInterpreter; #[cfg(feature = "compiler")] use mml::MmlCompiler; -#[cfg(feature = "interpreter")] -use mml::MmlInterpreter; #[cfg(feature = "compiler")] pub async fn compile(mml: String) -> Result<()> { @@ -22,7 +22,7 @@ pub async fn compile(mml: String) -> Result<()> { #[cfg(feature = "interpreter")] pub async fn interpret(mime: String) -> Result<()> { - let mml = MmlInterpreter::new() + let mml = MimeInterpreter::new() .interpret_bytes(mime.as_bytes()) .await .context("cannot interpreter mime message")?;