tweaks
This commit is contained in:
parent
5ce8995a50
commit
f507467c14
@ -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()
|
||||
|
@ -1 +1 @@
|
||||
from .generate import generate_codename, run_server
|
||||
from .generate import generate_codename, run_server, clientry
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user