"""
configure and run the download of network data
"""

# import python modules
import argparse


# import all the download scripts
import CNEMC_download
import WMO_WDCGG_download
import BJMEMC_download
import US_EPA_CASTNET_download
import US_EPA_AirNow_DOS_download
import EEA_AQ_eReporting_download
import CAPMoN_download
import EANET_download
import CANADA_NAPS_download
import CHILE_SINCA_download
import US_NADP_AMNet_download
import US_NADP_AMoN_download
import MEXICO_CDMX_download
import JAPAN_NIES_download
import MITECO_download
import UK_AIR_download
import NOAA_ISD_download
import US_EPA_AQS_download

import EANET_metadata





if __name__ == "__main__":

    # add arguments
    parser = argparse.ArgumentParser(description="Script that runs network downloads")
    parser.add_argument("--mode", type=str, help="Enter 'all' for entire time period or 'nrt' for most recent file", default='nrt')
    args = parser.parse_args()

    mode = args.mode
    print("Mode: {}".format(mode))

    # ghost version
    version = '1.6'
    print("Ghost version: {}".format(version))

    # run the desired networks

    #EEA_AQ_eReporting_download.scraper(mode)
    #US_EPA_AirNow_DOS_download.scraper(mode, version)
    #US_EPA_CASTNET_download.scraper(mode, version)
    #BJMEMC_download.scraper(mode, version)
    #CNEMC_download.scraper(mode, version)
    #WMO_WDCGG_download.scraper(mode, version)
    #CAPMoN_download.scraper(mode, version)
    #EANET_download.scraper(mode, version)
    #CANADA_NAPS_download.scraper(mode, version)
    #CHILE_SINCA_download.scraper(mode, version)
    #US_NADP_AMNet_download.scraper(mode, version)
    #US_NADP_AMoN_download.scraper(mode, version)
    #MEXICO_CDMX_download.scraper(mode, version)
    #JAPAN_NIES_download.scraper(mode, version)
    #MITECO_download.scraper(mode, version)
    #UK_AIR_download.scraper(mode, version)
    #NOAA_ISD_download.scraper(mode, version)
    US_EPA_AQS_download.scraper(mode, version)




    #EANET_metadata.scraper(mode)