From c35c3c1a098e19bd1ade209d80a11e7d472027de Mon Sep 17 00:00:00 2001 From: Brady Fomegne Date: Tue, 24 Oct 2023 18:56:56 +0100 Subject: [PATCH] refactor: change the project name --- CHANGELOG.md | 50 ++++++------ Cargo.lock | 143 ++++++++++++++++++--------------- README.md | 30 +++---- config/Cargo.toml | 6 +- config/README.md | 4 +- config/data/config_sample.toml | 2 +- config/src/lib.rs | 2 +- engine/preprocessor/Cargo.toml | 6 +- engine/preprocessor/README.md | 2 +- engine/preprocessor/src/lib.rs | 8 +- engine/translator/Cargo.toml | 6 +- engine/translator/README.md | 4 +- engine/translator/src/lib.rs | 4 +- memory/Cargo.toml | 4 +- memory/src/lib.rs | 4 +- service/Cargo.toml | 16 ++-- service/src/convert.rs | 2 +- service/src/frontend.rs | 4 +- service/src/lib.rs | 16 ++-- service/src/main.rs | 4 +- 20 files changed, 165 insertions(+), 152 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91dc0e7..cd80d69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,68 +10,68 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.4.0] - 2023-09-16 ### Added -- Extension scripting via the Rhai scripting language. [(#68)](https://github.com/pythonbrad/clafrica/pull/68) -- Predication system. [(#72)](https://github.com/pythonbrad/clafrica/pull/72) & [(#75)](https://github.com/pythonbrad/clafrica/pull/75) -- Added a proper way to verify when the cursor is empty in the library. [(#86)](https://github.com/pythonbrad/clafrica/pull/86) +- Extension scripting via the Rhai scripting language. [(#68)](https://github.com/pythonbrad/afrim/pull/68) +- Predication system. [(#72)](https://github.com/pythonbrad/afrim/pull/72) & [(#75)](https://github.com/pythonbrad/afrim/pull/75) +- Added a proper way to verify when the cursor is empty in the library. [(#86)](https://github.com/pythonbrad/afrim/pull/86) ### Changed -- Split the clafrica into separate components (processor and translator). [(#72)](https://github.com/pythonbrad/clafrica/pull/72) +- Split afrim into separate components (processor and translator). [(#72)](https://github.com/pythonbrad/afrim/pull/72) ### Fixed -- Restricted the auto_capitalize by configuration file. [(#79)](https://github.com/pythonbrad/clafrica/pull/79) -- Improved sequence detection. [(#74)](https://github.com/pythonbrad/clafrica/pull/74) -- Improved error handling and made it more understandable. [(#69)](https://github.com/pythonbrad/clafrica/pull/69) +- Restricted the auto_capitalize by configuration file. [(#79)](https://github.com/pythonbrad/afrim/pull/79) +- Improved sequence detection. [(#74)](https://github.com/pythonbrad/afrim/pull/74) +- Improved error handling and made it more understandable. [(#69)](https://github.com/pythonbrad/afrim/pull/69) ## [0.3.1] - 2023-08-13 ### Added -- Implement the auto capitalization. [(#56)](https://github.com/pythonbrad/clafrica/pull/56) +- Implement the auto capitalization. [(#56)](https://github.com/pythonbrad/afrim/pull/56) ### Fixed -- Improve the pause/resume way via double pressing of CTRL key. [(#54)](https://github.com/pythonbrad/clafrica/pull/54) -- Drop function key F1-12 which was reserved for special purposes. [(#62)](https://github.com/pythonbrad/clafrica/pull/62) +- Improve the pause/resume way via double pressing of CTRL key. [(#54)](https://github.com/pythonbrad/afrim/pull/54) +- Drop function key F1-12 which was reserved for special purposes. [(#62)](https://github.com/pythonbrad/afrim/pull/62) ## [0.3.0] - 2023-06-02 ### Added -- Reserved function key F1-12 for special purposes. [(#52)](https://github.com/pythonbrad/clafrica/pull/52) -- Add a pause/resume way via double pressing of CTRL key [(#50)](https://github.com/pythonbrad/clafrica/pull/50) & [(#49)](https://github.com/pythonbrad/clafrica/pull/49) +- Reserved function key F1-12 for special purposes. [(#52)](https://github.com/pythonbrad/afrim/pull/52) +- Add a pause/resume way via double pressing of CTRL key [(#50)](https://github.com/pythonbrad/afrim/pull/50) & [(#49)](https://github.com/pythonbrad/afrim/pull/49) ### Fixed -- (lib) Problem of endless sequence [(#44)](https://github.com/pythonbrad/clafrica/pull/44) -- Correct problem of excessive backspace [(#43)](https://github.com/pythonbrad/clafrica/pull/43) -- The Capslock key don't reset the cursor [(#45)](https://github.com/pythonbrad/clafrica/pull/45) +- (lib) Problem of endless sequence [(#44)](https://github.com/pythonbrad/afrim/pull/44) +- Correct problem of excessive backspace [(#43)](https://github.com/pythonbrad/afrim/pull/43) +- The Capslock key don't reset the cursor [(#45)](https://github.com/pythonbrad/afrim/pull/45) ## [0.2.2] - 2023-05-17 ### Fixed -- Correct logic of writing back of the previous out after backspace [(#39)](https://github.com/pythonbrad/clafrica/pull/39) +- Correct logic of writing back of the previous out after backspace [(#39)](https://github.com/pythonbrad/afrim/pull/39) ## [0.2.1] - 2023-05-15 ### Added -- Add a void frontend [(#33)](https://github.com/pythonbrad/clafrica/pull/33) -- Implement a config file [(#31)](https://github.com/pythonbrad/clafrica/pull/31) +- Add a void frontend [(#33)](https://github.com/pythonbrad/afrim/pull/33) +- Implement a config file [(#31)](https://github.com/pythonbrad/afrim/pull/31) ### Fixed -- Replace echap key by pause key since the purpose of the pause key is not related to input field [(#30)](https://github.com/pythonbrad/clafrica/pull/30) -- Fix problem of not human character input [(#29)](https://github.com/pythonbrad/clafrica/pull/29) +- Replace echap key by pause key since the purpose of the pause key is not related to input field [(#30)](https://github.com/pythonbrad/afrim/pull/30) +- Fix problem of not human character input [(#29)](https://github.com/pythonbrad/afrim/pull/29) ## [0.2.0] - 2023-05-09 ### Added -- Implement the initial binary application [(#8)](https://github.com/pythonbrad/clafrica/pull/8) -- (lib) Implement a cursor [(#6)](https://github.com/pythonbrad/clafrica/pull/6) -- (lib) Each node hold his key [(#16)](https://github.com/pythonbrad/clafrica/pull/16) -- (lib) Each node hold his depth on the tree [(#5)](https://github.com/pythonbrad/clafrica/pull/5) +- Implement the initial binary application [(#8)](https://github.com/pythonbrad/afrim/pull/8) +- (lib) Implement a cursor [(#6)](https://github.com/pythonbrad/afrim/pull/6) +- (lib) Each node hold his key [(#16)](https://github.com/pythonbrad/afrim/pull/16) +- (lib) Each node hold his depth on the tree [(#5)](https://github.com/pythonbrad/afrim/pull/5) ### Changed -- (lib) Rename bst to text_buffer [(#9)](https://github.com/pythonbrad/clafrica/pull/9) +- (lib) Rename bst to text_buffer [(#9)](https://github.com/pythonbrad/afrim/pull/9) ## [0.1.1] - 2023-04-28 diff --git a/Cargo.lock b/Cargo.lock index 6a604dd..48a317a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,17 +2,59 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "afrim" +version = "0.5.0" +dependencies = [ + "afrim-config", + "afrim-preprocessor", + "afrim-translator", + "clap", + "enigo", + "rdev", + "rstk", +] + +[[package]] +name = "afrim-config" +version = "0.4.1" +dependencies = [ + "rhai", + "serde", + "toml", +] + +[[package]] +name = "afrim-memory" +version = "0.3.2" + +[[package]] +name = "afrim-preprocessor" +version = "0.5.0" +dependencies = [ + "afrim-memory", + "keyboard-types", +] + +[[package]] +name = "afrim-translator" +version = "0.0.1" +dependencies = [ + "rhai", +] + [[package]] name = "ahash" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "cd7d5a2cecb58716e47d67d5703a249964b14c7be1ec3cad3affc295b2d1c35d" dependencies = [ "cfg-if", "const-random", "getrandom", "once_cell", "version_check", + "zerocopy", ] [[package]] @@ -96,47 +138,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "clafrica" -version = "0.5.0" -dependencies = [ - "clafrica-config", - "clafrica-preprocessor", - "clafrica-translator", - "clap", - "enigo", - "rdev", - "rstk", -] - -[[package]] -name = "clafrica-config" -version = "0.4.1" -dependencies = [ - "rhai", - "serde", - "toml", -] - -[[package]] -name = "clafrica-memory" -version = "0.3.2" - -[[package]] -name = "clafrica-preprocessor" -version = "0.5.0" -dependencies = [ - "clafrica-memory", - "keyboard-types", -] - -[[package]] -name = "clafrica-translator" -version = "0.0.1" -dependencies = [ - "rhai", -] - [[package]] name = "clap" version = "4.4.6" @@ -200,23 +201,21 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "const-random" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368a7a772ead6ce7e1de82bfb04c485f3db8ec744f72925af5735e29a22cc18e" +checksum = "11df32a13d7892ec42d51d3d175faba5211ffe13ed25d4fb348ac9e9ce835593" dependencies = [ "const-random-macro", - "proc-macro-hack", ] [[package]] name = "const-random-macro" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d7d6ab3c3a2282db210df5f02c4dab6e0a7057af0fb7ebd4070f30fe05c0ddb" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ "getrandom", "once_cell", - "proc-macro-hack", "tiny-keccak", ] @@ -380,9 +379,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" +checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" [[package]] name = "heck" @@ -477,12 +476,6 @@ version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - [[package]] name = "proc-macro2" version = "1.0.69" @@ -575,9 +568,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" +checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" dependencies = [ "serde", ] @@ -633,9 +626,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +checksum = "2ef75d881185fd2df4a040793927c153d863651108a93c7e17a9e591baa95cc6" dependencies = [ "serde", "serde_spanned", @@ -645,18 +638,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.20.2" +version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +checksum = "380f9e8120405471f7c9ad1860a713ef5ece6a670c7eae39225e477340f32fc4" dependencies = [ "indexmap", "serde", @@ -820,3 +813,23 @@ dependencies = [ "libc", "pkg-config", ] + +[[package]] +name = "zerocopy" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8db0ac2df3d060f81ec0380ccc5b71c2a7c092cfced671feeee1320e95559c87" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b6093bc6d5265ff40b479c834cdd25d8e20784781a2a29a8106327393d0a9ff" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/README.md b/README.md index 4135640..3ef03c2 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ -Clafrica +Afrim === - [![Changelog](https://img.shields.io/badge/Keep%20a%20Changelog--555.svg?logo=data%3Aimage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CAwIDAxNi0xMmwxLTJjNS05IDEzLTEzIDIzLTE2IDE2LTUgMzItMyA1MCA5IDEzIDggMjMgMjAgMzAgMzYgNyAxNSA3IDI5IDAgNDJ6bS00My03M2MtMTctOC0zMy02LTQ2IDUtMTAgOC0xNiAyMC0xOSAzN2E1NCA1NCAwIDAwNSAzNGM3IDE1IDIwIDIzIDM3IDIyIDIyLTEgMzgtOSA0OC0yNGE0MSA0MSAwIDAwOC0yNCA0MyA0MyAwIDAwLTEtMTJjLTYtMTgtMTYtMzEtMzItMzh6bS0yMyA5MWgtMWMtNyAwLTE0LTItMjEtN2EyNyAyNyAwIDAxLTEwLTEzIDU3IDU3IDAgMDEtNC0yMCA2MyA2MyAwIDAxNi0yNWM1LTEyIDEyLTE5IDI0LTIxIDktMyAxOC0yIDI3IDIgMTQgNiAyMyAxOCAyNyAzM3MtMiAzMS0xNiA0MGMtMTEgOC0yMSAxMS0zMiAxMXptMS0zNHYxNGgtOFY2OGg4djI4bDEwLTEwaDExbC0xNCAxNSAxNyAxOEg5NnoiLz48L3N2Zz4K)](https://github.com/pythonbrad/clafrica/blob/main/CHANGELOG.md) - [![crates.io](https://img.shields.io/crates/v/clafrica.svg)](https://crates.io/crates/clafrica) - [![LICENSE](https://img.shields.io/crates/l/clafrica.svg)](https://github.com/pythonbrad/clafrica/blob/main/LICENSE) - ![Rust](https://github.com/pythonbrad/clafrica/workflows/Rust/badge.svg) - [![docs.rs](https://docs.rs/clafrica/badge.svg)](https://docs.rs/clafrica) + [![Changelog](https://img.shields.io/badge/Keep%20a%20Changelog--555.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9IiNmMTVkMzAiIHZpZXdCb3g9IjAgMCAxODcgMTg1Ij48cGF0aCBkPSJNNjIgN2MtMTUgMy0yOCAxMC0zNyAyMmExMjIgMTIyIDAgMDAtMTggOTEgNzQgNzQgMCAwMD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zgtOSA0OC0yNGE0MSA0MSAwIDAwOC0yNCA0MyA0MyAwIDAwLTEtMTJjLTYtMTgtMTYtMzEtMzItMzh6bS0yMyA5MWgtMWMtNyAwLTE0LTItMjEtN2EyNyAyNyAwIDAxLTEwLTEzIDU3IDU3IDAgMDEtNC0yMCA2MyA2MyAwIDAxNi0yNWM1LTEyIDEyLTE5IDI0LTIxIDktMyAxOC0yIDI3IDIgMTQgNiAyMyAxOCAyNyAzM3MtMiAzMS0xNiA0MGMtMTEgOC0yMSAxMS0zMiAxMXptMS0zNHYxNGgtOFY2OGg4djI4bDEwLTEwaDExbC0xNCAxNSAxNyAxOEg5NnoiLz48L3N2Zz4K)](https://github.com/pythonbrad/afrim/blob/main/CHANGELOG.md) + [![crates.io](https://img.shields.io/crates/v/afrim.svg)](https://crates.io/crates/afrim) + [![LICENSE](https://img.shields.io/crates/l/afrim.svg)](https://github.com/pythonbrad/afrim/blob/main/LICENSE) + ![Rust](https://github.com/pythonbrad/afrim/workflows/Rust/badge.svg) + [![docs.rs](https://docs.rs/afrim/badge.svg)](https://docs.rs/afrim) [![Chat](https://img.shields.io/discord/1101565344692318320?logo=discord&logoColor=white)](https://discord.gg/C6TDEgzDzY) - [![Coverage Status](https://coveralls.io/repos/github/pythonbrad/clafrica/badge.svg?branch=main)](https://coveralls.io/github/pythonbrad/clafrica?branch=main) + [![Coverage Status](https://coveralls.io/repos/github/pythonbrad/afrim/badge.svg?branch=main)](https://coveralls.io/github/pythonbrad/afrim?branch=main) - Clafrica (a.k.a clafrica-rs) is an input method for African languages. It's designed to make it easier for people who speak African languages to type on their computers. + Afrim is an input method for African languages. It's designed to make it easier for people who speak African languages to type on their computers. License --- @@ -39,19 +39,19 @@ Runtime dependencies (Linux only) In using cargo --- - `cargo install clafrica` + `cargo install afrim` Try it in the console --- - `clafrica` comes with a REPL application which can be used to test if his library is working. - To use the clafrica, simply provide the path of the datafile that suit your needs. + `afrim` comes with a REPL application which can be used to test if his library is working. + To use the afrim, simply provide the path of the datafile that suit your needs. - Eg. `clafrica configfile.toml` + Eg. `afrim configfile.toml` Dataset === Official: - - [Clafrica Code](https://github.com/pythonbrad/clafrica-data): Maintened by [Resulam](http://resulam.com). + - [Afrim Code](https://github.com/pythonbrad/afrim-data): Maintened by [Resulam](http://resulam.com). Community: - Feel free to propose your own. @@ -60,7 +60,7 @@ Frontends === Official: - - [clafrica-wish](https://github.com/pythonbrad/clafrica-wish): Frontend for desktop environment. + - [afrim-wish](https://github.com/pythonbrad/afrim-wish): Frontend for desktop environment. Community: - Feel free to propose your own. @@ -68,7 +68,7 @@ Frontends Similar works === - - [clafrica](https://github.com/H-Theking/clafrica): Python version + - [afrim](https://github.com/H-Theking/clafrica): Python version Contributing === diff --git a/config/Cargo.toml b/config/Cargo.toml index 34e7fa3..d08a442 100644 --- a/config/Cargo.toml +++ b/config/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "clafrica-config" +name = "afrim-config" version = "0.4.1" edition = "2021" -description = "Handle the configuration of the clafrica input method." +description = "Handle the configuration of the afrim input method." keywords = ["ime", "config"] -repository = "https://github.com/pythonbrad/clafrica" +repository = "https://github.com/pythonbrad/afrim" license = "MIT" readme = "README.md" authors = ["Brady Fomegne "] diff --git a/config/README.md b/config/README.md index 205660b..f0e7bcf 100644 --- a/config/README.md +++ b/config/README.md @@ -1,2 +1,2 @@ -# Clafrica Config Manager -Manage the configuration of the clafrica input method. +# Afrim Config Manager +Manage the configuration of the afrim input method. diff --git a/config/data/config_sample.toml b/config/data/config_sample.toml index 688de45..f8114f6 100644 --- a/config/data/config_sample.toml +++ b/config/data/config_sample.toml @@ -1,4 +1,4 @@ -# Main clafrica config file +# Main afrim config file [core] buffer_size = 64 diff --git a/config/src/lib.rs b/config/src/lib.rs index d54040c..49aa1a9 100644 --- a/config/src/lib.rs +++ b/config/src/lib.rs @@ -1,4 +1,4 @@ -//! Library to manage the configuration of the clafrica input method. +//! Library to manage the configuration of the afrim input method. //! #![deny(missing_docs)] diff --git a/engine/preprocessor/Cargo.toml b/engine/preprocessor/Cargo.toml index 48d5926..f9c5df1 100644 --- a/engine/preprocessor/Cargo.toml +++ b/engine/preprocessor/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "clafrica-preprocessor" +name = "afrim-preprocessor" version = "0.5.0" edition = "2021" description = "A preprocessor to process keyboard events for an input method." keywords = ["ime", "processor", "keyboard"] -repository = "https://github.com/pythonbrad/name" +repository = "https://github.com/pythonbrad/afrim" license = "MIT" readme = "README.md" authors = ["Brady Fomegne "] @@ -13,4 +13,4 @@ authors = ["Brady Fomegne "] [dependencies] keyboard-types = "0.7.0" -clafrica-memory = { version = "0.3.2", path = "../../memory" } +afrim-memory = { version = "0.3.2", path = "../../memory" } diff --git a/engine/preprocessor/README.md b/engine/preprocessor/README.md index 136ed20..aff93cd 100644 --- a/engine/preprocessor/README.md +++ b/engine/preprocessor/README.md @@ -1,2 +1,2 @@ -# Clafrica Preprocessor +# Afrim Preprocessor It generate a sequence of command to be perform to execute a particular task. diff --git a/engine/preprocessor/src/lib.rs b/engine/preprocessor/src/lib.rs index 44e50ce..c631b5a 100644 --- a/engine/preprocessor/src/lib.rs +++ b/engine/preprocessor/src/lib.rs @@ -3,7 +3,7 @@ //! Example //! //! ```rust -//! use clafrica_preprocessor::{utils, Command, Preprocessor}; +//! use afrim_preprocessor::{utils, Command, Preprocessor}; //! use keyboard_types::{ //! webdriver::{self, Event}, //! Key::*, @@ -44,8 +44,8 @@ mod message; pub use crate::message::Command; -pub use clafrica_memory::utils; -use clafrica_memory::{Cursor, Node}; +pub use afrim_memory::utils; +use afrim_memory::{Cursor, Node}; pub use keyboard_types::{Key, KeyState, KeyboardEvent}; use std::collections::VecDeque; @@ -234,7 +234,7 @@ mod tests { #[test] fn test_commit() { - use clafrica_memory::Node; + use afrim_memory::Node; use keyboard_types::KeyboardEvent; let mut preprocessor = Preprocessor::new(Node::default(), 8); diff --git a/engine/translator/Cargo.toml b/engine/translator/Cargo.toml index 3cda528..0c4a231 100644 --- a/engine/translator/Cargo.toml +++ b/engine/translator/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "clafrica-translator" +name = "afrim-translator" version = "0.0.1" edition = "2021" -description = "Manage the predication system of the clafrica input method." +description = "Manage the predication system of the afrim input method." keywords = ["auto-complete", "ime", "predication"] -repository = "https://github.com/pythonbrad/name" +repository = "https://github.com/pythonbrad/afrim" license = "MIT" readme = "README.md" authors = ["Brady Fomegne "] diff --git a/engine/translator/README.md b/engine/translator/README.md index df5e8fb..95e0641 100644 --- a/engine/translator/README.md +++ b/engine/translator/README.md @@ -1,2 +1,2 @@ -# Clafrica Translator -Handle the predication system of the clafrica input method. +# Afrim Translator +Handle the predication system for an input method. diff --git a/engine/translator/src/lib.rs b/engine/translator/src/lib.rs index 04f56f9..f02555f 100644 --- a/engine/translator/src/lib.rs +++ b/engine/translator/src/lib.rs @@ -3,8 +3,8 @@ //! Example //! ```rust //! #[cfg(feature = "rhai")] -//! use clafrica_translator::Engine; -//! use clafrica_translator::Translator; +//! use afrim_translator::Engine; +//! use afrim_translator::Translator; //! use std::collections::HashMap; //! //! // Translation via dictionary diff --git a/memory/Cargo.toml b/memory/Cargo.toml index 2b4309b..7fe7e6b 100644 --- a/memory/Cargo.toml +++ b/memory/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "clafrica-memory" +name = "afrim-memory" version = "0.3.2" edition = "2021" description = "Make the handle of sequential codes easier for an input method." keywords = ["ime", "memory", "data-structure"] -repository = "https://github.com/pythonbrad/name" +repository = "https://github.com/pythonbrad/afrim" license = "MIT" readme = "README.md" authors = ["Brady Fomegne "] diff --git a/memory/src/lib.rs b/memory/src/lib.rs index b194f8e..e7da312 100644 --- a/memory/src/lib.rs +++ b/memory/src/lib.rs @@ -3,7 +3,7 @@ //! //! Example //! ``` -//! use clafrica_memory::*; +//! use afrim_memory::*; //! use std::fs; //! //! // Build a TextBuffer @@ -17,7 +17,7 @@ //! //! // or directly from a file //! let data = fs::read_to_string("./data/sample.txt") -//! .expect("Failed to load the clafrica code file"); +//! .expect("Failed to load the code file"); //! let data = utils::load_data(&data); //! utils::build_map(data); //! diff --git a/service/Cargo.toml b/service/Cargo.toml index c151c43..c471abd 100644 --- a/service/Cargo.toml +++ b/service/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "clafrica" +name = "afrim" version = "0.5.0" edition = "2021" -description = "Core library of the clafrica input method." +description = "Core library of the afrim input method." keywords = ["ime", "keyboard"] -repository = "https://github.com/pythonbrad/name" +repository = "https://github.com/pythonbrad/afrim" license = "MIT" readme = "../README.md" authors = ["Brady Fomegne "] @@ -13,19 +13,19 @@ authors = ["Brady Fomegne "] [[bin]] doc = false -name = "clafrica" +name = "afrim" path = "./src/main.rs" [features] default = ["rhai"] -rhai = ["clafrica-config/rhai", "clafrica-translator/rhai"] +rhai = ["afrim-config/rhai", "afrim-translator/rhai"] [dependencies] clap = { version = "4.4.6", features = ["derive"] } enigo = "0.1.3" -clafrica-config = { version = "0.4.1", path = "../config", default-features = false } -clafrica-preprocessor = { version = "0.5.0", path = "../engine/preprocessor" } -clafrica-translator = { version = "0.0.1", path = "../engine/translator", default-features = false } +afrim-config = { version = "0.4.1", path = "../config", default-features = false } +afrim-preprocessor = { version = "0.5.0", path = "../engine/preprocessor" } +afrim-translator = { version = "0.0.1", path = "../engine/translator", default-features = false } rdev = "0.5.3" [dev-dependencies] diff --git a/service/src/convert.rs b/service/src/convert.rs index 6a6014a..1f45363 100644 --- a/service/src/convert.rs +++ b/service/src/convert.rs @@ -4,7 +4,7 @@ #![deny(missing_docs)] -use clafrica_preprocessor::{Key, KeyState, KeyboardEvent}; +use afrim_preprocessor::{Key, KeyState, KeyboardEvent}; use enigo::{self}; use rdev::{self}; diff --git a/service/src/frontend.rs b/service/src/frontend.rs index ba88278..c483fab 100644 --- a/service/src/frontend.rs +++ b/service/src/frontend.rs @@ -1,9 +1,9 @@ -//! API to develop a frontend interface for the clafrica. +//! API to develop a frontend interface for the afrim. //! #![deny(missing_docs)] -/// Trait that every clafrica frontend should implement. +/// Trait that every afrim frontend should implement. pub trait Frontend { /// Update the frontenfrontend d size. fn update_screen(&mut self, _screen: (u64, u64)) {} diff --git a/service/src/lib.rs b/service/src/lib.rs index 2a23651..05ec10d 100644 --- a/service/src/lib.rs +++ b/service/src/lib.rs @@ -1,15 +1,15 @@ mod convert; pub mod frontend; -pub use clafrica_config::Config; -use clafrica_preprocessor::{utils, Command, Preprocessor}; -use clafrica_translator::Translator; +pub use afrim_config::Config; +use afrim_preprocessor::{utils, Command, Preprocessor}; +use afrim_translator::Translator; use enigo::{Enigo, KeyboardControllable}; use frontend::Frontend; use rdev::{self, EventType, Key as E_Key}; use std::{error, sync::mpsc, thread}; -/// Start the clafrica. +/// Start the afrim. pub fn run(config: Config, mut frontend: impl Frontend) -> Result<(), Box> { let map = utils::build_map( config @@ -198,7 +198,7 @@ mod tests { }; } - fn start_clafrica() { + fn start_afrim() { use std::path::Path; let test_config = Config::from_file(Path::new("./data/test.toml")).unwrap(); @@ -210,7 +210,7 @@ mod tests { fn start_sandbox() -> rstk::TkText { let root = rstk::trace_with("wish").unwrap(); - root.title("Clafrica Test Environment"); + root.title("Afrim Test Environment"); let input_field = rstk::make_text(&root); input_field.width(50); @@ -234,8 +234,8 @@ mod tests { // To detect excessive backspace const LIMIT: &str = "bbb"; - // Start the clafrica - start_clafrica(); + // Start the afrim + start_afrim(); // Start the sandbox let textfield = start_sandbox(); diff --git a/service/src/main.rs b/service/src/main.rs index eaa430c..bf6089a 100644 --- a/service/src/main.rs +++ b/service/src/main.rs @@ -1,8 +1,8 @@ -use clafrica::{frontend, run, Config}; +use afrim::{frontend, run, Config}; use clap::Parser; use std::process; -/// Clafrica CLI. +/// Afrim CLI. #[derive(Parser)] #[command(author, version, about, long_about = None)] struct Args {