Skip to content
/ nomina Public

A tool to generate names of characters, cities, towns, etc. to help with D&D world building

License

Notifications You must be signed in to change notification settings

opendnd/nomina

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Mar 1, 2020
bed2f47 · Mar 1, 2020

History

35 Commits
Mar 1, 2020
Mar 1, 2020
Mar 1, 2020
Mar 4, 2017
Dec 17, 2017
Mar 1, 2020
Mar 4, 2017
Mar 4, 2017
Jun 10, 2018
Mar 1, 2020
Mar 1, 2020
Mar 1, 2020
Mar 1, 2020

Repository files navigation

nomina

NPM

Build Status

This is a tool for generating names for characters with a wide variety.

Installation

You will need node and npm installed. Then do:

npm install -g nomina

Generate a name

Once you have installed nomina you can generate a name by simply running the following:

nomina

Options

Theme

nomina --theme medieval

To see the available name types you can do nomina list

Gender

nomina --type female

You can specify a gender by setting either male or female (or for convenience m / f) or you can specify a city/town name by passing dominia.

Module Usage

const Nomina = require('nomina');
const nomina = new Nomina();

// specify options, none are required
const options = {
  theme: 'medieval',
  type: 'female',
};

// call the method
const result = nomina.generate(options);

// get all themes available
const themes = nomina.getThemes();

Custom Configs

There are a couple of ways you can configure the themes that the tool uses:

CLI Config

The CLI checks for ~/.dnd/nomina/defaults.js before loading any other configuration. Simply add a file here while using the tool and you can customize the themes.

Class Config

You can pass a "defaults" config directly to the class on initialization:

const Nomina = require('nomina');
const defaults = {
  themes: {
    myCustomTheme: {
      male: [],
      female: [],
      dominia: [],
    },
    myOtherCustomTheme: {
      male: [],
      female: [],
      dominia: [],
    },
  },
};

const nomina = new Nomina({ defaults });
const themes = nomina.getThemes(); // ['myCustomTheme', 'myOtherCustomTheme']

Developing

To develop nomina,

git clone https://github.com/opendnd/nomina.git
cd nomina/
npm install

Contributing

If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are welcome!

Nomina use the Airbnb javascript style.

Licensing

MIT