) parser.add_argument('-m', '--missing', default='Carbuncle', help=('Server to scrape missing prices from.(ACTIVE: {0})'.format( ', '.join(ffxiah.active) )), metavar='' ) parser.add_argument('-h', '--help', action='help', help='Show this help message and exit') args = parser.parse_args() for server in args.server.split(','): # Set Server Prices to scrape ffxiah.use_server(server) # Get prices ffxiah.ah_items() # fill missing prices with an active server ffxiah.use_server(args.missing) ffxiah.ah_items(fill_missing=True) # Print Prices print 'itemid,{0}'.format(",".join(ffxiah.csv_order)) for itemid in ffxiah.items: d = ffxiah.items[itemid] print ','.join(str(a) for a in [ itemid,
parser = ap.ArgumentParser(prog='update_categories.py', conflict_handler='resolve', description="Compare category IDs") parser.add_argument('-h', '--help', action='help', help='Show this help message and exit') args = parser.parse_args() # Get DSP item info dspdb = DSPDB() dspdb.dsp_items() # Set Server to scrape ffxiah = Parser() ffxiah.use_server('Carbuncle') # Get FFXIAH item info ffxiah.ah_items() # Compare categories for item_id in ffxiah.items: if ffxiah.items[item_id]['category'] != dspdb.items[item_id]['category']: dspdb.update_category(item_id, ffxiah.items[item_id]['category']) print 'Updated Category For {0} ({1}, {2}->{3})'.format( ffxiah.items[item_id]['name'], item_id, dspdb.items[item_id]['category'], ffxiah.items[item_id]['category'] )