* Update database (unpublish Abyssal items, for now)

* Add eve data version and datetime to about window (temp measure until we can get a better about window implemented)
This commit is contained in:
blitzmann
2018-05-29 19:37:55 -04:00
parent a02f863bc8
commit 8ab709e590
5 changed files with 10 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ debug = False
gamedataCache = True
saveddataCache = True
gamedata_version = ""
gamedata_date = ""
gamedata_connectionstring = 'sqlite:///' + realpath(join(dirname(abspath(__file__)), "..", "eve.db"))
pyfalog.debug("Gamedata connection string: {0}", gamedata_connectionstring)

View File

@@ -51,10 +51,14 @@ try:
config.gamedata_version = gamedata_session.execute(
"SELECT `field_value` FROM `metadata` WHERE `field_name` LIKE 'client_build'"
).fetchone()[0]
config.gamedata_date = gamedata_session.execute(
"SELECT `field_value` FROM `metadata` WHERE `field_name` LIKE 'dump_time'"
).fetchone()[0]
except Exception as e:
pyfalog.warning("Missing gamedata version.")
pyfalog.critical(e)
config.gamedata_version = None
config.gamedata_date = None
saveddata_connectionstring = config.saveddata_connectionstring
if saveddata_connectionstring is not None:

BIN
eve.db

Binary file not shown.

View File

@@ -34,7 +34,8 @@ from codecs import open
import config
from eos.config import gamedata_version
from eos.config import gamedata_version, gamedata_date
import datetime
import gui.aboutData
from gui.chrome_tabs import ChromeNotebook
@@ -365,7 +366,8 @@ class MainFrame(wx.Frame):
def ShowAboutBox(self, evt):
info = wx.adv.AboutDialogInfo()
info.Name = "pyfa"
info.Version = config.getVersion() # gui.aboutData.versionString
time = datetime.datetime.fromtimestamp(int(gamedata_date)).strftime('%Y-%m-%d %H:%M:%S')
info.Version = config.getVersion() + '\nEVE Data Version: {} ({})'.format(gamedata_version, time) # gui.aboutData.versionString
#
# try:
# import matplotlib

View File

@@ -276,6 +276,7 @@ def main(db, json_path):
# pyfa, we can do it here as a post-processing step
eos.db.gamedata_engine.execute("UPDATE dgmtypeattribs SET value = 4.0 WHERE attributeID = ?", (1367,))
eos.db.gamedata_engine.execute("UPDATE invtypes SET published = 0 WHERE typeName LIKE '%abyssal%'")
print("done")
if __name__ == "__main__":