No description
Find a file
2023-06-19 15:33:10 +02:00
examples modified default config and expanded docs 2023-06-14 20:06:05 +02:00
nimegeneratorpkg fixed package structure 2023-06-14 20:39:43 +02:00
tests added full executable support 2023-06-12 23:45:58 +02:00
.gitignore did some initial work, coffee break 2023-06-12 20:23:50 +02:00
LICENSE added docs and ready to push to public 2023-06-13 02:02:53 +02:00
nimegenerator fixed package structure 2023-06-14 20:39:43 +02:00
nimegenerator.nim fixed package structure 2023-06-14 20:39:43 +02:00
nimegenerator.nimble updated .nimble file 2023-06-14 20:09:17 +02:00
README.md Update README.md 2023-06-19 15:33:10 +02:00
update_docs.sh added docs and ready to push to public 2023-06-13 02:02:53 +02:00

NimeGenerator

nimegenerator is a random name/word generator.

How it works

A word is constructed letter by letter, substring by substring. Depending on the last letter, a random letter will be chosen to follow it.

Some letters have higher and lower chances to be chosen. This probabillity is for every letter each.

For example:

  • e is rarely followed by a or another e, but often followed by an r or l

  • p is rarely followed by n, but often followed by an e or a

These rules are hardcoded for defaults, but can be overridden with custom config files. Config files are json files and examples can be found in ./examples/!

Usage

This is a library-binary hybrid. This means you can build an executable for use in the terminal or import it into your own Nim projects.

Installation

  • nimble: nimble install nimegenerator

  • git: git clone https://github.com/nirokay/nimegenerator && cd nimegenerator && nimble install

Executable

# Prints 10 random words:
nimegenerator

# Prints 5 random words:
nimegenerator 5

# Help message:
nimegenerator --help
nimegenerator -h

# Version printout:
nimegenerator --version
nimegenerator -v

# Load custom config file and print random words:
nimegenerator --configfile:/path/to/file
nimegenerator -c:/path/to/file
nimegenerator -c:/path/to/file 10

Library

Simply import it like any other module!

import nimegenerator

echo generateWord()

Documentation

For detailed documentation, please visit the nim generated docs!