-if __name__ == '__main__':
- # Parse commandline arguments
- usage = """Usage: %prog [options] SOURCE [SOURCE...]
- Create cover images for SOURCE files."""
-
- parser = optparse.OptionParser(usage=usage)
-
- parser.add_option('-v', '--verbose', action='store_true', dest='verbose', default=False,
- help='print status messages to stdout')
-
- options, input_filenames = parser.parse_args()
+ @staticmethod
+ def transform(wldoc, cover):
+ output = StringIO()
+ cover(wldoc.book_info).save(output)
+ return OutputFile.from_string(output.getvalue())