Exemplo n.º 1
0
def textgeneration():
    print("\n")
    c = 0
    for i in modules.Text_Generation:
        print("press [" + str(c) + "] for " + i)
        c += 1
    print("press [" + str(c) + "] for menu")
    #--------------------------------------------
    #--------------------------------------------
    selection = input("\nto continue, make a selection\n")
    if selection == "0":
        prompt = modules.gettextfromfile("txt", "prompt.txt")
        include = input("include prompt in response? y/n\n")
        length = input("length of response ")
        if include == "y" or "Y":
            modules.textgenerationi(prompt, length)
        else:
            modules.textgeneration(prompt, length)
        print(modules.gettextfromfile("txt", "generatedtext.txt") + "\nyeeeet")
        textgeneration()
    elif selection == "1":
        t = modules.polishtext()
        print(t)
        textgeneration()
    elif selection == "2":
        restart()
    else:
        print("invalid selection, returning to main")
        restart()
    #--------------------------------------------
    textgeneration()
Exemplo n.º 2
0
def utilities():
    print("\n")
    c = 0
    for i in modules.Utilities:
        print("press [" + str(c) + "] for " + i)
        c += 1
    print("press [" + str(c) + "] for menu")
    #--------------------------------------------
    #--------------------------------------------
    selection = input('\nto continue, make a selection\n')
    if selection == "0":
        folder = input("what folder ")
        file = input("what file ")
        f = modules.getfile(folder, file)
        print(f)
        utilities()
    elif selection == "1":
        folder = input("what folder ")
        file = input("what file ")
        f = modules.gettextfromfile(folder, file)
        print(f)
        utilities()
    elif selection == "2":
        folder = input("what folder ")
        file = input("what file ")
        text = input("what to write ")
        modules.puttextinfile(folder, file, text)
        print(modules.gettextfromfile(folder, file))
        utilities()
    elif selection == "3":
        restart()
    else:
        print("invalid selection")
        y = input("press y to exit\n")
        if y == 'y' or y == 'Y':
            closeinterface()
        else:
            restart()
    #--------------------------------------------
    restart()
Exemplo n.º 3
0
def getprompt():
    prompt = modules.gettextfromfile("txt","prompt.txt")
    return(prompt)
Exemplo n.º 4
0
def getresponse():
    response = modules.gettextfromfile("txt","generatedtext.txt")
    return(response)