def main():
    parser = optparse.OptionParser(usage=usage, description=description, version="%prog 0.1beta")
    parser.add_option("-d", dest="outputDirectory", help="Output directory. The default is to output the proof into the same directory as the font file.")
    parser.add_option("-o", dest="outputFileName", help="Output file name. The default is \"fontfilename_proof.html\".")
    parser.add_option("-t", dest="sampleTextFile", help="Sample text file. A file containing sample text to display. If not file is provided, The quick brown fox... will be used.")
    parser.set_defaults(excludeTests=[])
    (options, args) = parser.parse_args()
    outputDirectory = options.outputDirectory
    if outputDirectory is not None and not os.path.exists(outputDirectory):
        print "Directory does not exist:", outputDirectory
        sys.exit()
    sampleText = defaultSampleText
    if options.sampleTextFile:
        if not os.path.exists(options.sampleTextFile):
            print "Sample text file does not exist:", options.sampleTextFile
            sys.exit()
        f = open(options.sampleTextFile, "r")
        sampleText = f.read()
        f.close()
    for fontPath in args:
        if not os.path.exists(fontPath):
            print "File does not exist:", fontPath
            sys.exit()
        else:
            print fontPath % "Creating Proof: %s..."
            fontPath = fontPath.decode("utf-8")
            font = WOFFFont(fontPath)
            html = proofFont(font, fontPath, sampleText=sampleText)
            # make the output file name
            if options.outputFileName is not None:
                fileName = options.outputFileName
            else:
                fileName = os.path.splitext(os.path.basename(fontPath))[0]
                fileName += "_proof.html"
            # make the output directory
            if options.outputDirectory is not None:
                directory = options.outputDirectory
            else:
                directory = os.path.dirname(fontPath)
            # write the file
            path = os.path.join(directory, fileName)
            path = findUniqueFileName(path)
            f = open(path, "wb")
            f.write(html)
            f.close()
dataset/ETHPy150Open typesupply/woffTools/Lib/woffTools/tools/proof.py/main/swapped operands of `%`