This commit is contained in:
Jeffrey Paul 2019-10-18 23:57:08 -07:00
parent 5ce8995a50
commit f507467c14
3 changed files with 6 additions and 11 deletions

View File

@ -1,9 +1,6 @@
#!/usr/bin/python
from codenamegenerator import generate_codename
def main():
print(generate_codename(snake_case=False))
import codenamegenerator
if __name__ == "__main__":
main()
codenamegenerator.clientry()

View File

@ -1 +1 @@
from .generate import generate_codename, run_server
from .generate import generate_codename, run_server, clientry

View File

@ -8,6 +8,7 @@ import os
import random
import socketserver
# afaik this breaks if you install as an egg
this_dir_path = os.path.dirname(os.path.realpath(__file__))
FIRST = []
@ -26,11 +27,8 @@ def rand_firstword():
def rand_secondword():
return(random.choice(SECOND))
def generate_codename(snake_case=False):
sep = " "
if snake_case:
sep = "_"
return(rand_firstword() + sep + rand_secondword())
def generate_codename():
return(rand_firstword() + " " + rand_secondword())
def clientry():
print(generate_codename())