tweaks
This commit is contained in:
parent
5ce8995a50
commit
f507467c14
@ -1,9 +1,6 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
|
||||||
from codenamegenerator import generate_codename
|
import codenamegenerator
|
||||||
|
|
||||||
def main():
|
|
||||||
print(generate_codename(snake_case=False))
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
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 random
|
||||||
import socketserver
|
import socketserver
|
||||||
|
|
||||||
|
# afaik this breaks if you install as an egg
|
||||||
this_dir_path = os.path.dirname(os.path.realpath(__file__))
|
this_dir_path = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
||||||
FIRST = []
|
FIRST = []
|
||||||
@ -26,11 +27,8 @@ def rand_firstword():
|
|||||||
def rand_secondword():
|
def rand_secondword():
|
||||||
return(random.choice(SECOND))
|
return(random.choice(SECOND))
|
||||||
|
|
||||||
def generate_codename(snake_case=False):
|
def generate_codename():
|
||||||
sep = " "
|
return(rand_firstword() + " " + rand_secondword())
|
||||||
if snake_case:
|
|
||||||
sep = "_"
|
|
||||||
return(rand_firstword() + sep + rand_secondword())
|
|
||||||
|
|
||||||
def clientry():
|
def clientry():
|
||||||
print(generate_codename())
|
print(generate_codename())
|
||||||
|
Loading…
Reference in New Issue
Block a user