Coder Social home page Coder Social logo

random-name-generator's Introduction

Random Name Generator

Overview

The Random Name Generator is a Python script designed to generate random names by combining words from a given wordlist. By default, the script uses the 'EFF's Long Wordlist', which can be found at https://www.eff.org/dice. This tool is useful for generating unique identifiers, character names for games or stories, or any other purpose where random, meaningful names are needed.

Features

  • Generate random names by combining a specified number of words.
  • Uses 'EFF's Long Wordlist' by default, with support for both local JSON wordlists and remote wordlists via URLs.
  • Customizable word count and dividing character in generated names.
  • Customizable number of names to generate.
  • Includes a test wordlist for quick setup and testing.

Getting Started

Prerequisites

  • Python 3.x
  • requests library for Python (for handling remote wordlists)

Installation

Clone the repository to your local machine:

git clone https://github.com/pjburnhill/random-name-generator.git
cd random-name-generator

Usage

Run the script with Python, optionally providing parameters for customization:

python random_name_generator.py [--num-words NUM_WORDS] [--dividing-character DIVIDING_CHARACTER] [--wordlist WORDLIST] [--num-names NUM_NAMES]
  • --num-words: Number of words to use in each generated name (default: 3)
  • --dividing-character: Character to use for dividing words in the name (default: '-')
  • --wordlist: Path to a local JSON file or URL of the wordlist (default: EFF wordlist)
  • --num-names: Number of names to generate (default: 1)

Test Wordlist

The repository includes a test wordlist located at data/words.json for local testing. This JSON file contains a small list of words:

[
  "word1",
  "word2",
  "word3",
  "word4",
  "word5",
  "word6",
  "word7",
  "word8",
  "word9",
  "word10"
]

You can use this file by specifying --wordlist data/words.json when running the script.

License

This project is open-source and available under the MIT License.

random-name-generator's People

Contributors

pjburnhill avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.