cute-name-generator 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cute-name-generator might be problematic. Click here for more details.
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cute-name-generator
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: generate a cute name for something using a safe adjective and noun
|
|
5
|
+
License: AGPL
|
|
6
|
+
Author: JesseBot
|
|
7
|
+
Author-email: jessebot@linux.com
|
|
8
|
+
Requires-Python: >=3.13
|
|
9
|
+
Classifier: License :: Other/Proprietary License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import argparse
|
|
2
|
+
import random
|
|
3
|
+
|
|
4
|
+
TITLES = ["Dr",
|
|
5
|
+
"Miss",
|
|
6
|
+
"Mr",
|
|
7
|
+
"Mx",
|
|
8
|
+
"Sir",
|
|
9
|
+
"Reigning.Champion",
|
|
10
|
+
"The.Peoples"]
|
|
11
|
+
|
|
12
|
+
# list of approved English and Dutch words for an adjective
|
|
13
|
+
CUTE_ADJECTIVE = ["adorable",
|
|
14
|
+
"beautiful",
|
|
15
|
+
"brilliant",
|
|
16
|
+
"briljante",
|
|
17
|
+
"cool",
|
|
18
|
+
"cute",
|
|
19
|
+
"elegant",
|
|
20
|
+
"fantastisch",
|
|
21
|
+
"friendly",
|
|
22
|
+
"gelukkig",
|
|
23
|
+
"honest",
|
|
24
|
+
"klein",
|
|
25
|
+
"leuke",
|
|
26
|
+
"lovely",
|
|
27
|
+
"loyal",
|
|
28
|
+
"mooie",
|
|
29
|
+
"nice",
|
|
30
|
+
"perfect",
|
|
31
|
+
"schattige",
|
|
32
|
+
"soft",
|
|
33
|
+
"smol",
|
|
34
|
+
"small",
|
|
35
|
+
"trouwe",
|
|
36
|
+
"unique",
|
|
37
|
+
"vriendelijke"]
|
|
38
|
+
|
|
39
|
+
# list of approved English and Dutch words for a noun
|
|
40
|
+
CUTE_NOUNS = ["bunny",
|
|
41
|
+
"doggy",
|
|
42
|
+
"duckling",
|
|
43
|
+
"eendje",
|
|
44
|
+
"egel",
|
|
45
|
+
"eekhoorn",
|
|
46
|
+
"friend",
|
|
47
|
+
"froggy",
|
|
48
|
+
"hamster",
|
|
49
|
+
"hoglet",
|
|
50
|
+
"hondje"
|
|
51
|
+
"kitten",
|
|
52
|
+
"knuffel",
|
|
53
|
+
"konijntje",
|
|
54
|
+
"meerkoet",
|
|
55
|
+
"muis",
|
|
56
|
+
"otter",
|
|
57
|
+
"partner",
|
|
58
|
+
"penguin",
|
|
59
|
+
"puppy",
|
|
60
|
+
"raccoon",
|
|
61
|
+
"squirrel",
|
|
62
|
+
"vriend",
|
|
63
|
+
"wasbeertje"]
|
|
64
|
+
|
|
65
|
+
SUFFIXES = ["deluxe",
|
|
66
|
+
"ii",
|
|
67
|
+
"iii",
|
|
68
|
+
"iv",
|
|
69
|
+
"in.a.trench.coat",
|
|
70
|
+
"esquire",
|
|
71
|
+
"junior",
|
|
72
|
+
"near.you",
|
|
73
|
+
"pro",
|
|
74
|
+
"senior",
|
|
75
|
+
"the.second",
|
|
76
|
+
"the.third",
|
|
77
|
+
"x",
|
|
78
|
+
"xtreme"]
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def return_cute_name(adjective_count: int = 1,
|
|
82
|
+
delimeter: str = "-",
|
|
83
|
+
title: bool = False,
|
|
84
|
+
suffix: bool = False,
|
|
85
|
+
lower: bool = False,
|
|
86
|
+
number: bool = False):
|
|
87
|
+
"""
|
|
88
|
+
grab a number of random cute adjectives and a cute noun combine them
|
|
89
|
+
Args:
|
|
90
|
+
- adjective_count: int, default: 1, how many adjectives
|
|
91
|
+
- delimeter: str, default: "-" what to use as a seperator
|
|
92
|
+
- suffix: bool, default: False should we include a suffix?
|
|
93
|
+
- title: bool, default: False should we include a title?
|
|
94
|
+
- lower: bool, default: False lowercase everything
|
|
95
|
+
- number: int, default: False add a number
|
|
96
|
+
"""
|
|
97
|
+
adjective_list = []
|
|
98
|
+
|
|
99
|
+
# add a random number
|
|
100
|
+
if number:
|
|
101
|
+
adjective_list.append(random.randint)
|
|
102
|
+
|
|
103
|
+
# optionally choose a title
|
|
104
|
+
if title:
|
|
105
|
+
adjective_list.append(random.choice(TITLES).replace('.', delimeter))
|
|
106
|
+
|
|
107
|
+
# add as many adjectives as the user would like
|
|
108
|
+
for i in range(adjective_count):
|
|
109
|
+
adjective_list.append(random.choice(CUTE_ADJECTIVE))
|
|
110
|
+
|
|
111
|
+
# choose a noun and decide if it's plural
|
|
112
|
+
noun = random.choice(CUTE_NOUNS)
|
|
113
|
+
if number:
|
|
114
|
+
noun += "s"
|
|
115
|
+
adjective_list.append(noun)
|
|
116
|
+
|
|
117
|
+
# optionally add a suffix
|
|
118
|
+
if suffix:
|
|
119
|
+
adjective_list.append(random.choice(SUFFIXES).replace('.', delimeter))
|
|
120
|
+
|
|
121
|
+
# ensure lowercase if the user would like it and then return the result
|
|
122
|
+
if lower:
|
|
123
|
+
return delimeter.join(adjective_list).lower()
|
|
124
|
+
else:
|
|
125
|
+
return delimeter.join(adjective_list)
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
def main():
|
|
129
|
+
parser = argparse.ArgumentParser(
|
|
130
|
+
description="Simple little program to print a nice random name")
|
|
131
|
+
parser.add_argument("-a", "--adjective_count", type=int,
|
|
132
|
+
default=1, help="How many adjectives")
|
|
133
|
+
parser.add_argument("-d", "--delimeter", type=str,
|
|
134
|
+
default="-", help="What delimeter or seperator to use.")
|
|
135
|
+
parser.add_argument("-l", "--lower", action="store_true",
|
|
136
|
+
help="Make everything lower case.")
|
|
137
|
+
parser.add_argument("-n", "--number", action="store_true",
|
|
138
|
+
help="Add a random number.")
|
|
139
|
+
parser.add_argument("-s", "--suffix", action="store_true",
|
|
140
|
+
help="Give our noun a silly suffix.")
|
|
141
|
+
parser.add_argument("-t", "--title", action="store_true",
|
|
142
|
+
help="Give our noun a fancy title.")
|
|
143
|
+
|
|
144
|
+
args = parser.parse_args()
|
|
145
|
+
|
|
146
|
+
print(return_cute_name(args.adjective_count,
|
|
147
|
+
args.delimeter,
|
|
148
|
+
args.title,
|
|
149
|
+
args.suffix,
|
|
150
|
+
args.lower,
|
|
151
|
+
args.number))
|
|
152
|
+
|
|
153
|
+
if __name__ == '__main__':
|
|
154
|
+
main()
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "cute-name-generator"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "generate a cute name for something using a safe adjective and noun"
|
|
5
|
+
authors = [
|
|
6
|
+
{name = "JesseBot",email = "jessebot@linux.com"}
|
|
7
|
+
]
|
|
8
|
+
license = "AGPL"
|
|
9
|
+
requires-python = ">=3.13"
|
|
10
|
+
dependencies = [
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
[tool.poetry.plugins."smol-k8s-lab.application.plugin"]
|
|
14
|
+
"cute-name-generator" = "cute_name_generator:main"
|
|
15
|
+
|
|
16
|
+
[tool.poetry.scripts]
|
|
17
|
+
cute-name-generator = "cute_name_generator:main"
|
|
18
|
+
|
|
19
|
+
[build-system]
|
|
20
|
+
requires = ["poetry-core>=2.0.0,<3.0.0"]
|
|
21
|
+
build-backend = "poetry.core.masonry.api"
|