# -*- coding: utf-8 -*-

import argparse
import sys


def main(argv=sys.argv):
    command = EvTranspose(argv)
    return command.run()

class EvTranspose(object):

    description = ""
    parser = argparse.ArgumentParser(description=description)
    parser.add_argument('dst', help='the destination for the output files')
    parser.add_argument('zip_file', nargs='+', help='the zipped files to parse')
    
    def __init__(self, argv):
        self.args = self.parser.parse_args(argv[1:])

    def run(self):
        return 0

@@ -45,12 +45,69 @@
 ort 
-sys%0A
+os.path%0Aimport sys%0A%0Afrom ev_transpose import TP_TSTAMP_FORMAT
 %0A%0Ade
@@ -547,41 +547,603 @@
 :%5D)%0A
-%0A    def run(self):%0A        return 0
+        self.dst = self.args.dst%0A%0A    def run(self):%0A        for zfile in self.args.zip_file:%0A            with InputFile(zfile) as in_f:%0A                for entry in in_f:%0A                    self.write_out(entry)%0A        return 0%0A%0A    def write_out(self, entry):%0A        with GzipFile(self.expand(entry.name), 'w') as fp:%0A            fp.write(self.format_out(entry))%0A%0A    def expand(self, fname):%0A        return os.path.join(self.dst, '.'.join((fname, 'gz')))%0A%0A    def format_out(self, entry):%0A        date = entry.date.strftime(TP_TSTAMP_FORMAT)%0A        return '%7B0%7D, %7B1%7D'.format(date, entry.rank)
 %0A

describing the algorithm