Skip to content

TycheOrg/Tyche

Repository files navigation

Tyche

Project logo - a Cornucopia

Join the chat at https://gitter.im/TycheOrg/Tyche NuGet

Tyche was the Greek god of fortune. (In Rome she is know as Fortuna). Her symbol was the Cornucopia, hence the logo

Tyche can be used to generate random names for releases or anything else your ❤️ may desire.

Names are generated as pairs along the following theme: {morpheme} {item from a given (or randomized) category}. Each name that is generated is stored so as to ensure names are unique.

TOC

Contributions

Contributions are quite welcome. Please just read the Guidelines first.

General

If no source is provided then the default data source will be used.

API

Generate

This basic sample will use the default data set to create a name, using a random category.

var g = new Generator();

var name = g.Generate();

Category Specified

The generator will use the category provided to pick the second half of the name from.

var g = new Generator();

var name = g.Generate("Mammals");

No Fail on invalid category

If the category passed in is invalid, instead of failing a random category will be picked to use instead.

var g = new Generator();

var name = g.Generate("Non-existent Category", false);

GetAvailableCategories

Gets the list of categories available from the source.

var g = new Generator();

var allCategories = g.GetAvailableCategories();

SavePreviousNames

Persists the current list of previously generated name. The persistence model is defined by the source used when creating the generator.

var g = new Generator();

g.SavePreviousNames();

ResetPreviousNames

Clears the list of previously generated names that is currently held by the source. Do not rely on the source implementing a save within this method. Use it as shown in the sample.

var g = new Generator();

g.ResetPreviousNames();
g.SavePreviousNames();

Source

Please see the docs to learn about the Source api, and how to write your own.

Future

Please see the Roadmap to see what the future may hold for Tyche.

See Also

See TycheOrg home repo for a general road-map of the ecosystem.

License

This project is released under the MIT License.
Please refer to the LICENSE file for full details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages