def init():
    '''
    outputFileName can be a .js or a .html , in the case of html appropriate markup is added
    '''

    global rectWidth
    global rectHeight
    
    outputFileName = "outputs/rewrite_001.html"
    postScriptFileName = "ps/typogratifying_extra4.ps"
    fullString, rectWidth, rectHeight = get_postscript(postScriptFileName)

    if fullString != None:
        commandList = parse_postscript(fullString)
        create_file(commandList, outputFileName) 
        print("wrote " + outputFileName + " using " + postScriptFileName)
def init():
    '''
    outputFileName can be a .js or a .html , in the case of html appropriate markup is added
    '''

    global rectWidth
    global rectHeight
    
    outputFileName = "outputs/rewrite_TypeTest3.html"
    postScriptFileName = "ps/TypeTest2.ps"
    fullString, rectWidth, rectHeight = get_postscript(postScriptFileName)

    if fullString != None:
        commandList = parse_postscript(fullString)
        create_file(commandList, outputFileName) 
        print("wrote " + outputFileName + " using " + postScriptFileName)

    if outputFileName.endswith("html"):
        import webbrowser
        pathToYourFile = "C:/Users/dealga/Desktop/PostScriptParser/myscripts/"
        webbrowser.open_new(pathToYourFile + outputFileName)