#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jan 28 09:58:27 2019

@author: ltetrel
"""

import argparse
from repo2data.repo2data import Repo2Data
import repo2data.utils

def get_parser():
    parser = argparse.ArgumentParser(
            formatter_class=argparse.RawDescriptionHelpFormatter
            , description=""
            , epilog="""
            Documentation at https://github.com/SIMEXP/Repo2Data
            """)

    parser.add_argument(
            "-r"
            , "--data_requirement"
            , required=False
            , default=None
            , help="Data requirement file (can be a https://github repo), Default: current directory",
            )
    
    parser.add_argument(
            "--server"
            , action="store_true"
            , required=False
            , default=False
            , help="Disabling the dst option for the user, Default: False",
            )

    parser.add_argument(
            "--version"
            , action="version"
            , version=repo2data.utils.get_version()
            )

#    parser.add_argument(
#            "-l"
#            , "--log_level"
#            , required=False
#            , default="INFO"
#            , choices=["DEBUG","INFO","WARNING","ERROR","CRITICAL"]
#            , help="Set logging level",
#            )
   
    return parser

def main():
    args = get_parser().parse_args()
    repo2data = Repo2Data(**vars(args))
    repo2data.install()
    
if __name__ == '__main__':
    main()
