add animal names for apps

This commit is contained in:
ghe0 2025-03-30 18:32:28 +03:00
parent 53cdf34bb6
commit 51ceb4a245
Signed by: ghe0
GPG Key ID: 451028EE56A0FBB4

@ -3,25 +3,26 @@ use rand::Rng;
pub fn random_app_name() -> String {
let mut rng = rand::thread_rng();
let random_index = rng.gen_range(0..77);
let adjective = ADJECTIVES[random_index].to_string();
let random_index = rng.gen_range(0..97);
let substantive = SUBSTANTIVES[random_index].to_string();
adjective + "-" + &substantive
let random_index = rng.gen_range(0..APP_ADJECTIVES.len());
let adjective = APP_ADJECTIVES[random_index].to_string();
let random_index = rng.gen_range(0..APP_SUBSTANTIVES.len());
let substantive = APP_SUBSTANTIVES[random_index].to_string();
let app_name = adjective + "-" + &substantive;
eprintln!("No app name specified! Using random app name: {}", app_name);
app_name
}
pub fn random_vm_name() -> String {
let mut rng = rand::thread_rng();
let random_index = rng.gen_range(0..77);
let adjective = ADJECTIVES[random_index].to_string();
let adjective = VM_ADJECTIVES[random_index].to_string();
let random_index = rng.gen_range(0..97);
let substantive = SUBSTANTIVES[random_index].to_string();
let substantive = VM_SUBSTANTIVES[random_index].to_string();
let vm_name = adjective + "-" + &substantive;
eprintln!("No hostname specified! Using random VM name: {}", vm_name);
vm_name
}
const ADJECTIVES: [&str; 77] = [
const VM_ADJECTIVES: [&str; 77] = [
"ancient",
"arcane",
"astromech",
@ -101,7 +102,7 @@ const ADJECTIVES: [&str; 77] = [
"wretched",
];
const SUBSTANTIVES: [&str; 97] = [
const VM_SUBSTANTIVES: [&str; 97] = [
"axe",
"bed",
"bag",
@ -200,3 +201,180 @@ const SUBSTANTIVES: [&str; 97] = [
"whetstone",
"wrench",
];
const APP_ADJECTIVES: [&str; 100] = [
"active",
"adaptable",
"adventurour",
"affectionate",
"alert",
"artistic",
"assertive",
"boundless",
"brave",
"broad-minded",
"calm",
"capable",
"careful",
"caring",
"cheerful",
"clever",
"comfortable",
"communicative",
"compassionate",
"conscientious",
"considerate",
"courageous",
"creative",
"curous",
"decisive",
"determined",
"diligent",
"dynamic",
"eager",
"energetic",
"entertaining",
"enthusiastic",
"exuberant",
"expressive",
"fabulous",
"fair-minded",
"fantastic",
"fearless",
"flexible thinker",
"frank",
"friendly",
"funny",
"generous",
"gentle",
"gregarious",
"happy",
"hard working",
"helpful",
"hilarious",
"honest",
"imaginative",
"independent",
"intellectual",
"intelligent",
"intuitive",
"inventive",
"joyous",
"kind",
"kind-hearted",
"knowledgable",
"level-headed",
"lively",
"loving",
"loyal",
"mature",
"modest",
"optimistic",
"outgoing",
"passionate",
"patient",
"persistent",
"philosophical",
"polite",
"practical",
"pro-active",
"productive",
"quick-witted",
"quiet",
"rational",
"receptive",
"reflective",
"reliable",
"resourceful",
"responsible",
"selective",
"self-confident",
"sensible",
"sensitive",
"skillful",
"straightforward",
"successful",
"thoughtful",
"trustworthy",
"understanding",
"versatile",
"vivacious",
"warm-hearted",
"willing",
"witty",
"wonderful",
];
const APP_SUBSTANTIVES: [&str; 70] = [
"kitten",
"puppy",
"bunny",
"hamster",
"chinchilla",
"goldfish",
"parakeet",
"duckling",
"fawn",
"piglet",
"lamb",
"foal",
"guinea-pig",
"hedgehog",
"squirrel",
"otter",
"panda-cub",
"koala",
"meerkat",
"ferret",
"turtle",
"chick",
"mouse",
"pony",
"seal",
"sloth",
"raccoon",
"calf",
"cub",
"joey",
"gerbil",
"sugar-glider",
"chickadee",
"parrotlet",
"pika",
"dove",
"lemur",
"red-panda",
"budgie",
"axolotl",
"penguin chick",
"shrew",
"fennec-fox",
"opossum",
"fox-kit",
"vole",
"dormouse",
"finch",
"canary",
"lovebird",
"seahorse",
"starfish",
"penguin",
"ladybug",
"butterfly",
"firefly",
"quokka",
"capybara",
"dachshund",
"newt",
"tadpole",
"salamander",
"cricket",
"corgi",
"pomeranian",
"maltese",
"cockatiel",
"chameleon",
"gecko",
"zebra",
];