name_maker 0.1.1

Generates random name for a person or a group of person.
Documentation
  • Coverage
  • 72.22%
    13 out of 18 items documented2 out of 12 items with examples
  • Size
  • Source code size: 114.22 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.21 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 15s Average build duration of successful builds.
  • all releases: 15s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • marshblocker/name_maker
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • marshblocker

name_maker

Generates name for a random person, a group of people, or a family.

What's new with Version 0.1.1

Added command-line support.

Install

Add the following line below the Dependency section in your Cargo.toml file:

name_maker = "0.1.1"

Usage

use name_maker::RandomNameGenerator;
use name_maker::Gender;

let rng = RandomNameGenerator::init();

// Prints a random name composed of first name and last name.
println!("{}", rng.generate()); 

// Prints a random name with a masculine first name.
println!("{}", rng.generate_specific(Gender::Male));

// Returns a vector with 5 random names.
let random_names = rng.generate_many(5);

// Returns a vector with 5 random names with feminine first names.
let random_girls = rng.generate_many_specific(0, 5);

// Returns a vector with 5 random names with similar last name.
// The first and second element are the "parents" and the succeeding
// elements are their "children".
let family = rng.generate_family(3);

// It is also possible to specify the number of male and female children
// in the family. In this example, the family have 5 boys and 1 girl.
let good_luck_courting_her = rng.generate_family_specific(5, 1);

For more info, visit the official API documentation.

Command-line Support

All the library's functionalities can be called directly from the command-line. Just install its binary executable using cargo install name_maker, and run name_maker -h to see the different options for executing the command:

USAGE:
        name_maker -h|--help
        name_maker [amount]
        name_maker -m|--male|-f|--female [amount]
        name_maker -M|--many|-F|--family [amount|male_amount female_amount]

Credits