#names #utility

anarchist-readable-name-generator-lib

Generate a readable name from something with with famous anarchist writers

2 releases

Uses new Rust 2021

0.1.1 Feb 19, 2022
0.1.0 Feb 19, 2022

#258 in Testing

Download history 11/week @ 2022-03-11 37/week @ 2022-03-18 75/week @ 2022-03-25 43/week @ 2022-04-01 82/week @ 2022-04-08 156/week @ 2022-04-15 70/week @ 2022-04-22 148/week @ 2022-04-29 266/week @ 2022-05-06 85/week @ 2022-05-13 11/week @ 2022-05-20 21/week @ 2022-05-27 51/week @ 2022-06-03 103/week @ 2022-06-10 101/week @ 2022-06-17 141/week @ 2022-06-24

399 downloads per month
Used in readable-name-generator

CC0 license

475KB
3K SLoC

anarchist-readable-name-generator-lib

This library uses the authors from Anarchist Library to generate a random name

The intention here is to have a random name for situations you need to spin up some cloud compute resources and don't have a name in mind. Typically, for throwaway purposes.

Examples

It's possible to simply generate a random name

use anarchist_readable_name_generator_lib::readable_name;

assert!(readable_name().len() > 0)

You can also pass a seed or change the separator to give you predictability or minor customization.

use anarchist_readable_name_generator_lib::readable_name_custom;
use rand::prelude::*;
use rand_pcg::Pcg64;

let rng = Pcg64::seed_from_u64(2);
assert_eq!(
readable_name_custom("+", rng),
"engrossing+cazarabet"
);

Read more at Docs.rs


lib.rs:

This library uses the authors from Anarchist Library to generate a random name

The intention here is to have a random name for situations you need to spin up some cloud compute resources and don't have a name in mind. Typically, for throwaway purposes.

Examples

It's possible to simply generate a random name

use anarchist_readable_name_generator_lib::readable_name;

assert!(readable_name().len() > 0)

You can also pass a seed or change the separator to give you predictability or minor customization.

use anarchist_readable_name_generator_lib::readable_name_custom;
use rand::prelude::*;
use rand_pcg::Pcg64;

let rng = Pcg64::seed_from_u64(2);
assert_eq!(
   readable_name_custom("+", rng),
   "engrossing+cazarabet"
);

Dependencies

~320KB