victor@2: #!/home/alex/anaconda/bin/python victor@2: victor@2: import sys, getopt victor@2: import preomr victor@2: victor@2: def usage(): victor@2: print "Please provide input and output filenames." victor@2: victor@2: def main(argv): victor@2: if len(argv) < 2: victor@2: usage() victor@2: sys.exit(2) victor@2: infile = argv[0] victor@2: outfile = argv[1] victor@2: victor@2: process(infile, outfile) victor@2: victor@2: victor@2: def process(infile, outfile): victor@2: po = preomr.PreOMR(infile) victor@2: #po.staffline_removal() victor@2: po.remove_ossia() victor@2: po.save(outfile) victor@2: victor@2: # Commandline parameter processing victor@2: # Make working folder victor@2: # Explode PDFs into PNGs? victor@2: # Deskew (optional) victor@2: # Find staves victor@2: # Print output image(s) victor@2: victor@2: if __name__ == "__main__": victor@2: main(sys.argv[1:])