mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-08 05:20:03 +03:00
parent
ab4b1ff3d7
commit
9b54675cdb
@ -45,8 +45,8 @@ def export(data, kind=COMMODITY_DEFAULT, filename=None):
|
||||
line = sep.join([
|
||||
rowheader,
|
||||
commodity['name'],
|
||||
commodity['sellPrice'] and str(commodity['sellPrice']) or '',
|
||||
commodity['buyPrice'] and str(commodity['buyPrice']) or '',
|
||||
commodity['sellPrice'] and str(int(commodity['sellPrice'])) or '',
|
||||
commodity['buyPrice'] and str(int(commodity['buyPrice'])) or '',
|
||||
str(int(commodity['demand'])) if commodity['demandBracket'] else '',
|
||||
bracketmap[commodity['demandBracket']],
|
||||
str(int(commodity['stock'])) if commodity['stockBracket'] else '',
|
||||
|
4
eddn.py
4
eddn.py
@ -52,9 +52,9 @@ def export_commodities(data):
|
||||
for commodity in data['lastStarport'].get('commodities', []):
|
||||
commodities.append({
|
||||
'name' : commodity['name'],
|
||||
'buyPrice' : commodity['buyPrice'],
|
||||
'buyPrice' : int(commodity['buyPrice']),
|
||||
'supply' : int(commodity['stock']),
|
||||
'sellPrice' : commodity['sellPrice'],
|
||||
'sellPrice' : int(commodity['sellPrice']),
|
||||
'demand' : int(commodity['demand']),
|
||||
})
|
||||
if commodity['stockBracket']:
|
||||
|
4
td.py
4
td.py
@ -43,8 +43,8 @@ def export(data):
|
||||
for commodity in sorted(bycategory[category], key=itemgetter('name')):
|
||||
h.write(' %-23s %7d %7d %9s%c %8s%c %s\n' % (
|
||||
commodity['name'],
|
||||
commodity['sellPrice'],
|
||||
commodity['buyPrice'],
|
||||
int(commodity['sellPrice']),
|
||||
int(commodity['buyPrice']),
|
||||
int(commodity['demand']) if commodity['demandBracket'] else '',
|
||||
demandbracketmap[commodity['demandBracket']],
|
||||
int(commodity['stock']) if commodity['stockBracket'] else '',
|
||||
|
Loading…
x
Reference in New Issue
Block a user