Unbewohnte
3 years ago
5 changed files with 60 additions and 23 deletions
@ -1,2 +1,40 @@ |
|||||||
# fumosay |
# fumosay |
||||||
## Like cowsay, but with soft friends (ᗜˬᗜ) |
## Like cowsay, but with soft friends (ᗜˬᗜ) |
||||||
|
|
||||||
|
--- |
||||||
|
|
||||||
|
## Compile |
||||||
|
install Rust |
||||||
|
- [installation instructions](https://www.rust-lang.org/tools/install) |
||||||
|
|
||||||
|
clone this repository |
||||||
|
- `git clone https://github.com/Unbewohnte/fumosay` |
||||||
|
|
||||||
|
cd into cloned repo |
||||||
|
- `cd fumosay/` |
||||||
|
|
||||||
|
compile for your OS && Architecture |
||||||
|
- `cargo build --release` |
||||||
|
|
||||||
|
|
||||||
|
**or** |
||||||
|
|
||||||
|
## Download a pre-compiled version |
||||||
|
- [Download a version of your choice](https://github.com/Unbewohnte/fumosay/releases) |
||||||
|
|
||||||
|
--- |
||||||
|
|
||||||
|
## Use |
||||||
|
``` |
||||||
|
./fumosay [message] |
||||||
|
``` |
||||||
|
|
||||||
|
--- |
||||||
|
|
||||||
|
## TODO list |
||||||
|
|
||||||
|
- ❌ Add more fumos |
||||||
|
- ❌ Make it available to use other fumos |
||||||
|
- ❌ Improve message {box|bubble} |
||||||
|
- ❌ Create a {deb|rpm} package |
||||||
|
- ❌ Make an `install.sh` script |
||||||
|
@ -1,14 +0,0 @@ |
|||||||
/// Indicator of where the message should be in fumofile
|
|
||||||
pub const MESSAGE_INDICATOR: &str = "!message"; |
|
||||||
/// Fumofile name of the default fumo
|
|
||||||
pub const FUMO_DEFAULT: &str = "fumo.fumo";
|
|
||||||
|
|
||||||
/// Returns a resulting string with `MESSAGE_INDICATOR` replaced with given
|
|
||||||
/// `message`. If `MESSAGE_INDICATOR` is not present in fumofile - the
|
|
||||||
/// `message` will be added on the new line at the end of the fumofile.
|
|
||||||
pub fn sayify(fumofile_contents: &mut String, message: &str) -> String { |
|
||||||
if fumofile_contents.contains(MESSAGE_INDICATOR) { |
|
||||||
return fumofile_contents.replace(MESSAGE_INDICATOR,message); |
|
||||||
} |
|
||||||
return format!("{}\n{}", fumofile_contents, message); |
|
||||||
} |
|
Loading…
Reference in new issue