station_simulator/cli.py
def main():
    '''
    Generate a fake CSV of station data
    '''
    parser = ArgumentParser(description=main.__doc__)
    parser.add_argument('-n', '--station-name', default='DUBAL', help='Name of station')
    parser.add_argument('-s', '--start', default='2017-01-01', help='Start Date')
    parser.add_argument('-e', '--end',
                        default=datetime.utcnow().strftime('%Y-%m-%d'), help='End Date')
    parser.add_argument('-f', '--frequency', choices=['second', 'minute', 'hour'], default='hour')
    parser.add_argument('output', help='Output file')
    args = parser.parse_args()

    start_date = dateparse(args.start)
    end_date = dateparse(args.end)
    generate_csv(args.output, args.station_name, start_date, end_date, args.frequency)
    return 0

    Generate a fake CSV of station data
    
Generate a fake CSV of station data
Generate a fake CSV of station data
def main():
    parser = ArgumentParser(description=main.__doc__)
    parser.add_argument('-n', '--station-name', default='DUBAL', help='Name of station')
    parser.add_argument('-s', '--start', default='2017-01-01', help='Start Date')
    parser.add_argument('-e', '--end',
                        default=datetime.utcnow().strftime('%Y-%m-%d'), help='End Date')
    parser.add_argument('-f', '--frequency', choices=['second', 'minute', 'hour'], default='hour')
    parser.add_argument('output', help='Output file')
    args = parser.parse_args()
    start_date = dateparse(args.start)
    end_date = dateparse(args.end)
    generate_csv(args.output, args.station_name, start_date, end_date, args.frequency)
    return 0
def main ( ) : parser = ArgumentParser ( description = main . __doc__ ) parser . add_argument ( '-n' , '--station-name' , default = 'DUBAL' , help = 'Name of station' ) parser . add_argument ( '-s' , '--start' , default = '2017-01-01' , help = 'Start Date' ) parser . add_argument ( '-e' , '--end' , default = datetime . utcnow ( ) . strftime ( '%Y-%m-%d' ) , help = 'End Date' ) parser . add_argument ( '-f' , '--frequency' , choices = [ 'second' , 'minute' , 'hour' ] , default = 'hour' ) parser . add_argument ( 'output' , help = 'Output file' ) args = parser . parse_args ( ) start_date = dateparse ( args . start ) end_date = dateparse ( args . end ) generate_csv ( args . output , args . station_name , start_date , end_date , args . frequency ) return 0
Generate a fake CSV of station data
Generate a fake CSV of station data
'''
    Generate a fake CSV of station data
    '''