Skip to content

Commit

Permalink
Change project name (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
pythonbrad authored Oct 24, 2023
1 parent 3694a94 commit d59e0af
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 55 deletions.
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
<div align="center">

<h1>The Clafrica Book</h1>
<h1>The Afrim Book</h1>

<strong>This small book describes how to use clafrica.</strong>
<strong>This small book describes how to use afrim.</strong>

<h3>
<a href="https://pythonbrad.github.io/clafrica-man/">Read the Book</a>
<a href="https://pythonbrad.github.io/afrim-man/">Read the Book</a>
<span> | </span>
<a href="https://github.com/pythonbrad/clafrica/blob/main/CONTRIBUTING.md">Contributing</a>
<a href="https://github.com/pythonbrad/afrim-man/blob/main/CONTRIBUTING.md">Contributing</a>
<span> | </span>
<a href="https://discord.gg/vybUPCFV">Chat</a>
</h3>

<sub>Built with 🦀🕸</sub>
</div>

## About

This repo contains documentation on using clafrica, how
to get started and more as you dive deeper. It acts as a guide for doing some really neat things with clafrica.
This repo contains documentation on using afrim, how
to get started and more as you dive deeper. It acts as a guide for doing some really neat things with afrim.

If you would like to start learning how to use clafrica,
If you would like to start learning how to use afrim,
you can read the book [online here][book].

[Open issues for improving the Clafrica book.][book-issues]
Expand Down Expand Up @@ -64,5 +63,5 @@ to read them then you can read them from the `src` directory.

[mdbook]: https://github.com/rust-lang-nursery/mdBook
[rustup]: https://github.com/rust-lang-nursery/rustup.rs/
[book]: https://pythonbrad.github.io/clafrica-man
[book-issues]: https://github.com/pythonbrad/clafrica-man/issues
[book]: https://pythonbrad.github.io/afrim-man
[book-issues]: https://github.com/pythonbrad/afrim-man/issues
2 changes: 1 addition & 1 deletion book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ authors = ["Brady Fomegne"]
language = "en"
multilingual = false
src = "src"
title = "Clafrica Documentation"
title = "Afrim Documentation"
8 changes: 4 additions & 4 deletions src/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
Introduction
===

The clafrica is an input method originally designed for the clafrica code. Currently, the clafrica supports any sequencial coding system.
Afrim is an input method originally designed for the sequential code. Currently, the afrim supports any sequencial coding system.

- Support for any sequencial coding system.
- Suggestion and auto-completion.
- Written in [Rust](https://rust-lang.org) for speed, safety, and simplicity.
- Support for frontend interface.

This guide is a manual of usage of the clafrica input method.
This guide is a manual of usage of the afrim input method.

Contributing
---
clafrica is free and open source. You can find the code on [Github](https://github.com/pythonbrad/clafrica) and issues and feature requests can be posted on the [Github issue tracker](https://github.com/pythonbrad/clafrica/issues). clafrica relies on the community to fix bugs and add features: if you'd like to contribute, please read the [CONTRIBUTING](https://github.com/pythonbrad/clafrica) guide and consider opening a [pull request](https://github.com/pythonbrad/clafrica/pulls).
Afrim is free and open source. You can find the code on [Github](https://github.com/pythonbrad/afrim) and issues and feature requests can be posted on the [Github issue tracker](https://github.com/pythonbrad/afrim/issues). Afrim relies on the community to fix bugs and add features: if you'd like to contribute, please read the [CONTRIBUTING](https://github.com/pythonbrad/afrim) guide and consider opening a [pull request](https://github.com/pythonbrad/afrim/pulls).

License
---
The clafrica source code and documentation are released under the [MIT](https://github.com/pythonbrad/clafrica/LICENSE).
The afrim source code and documentation are released under the [MIT](https://github.com/pythonbrad/afrim/LICENSE).
2 changes: 1 addition & 1 deletion src/configuration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Supported configuration options
---
It's important to note that **any** relative path specified in the configuration will always be taken from the path where the configuration file is located.

- [Core](/configuration/core.md) configuration to modify the internal behavior of the clafrica.
- [Core](/configuration/core.md) configuration to modify the internal behavior of afrim.
- [Data](/configuration/data.md) configuration to setup a sequential coding system.
- [Translator](/configuration/translator.md) configuration for auto-suggestions.

6 changes: 3 additions & 3 deletions src/configuration/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Here is an example of what the core configuration might look like.

```toml
# clafrica/conf/conf.toml
# afrim/conf/conf.toml
[core]
buffer_size = 64
page_size = 16
Expand All @@ -13,8 +13,8 @@ auto_capitalize = false

- **buffer_size**: The memory allowed to the input text.
- **page_size**: The maximun number of suggestions that should be display.
- **auto_commit**: Tell to the clafrica if the first suggestion got, should be submitted or not.
- **auto_capitalize**: Tell to the clafrica to generate the capitalize version of the sequential coding system of the current configuration file.
- **auto_commit**: Tell to afrim if the first suggestion got, should be submitted or not.
- **auto_capitalize**: Tell to afrim to generate the capitalize version of the sequential coding system of the current configuration file.

**NB**: Only the core configuration at the root configuration file is considered (except for the `auto_capitalize` field who is file oriented).

15 changes: 5 additions & 10 deletions src/for_developers/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
For developers
===

While `clafrica` is mainly used as a binary application, you can also import the core library directly and use that to build your own input method. It also support the [Rhai scripting language](https://rhai.rs) for some customization.
While `afrim is mainly used as a binary application, you can also import the core library directly and use that to build your own input method. In this chapter, we will talk about how to customize the internal working of afrim. Afrim supports [Rhai scripting language](https://rhai.rs) for some customization.

The **For Developers** chapters are here to show you the more advanced usage of `clafrica`.
The **For Developers** chapters are here to show you the more advanced usage of `afrim`.

The two main ways a developer can hook into the clafrica working is via,
The two main ways a developer can hook into the afrim working is via,
- [Processor](./processor.md)
- [Translator](./translator.md)
- [Frontend](./frontend.md)

The Clafrica Working
Afrim Working
---
The working of the clafrica goes through several steps.
The working of afrim goes through several steps.

1. Listening keyboard events
- Identify the event
Expand All @@ -22,8 +22,3 @@ The working of the clafrica goes through several steps.
2. Return the predicates
3. Display useful information through the frontend interface

Using clafrica as a Library
---
The `clafrica` binary is based on the `clafrica-lib` crate, exposing its functionality as a input method engine. As such it is quite easy to create your own input method.

The easiest way to find out how to use the `clafrica-lib` crate is by looking at the [API Docs](https://docs.rs/clafrica-lib).
6 changes: 1 addition & 5 deletions src/for_developers/frontend.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
Frontend
===

A "frontend" is simply a API which `clafrica` will invoke to render some useful information to the user. Once the frontend receives this information, it is free to do whatever it wants.

We will not tell more about how to implement a frontend but you can consult the source of code of one of our [official frontend](https://github.com/pythonbrad/clafrica-wish) if you want.


Because the frontend is an internal feature of afrim, his customization don't depend on him. Hence, we will not cover it.
2 changes: 1 addition & 1 deletion src/for_developers/processor.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Processor

The processor is simply the part of the clafrica who manage the I/O operations via the keyboard, allowing you insert and remove character in the sequence. Possible use cases are:
The processor is simply the part of afrim who manage the I/O operations via the keyboard, allowing you insert and remove character in the sequence. Possible use cases are:
- Insert a character in the sequence.
- Clear the sequence.
- Commit the corresponding output of a sequence.
Expand Down
6 changes: 3 additions & 3 deletions src/for_developers/translator.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Translator
===

A "translator" is simply a program which `clafrica` will invoke during the translation process, allowing you to use programmable predictions. Possible use cases are:
A "translator" is simply a program which `afrim` will invoke during the translation process, allowing you to use programmable predictions. Possible use cases are:
- Auto-correction
- Auto-suggestion

The fact that clafrica utilizes [The Rhai Scripting Language](https://rhai.rs) makes it easy to implement a simple translator.
The fact that afrim utilizes [The Rhai Scripting Language](https://rhai.rs) makes it easy to implement a simple translator.

The following code block shows how to write a translator who suggest a date in another format.

Expand Down Expand Up @@ -41,7 +41,7 @@ fn parse_date(input) {

// Main function
fn translate(input) {
let data = core::parse_cmd(input);
let data = parse_cmd(input);
let date = parse_date(data);

if !date.is_empty() {
Expand Down
20 changes: 10 additions & 10 deletions src/guide/installation.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
Installation
===

There are multiple ways to install the clafrica input method. Choose any one of the methods below that best suit your needs.
There are multiple ways to install Afrim input method. Choose any one of the methods below that best suit your needs.

Pre-compiled binaries
---
Executable binaries are available for download on the [Github Releases page](https://github.com/pythonbrad/clafrica/releases). Download the binary for your platform (Windows, macOS, or Linux) and extract the archive. The archive contains an `clafrica` executable.
Executable binaries are available for download on the [Github Releases page](https://github.com/pythonbrad/afrim/releases). Download the binary for your platform (Windows, macOS, or Linux) and extract the archive. The archive contains an `afrim` executable.

To make it easier to run, put the path to the binary into your `PATH`.

Build from source using Rust
---
To build `clafrica` executable from source, you will first need to install Rust and Cargo. Follow the instructions on the [Rust installation page](https://www.rust-lang.org/tools/install). clafrica currently requires at least Rust version 1.7 for performance.
To build `afrim` executable from source, you will first need to install Rust and Cargo. Follow the instructions on the [Rust installation page](https://www.rust-lang.org/tools/install). Afrim currently requires at least Rust version 1.7 for performance.

Once you have installed Rust, the following command can be used to build and install clafrica:
Once you have installed Rust, the following command can be used to build and install afrim:

`cargo install clafrica`
`cargo install afrim`

This will automatically download clafrica from [crates.io](https://crates.io), build it, and install it in Cargo's global binary directory (~/.cargo/bin/ by default).
This will automatically download afrim from [crates.io](https://crates.io), build it, and install it in Cargo's global binary directory (~/.cargo/bin/ by default).

To uninstall, run the command `cargo uninstall clafrica`.
To uninstall, run the command `cargo uninstall afrim`.

Installing the latest master version
---
The version published to crates.io will ever so slightly be behind the version hosted on GitHub. If you need the lastest version, you can build the git version of clafrica yourself. Cargo makes this ***super easy***!
The version published to crates.io will ever so slightly be behind the version hosted on GitHub. If you need the lastest version, you can build the git version of afrim yourself. Cargo makes this ***super easy***!

`cargo install --git https://github.com/pythonbrad/clafrica.git clafrica`
`cargo install --git https://github.com/pythonbrad/afrim.git afrim`

Again, make sure to add the Cargo bin directory to your `PATH`.

If you are interested in making modifications to clafrica itself, checkout the [Contributing Guide](https://github.com/pythonbrad/clafrica) for more information.
If you are interested in making modifications to afrim itself, checkout the [Contributing Guide](https://github.com/pythonbrad/afrim) for more information.
6 changes: 3 additions & 3 deletions src/guide/usage.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Usage
===

Once you have the `clafrica` installed, you can use it.
Once you have the `afrim` installed, you can use it.
But before you should download or write your own configuration file.
You can download a official dataset via the [Clafrica Dataset Repository](https://github.com/pythonbrad/clafrica-data).
You can download a official dataset via the [Afrim Dataset Repository](https://github.com/pythonbrad/afrim-data).

Sample configuration file
---
Expand All @@ -23,4 +23,4 @@ Check out the [Configuration Guide](/configuration) for more information about h

Demo
---
Considering the sample configuration file above, you can run the clafrica with this command `clafrica config.toml`.
Considering the sample configuration file above, you can run the afrim with this command `afrim config.toml`.
2 changes: 1 addition & 1 deletion src/misc/contributors.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributors

- Brady Fomegne ([pythonbrad](https://github.com/pythonbrad))
Afrim was developed by Brady Fomegne ([pythonbrad](https://github.com/pythonbrad)).

5 changes: 2 additions & 3 deletions src/ressources.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Useful Ressources

Here is a list of useful link who can help for the configuration of the clafrica.
Here is a list of useful link who can help for the configuration of the afrim.
- [The Rust Programing Language](https://rust-lang.org)
- [The Rhai Scripting Language](https://rhai.rs)
- [Tom's Obvious Minimal Language](https://toml.io)
- [Clafrica Dataset](https://github.com/pythonbrad/clafrica-data)
- [Clafrica Wish](https://github.com/pythonbrad/clafrica-wish)
- [Afrim Dataset](https://github.com/pythonbrad/afrim-data)

0 comments on commit d59e0af

Please sign in to comment.