#!/usr/bin/env python -W ignore
'''
                 *** The command line interface for pyPcaunzip ***                                                                                                                                  
'''
import os.path as op
import argh
import logging as log
import __builtin__

from MDPlus import Universe, Writer
from pcazip import pypcaunzip

__builtin__.parallelbuiltin = False

#######################################################
# ENTRY POINT
#######################################################
@argh.dispatch_command
# Mandatory command line arguments:
@argh.arg('-t', '--topology', type=str, help="The topology file. Currently, only PDB files are accepted. This is a mandatory argument.")
@argh.arg('-c', '--compressed', type=str, help="The compressed file given in input. This is a mandatory argument.")


# Optional command line argument:
@argh.arg('-o', '--output', type=str, default=None, help="The output file containing the uncompressed trajectory.")
@argh.arg('-p', '--preload', default=False, help="Should the whole trajectory be preloaded in memory False by default.")
@argh.arg('-v', '--verbosity', default=False, help="Increase output verbosity.")

def main(**kwargs):
    class Struct(object):
        def __init__(self, entries):
            self.__dict__.update(entries)
    args = Struct(kwargs)
    pypcaunzip.pcaunzip(args)
