update readme
parent
8686a77190
commit
bbec80db43
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
incantata is a rust library that generates random words according to a provided structure
|
incantata is a rust library that generates random words according to a provided structure
|
||||||
|
|
||||||
|
there's also a cli, you can run it with `cargo r`. it will generate ten words every time you press enter
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
use incantata::*;
|
use incantata::*;
|
||||||
|
|
||||||
|
@ -18,8 +20,8 @@ fn main() {
|
||||||
// allowed characters for the nucleus
|
// allowed characters for the nucleus
|
||||||
nucleus_dict: VOCALS
|
nucleus_dict: VOCALS
|
||||||
.chars()
|
.chars()
|
||||||
.cycle()
|
// .cycle()
|
||||||
.take(VOCALS.len() * 5)
|
// .take(VOCALS.len() * 5)
|
||||||
// .chain(VOCALS_ACCENTS.chars())
|
// .chain(VOCALS_ACCENTS.chars())
|
||||||
.collect(),
|
.collect(),
|
||||||
|
|
||||||
|
@ -38,7 +40,7 @@ fn main() {
|
||||||
|
|
||||||
// generate 10 words
|
// generate 10 words
|
||||||
for _ in 0..10 {
|
for _ in 0..10 {
|
||||||
println!("{}", incantata(&s));
|
println!("{}", s.generate());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue