#NEWLINE# def main( ) : #NEWLINE# #INDENT# 'Get "Pictures of The Day" from English Wikipedia for a given month' #NEWLINE# global verbose #NEWLINE# parser = argparse . ArgumentParser ( description = main . __doc__ ) #NEWLINE# parser . add_argument ( 'year_month' , help = 'year and month in YYYY-MM format' ) #NEWLINE# parser . add_argument ( '-q' , '--max_qty' , type = int , help = 'maximum number of files to download' ) #NEWLINE# parser . add_argument ( '-v' , '--verbose' , action = 'store_true' , help = 'display progress information' ) #NEWLINE# args = parser . parse_args ( ) #NEWLINE# verbose = args . verbose #NEWLINE# t0 = time . time ( ) #NEWLINE# ( img_count , total_size ) = get_images ( args . year_month , args . max_qty ) #NEWLINE# elapsed = ( time . time ( ) - t0 ) #NEWLINE# print ( ( 'images: %3d |  total size: %6.1f Kbytes  |  elapsed time: %3ds' % ( img_count , ( total_size / 1024.0 ) , elapsed ) ) )