-
Notifications
You must be signed in to change notification settings - Fork 0
/
first-industry.py
71 lines (51 loc) · 2.05 KB
/
first-industry.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
'''
Created on 16 Jan 2016
@author: adam
'''
import sqlite3
import untangle
import json, requests, pprint
#import eveSQL
import eveSQL.firstGo as firstGo
from eveSQL.SDEQueries import SDEQueries
#from docutils.parsers.rst.directives import parts
#Test PSQL connectivity
conn = sqlite3.connect("/home/adam/Documents/eve/native/eve.db")
curr = conn.cursor()
queries = SDEQueries()
ALL_CHARS = firstGo.getAllCharacters()
mats = (queries.matsForBp(queries.findBpNameFromName("Armor EM Hardener I")))
amount = 0
for key, value in mats.iteritems():
print (key, value)
amount = amount + (firstGo.nowValueJita(key) * value)
print (amount)
#compare build price againsr recylce price
def reprocOre():
pass
'''Reprocessing yield: Station Equipment
x (1 + Refining skill x 0.03)
x (1 + Refining Efficiency skill x 0.02)
x (1 + Ore Processing skill x 0.02) )'''
#stationEquipment
#refiningSkill
#refiningEffSkill
#oreProcSkill
firstGo.createCorpAssetsTable(assets)
def getSystemIDFromStation(stationID):
conn = sqlite3.connect("/home/adam/Documents/eve/native/eve.db")
ss = conn.cursor()
ss.execute("SELECT solarSystemID from staStations where stationID = {id}".
format(id = stationID))
s = ss.fetchone()[0]
return s
def itemPrices():
total = 0
curr.execute('SELECT typeid, locationid FROM corpassets;')
for x in curr.fetchall():
theyBuy = firstGo.nowValue(getSystemIDFromStation(x[1]), x[0])[0]
theySell = firstGo.nowValue(getSystemIDFromStation(x[1]), x[0])[1]
print (firstGo.getSystemName(getSystemIDFromStation(x[1])), firstGo.getItemName(x[0]), theyBuy, theySell)
#Station Equipment x (1 + Refining skill x 0.03) x (1 + Refining Efficiency skill x 0.02) x (1 + Ore Processing skill x 0.02) )
#[(60004516, 1000047, 30002053), (60005236, 1000055, 30002053), (60005686, 1000057, 30002053), (60011287, 1000111, 30002053), (60015140, 1000182, 30002053)]
#NEW MATH --> Station Equipment x (1 + Refining skill x 0.03) x (1 + Refining Efficiency skill x 0.02) x (1 + Ore Processing skill x 0.02)