diff --git a/plugins/data/name_files/general.json b/plugins/data/name_files/general.json new file mode 100644 index 0000000..c163b7a --- /dev/null +++ b/plugins/data/name_files/general.json @@ -0,0 +1,199 @@ +{ + "name": "Generic names", + "author": "Johan Danforth", + "templates": { + "default": "{first}{mid}{final}" + }, + "default_templates": [ + "default" + ], + "parts": { + "final": [ + "a", + "and", + "b", + "bwyn", + "baen", + "bard", + "c", + "ctred", + "cred", + "ch", + "can", + "d", + "dan", + "don", + "der", + "dric", + "dfrid", + "dus", + "f", + "g", + "gord", + "gan", + "l", + "li", + "lgrin", + "lin", + "lith", + "lath", + "loth", + "ld", + "ldric", + "ldan", + "m", + "mas", + "mos", + "mar", + "mond", + "n", + "nydd", + "nidd", + "nnon", + "nwan", + "nyth", + "nad", + "nn", + "nnor", + "nd", + "p", + "r", + "ron", + "rd", + "s", + "sh", + "seth", + "sean", + "t", + "th", + "th", + "tha", + "tlan", + "trem", + "tram", + "v", + "vudd", + "w", + "wan", + "win", + "win", + "wyn", + "wyn", + "wyr", + "wyr", + "wyth" + ], + "mid": [ + "a", + "ae", + "ae", + "au", + "ao", + "are", + "ale", + "ali", + "ay", + "ardo", + "e", + "ei", + "ea", + "ea", + "eri", + "era", + "ela", + "eli", + "enda", + "erra", + "i", + "ia", + "ie", + "ire", + "ira", + "ila", + "ili", + "ira", + "igo", + "o", + "oa", + "oi", + "oe", + "ore", + "u", + "y" + ], + "first": [ + "A", + "Ab", + "Ac", + "Ad", + "Af", + "Agr", + "Ast", + "As", + "Al", + "Adw", + "Adr", + "Ar", + "B", + "Br", + "C", + "C", + "C", + "Cr", + "Ch", + "Cad", + "D", + "Dr", + "Dw", + "Ed", + "Eth", + "Et", + "Er", + "El", + "Eow", + "F", + "Fr", + "G", + "Gr", + "Gw", + "Gw", + "Gal", + "Gl", + "H", + "Ha", + "Ib", + "Jer", + "K", + "Ka", + "Ked", + "L", + "Loth", + "Lar", + "Leg", + "M", + "Mir", + "N", + "Nyd", + "Ol", + "Oc", + "On", + "P", + "Pr", + "R", + "Rh", + "S", + "Sev", + "T", + "Tr", + "Th", + "Th", + "V", + "Y", + "Yb", + "Z", + "W", + "W", + "Wic" + ] + } +} \ No newline at end of file diff --git a/plugins/data/name_files/hobbits.json b/plugins/data/name_files/hobbits.json new file mode 100644 index 0000000..0559bcf --- /dev/null +++ b/plugins/data/name_files/hobbits.json @@ -0,0 +1,38 @@ +{ + + "name": "Tolkien hobbit names", + "author": "Johan Danforth", + "templates": { + "default": "{first}{mid}{final}" + }, + "default_templates": [ + "default" + ], + "parts": { + "final": [ + "bo", + "do", + "doc", + "go", + "grin", + "m" + ], + "mid": [ + "a", + "e", + "i", + "ia", + "o", + "oi", + "u" + ], + "first": [ + "B", + "Dr", + "Fr", + "Mer", + "Per", + "S" + ] + } +} diff --git a/plugins/data/name_files/narn.json b/plugins/data/name_files/narn.json new file mode 100644 index 0000000..9d55f6f --- /dev/null +++ b/plugins/data/name_files/narn.json @@ -0,0 +1,81 @@ +{ + "name": "Babylon 5 Narn names", + "author": "Kevin G. Nunn", + "templates": { + "default": "{first}{mid}{final}" + }, + "default_templates": [ + "default" + ], + "parts": { + "final": [ + "ch", + "k", + "kk", + "l", + "n", + "r", + "th", + "s" + ], + "mid": [ + "Ba", + "Bo", + "Da", + "Do", + "Ga", + "Ge", + "Go", + "Ka", + "Ko", + "La", + "Le", + "Lo", + "Ma", + "Mo", + "Na", + "No", + "Oo", + "Pa", + "Po", + "Qua", + "Quo", + "Ra", + "Rala", + "Ro", + "Sha", + "Shali", + "Ska", + "Skali", + "Sta", + "Ste", + "Sto", + "Ta", + "Te", + "Tee", + "To", + "Tha", + "Tho", + "Va", + "Vo", + "Vy", + "Wa" + ], + "first": [ + "Ch'", + "Do'", + "G'", + "Gre'", + "Mak'", + "Na'", + "Re'", + "Sh'", + "So'", + "T'", + "Ta'", + "Th'", + "Thu'", + "Tu'" + ] + } +} \ No newline at end of file diff --git a/plugins/namegen.py b/plugins/namegen.py index a0db748..54a5f8c 100755 --- a/plugins/namegen.py +++ b/plugins/namegen.py @@ -53,6 +53,9 @@ def namegen(inp, notice=None): "namegen [generator] -- Generates some names using the chosen generator. " \ "'namegen list' will display a list of all generators." + # clean and split up the input + args = inp.strip().lower().split() + # get a list of available name generators files = os.listdir(GEN_DIR) all_modules = [] @@ -60,14 +63,14 @@ def namegen(inp, notice=None): all_modules.append(os.path.splitext(i)[0]) # command to return a list of all available generators - if inp == "list": + if args[0] == "list": message = "Available generators: " message += get_text_list(all_modules, 'and') notice(message) return if inp: - selected_module = inp.split(' ')[0] + selected_module = args[0] else: # make some generic fantasy names selected_module = ["fantasy"]