tradedangerous 11.0.4__tar.gz → 11.0.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of tradedangerous might be problematic. Click here for more details.
- {tradedangerous-11.0.4/tradedangerous.egg-info → tradedangerous-11.0.6}/PKG-INFO +1 -1
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/setup.py +3 -3
- {tradedangerous-11.0.4/tradedangerous → tradedangerous-11.0.6}/trade.py +5 -12
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/commands/buildcache_cmd.py +2 -2
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/jsonprices.py +16 -3
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/plugins/eddblink_plug.py +1 -2
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/plugins/spansh_plug.py +22 -20
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/submit-distances.py +6 -2
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/version.py +1 -1
- {tradedangerous-11.0.4 → tradedangerous-11.0.6/tradedangerous.egg-info}/PKG-INFO +1 -1
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous.egg-info/SOURCES.txt +2 -2
- tradedangerous-11.0.6/tradedangerous.egg-info/entry_points.txt +3 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous.egg-info/top_level.txt +1 -0
- tradedangerous-11.0.4/tradedangerous.egg-info/entry_points.txt +0 -3
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/LICENSE +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/README.md +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/pyproject.toml +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/setup.cfg +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tests/test_bootstrap_commands.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tests/test_bootstrap_plugins.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tests/test_cache.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tests/test_commands.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tests/test_fs.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tests/test_peek.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tests/test_tools.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tests/test_trade.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tests/test_trade_run.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tests/test_utils.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/__init__.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/cache.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/cli.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/commands/TEMPLATE.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/commands/__init__.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/commands/buy_cmd.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/commands/commandenv.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/commands/exceptions.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/commands/export_cmd.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/commands/import_cmd.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/commands/local_cmd.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/commands/market_cmd.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/commands/nav_cmd.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/commands/olddata_cmd.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/commands/parsing.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/commands/rares_cmd.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/commands/run_cmd.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/commands/sell_cmd.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/commands/shipvendor_cmd.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/commands/station_cmd.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/commands/trade_cmd.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/commands/update_cmd.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/commands/update_gui.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/corrections.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/csvexport.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/edscupdate.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/edsmupdate.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/formatting.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/fs.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/gui.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/mapping.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/mfd/__init__.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/mfd/saitek/__init__.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/mfd/saitek/directoutput.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/mfd/saitek/x52pro.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/misc/checkpricebounds.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/misc/clipboard.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/misc/coord64.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/misc/derp-sentinel.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/misc/diff-system-csvs.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/misc/eddb.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/misc/eddn.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/misc/edsc.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/misc/edsm.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/misc/importeddbstats.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/misc/prices-json-exp.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/misc/progress.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/plugins/__init__.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/plugins/edapi_plug.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/plugins/edcd_plug.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/plugins/edmc_batch_plug.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/plugins/journal_plug.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/plugins/netlog_plug.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/prices.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/templates/Added.csv +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/templates/Category.csv +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/templates/RareItem.csv +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/templates/TradeDangerous.sql +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/tools.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/tradecalc.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/tradedb.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/tradeenv.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/tradeexcept.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/transfers.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous/utils.py +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous.egg-info/dependency_links.txt +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous.egg-info/not-zip-safe +0 -0
- {tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous.egg-info/requires.txt +0 -0
- {tradedangerous-11.0.4/tradedangerous → tradedangerous-11.0.6}/tradegui.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tradedangerous
|
|
3
|
-
Version: 11.0.
|
|
3
|
+
Version: 11.0.6
|
|
4
4
|
Summary: Trade-Dangerous is a set of powerful trading tools for Elite Dangerous, organized around one of the most powerful trade run optimizers available.
|
|
5
5
|
Home-page: https://github.com/eyeonus/Trade-Dangerous
|
|
6
6
|
Author: eyeonus
|
|
@@ -30,7 +30,7 @@ setup(name = package,
|
|
|
30
30
|
install_requires = ["requests", "appJar", "ijson", "rich"],
|
|
31
31
|
setup_requires = ["pytest-runner"],
|
|
32
32
|
tests_require = ["pytest"],
|
|
33
|
-
packages = ['tradedangerous', 'tradedangerous.commands', 'tradedangerous.mfd', 'tradedangerous.mfd.saitek', 'tradedangerous.misc', 'tradedangerous.plugins'],
|
|
33
|
+
packages = ['.', 'tradedangerous', 'tradedangerous.commands', 'tradedangerous.mfd', 'tradedangerous.mfd.saitek', 'tradedangerous.misc', 'tradedangerous.plugins'],
|
|
34
34
|
url = "https://github.com/eyeonus/Trade-Dangerous",
|
|
35
35
|
project_urls = {
|
|
36
36
|
"Bug Tracker": "https://github.com/eyeonus/Trade-Dangerous/issues",
|
|
@@ -57,8 +57,8 @@ setup(name = package,
|
|
|
57
57
|
package_data = {"tradedangerous": ["templates/TradeDangerous.sql", "templates/Added.csv", "templates/Category.csv", "templates/RareItem.csv"]},
|
|
58
58
|
entry_points = {
|
|
59
59
|
"console_scripts": [
|
|
60
|
-
"trade=
|
|
61
|
-
"tradegui=
|
|
60
|
+
"trade=trade:main",
|
|
61
|
+
"tradegui=tradegui:main"
|
|
62
62
|
]
|
|
63
63
|
},
|
|
64
64
|
zip_safe = False
|
|
@@ -33,19 +33,12 @@
|
|
|
33
33
|
# DEVELOPERS: If you are a programmer who wants TD to do something
|
|
34
34
|
# cool, please see the TradeDB and TradeCalc modules. TD is designed
|
|
35
35
|
# to empower other programmers to do cool stuff.
|
|
36
|
-
from __future__ import annotations
|
|
37
|
-
|
|
38
36
|
from tradedangerous import cli
|
|
39
37
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
def main(argv: list[tuple] = None) -> None:
|
|
44
|
-
""" Entry point for the TradeDangerous command-line app. """
|
|
45
|
-
if argv is None:
|
|
46
|
-
argv = sys.argv
|
|
47
|
-
cli.main(argv)
|
|
48
|
-
|
|
38
|
+
def main(argv = None):
|
|
39
|
+
import sys
|
|
40
|
+
cli.main(sys.argv)
|
|
49
41
|
|
|
50
42
|
if __name__ == "__main__":
|
|
51
|
-
|
|
43
|
+
import sys
|
|
44
|
+
cli.main(sys.argv)
|
|
@@ -57,11 +57,11 @@ def run(results, cmdenv, tdb: TradeDB):
|
|
|
57
57
|
if not cmdenv.force:
|
|
58
58
|
if tdb.dbPath.exists():
|
|
59
59
|
raise CommandLineError(
|
|
60
|
-
"SQLite3 database '{tdb.dbFilename}' already exists.\n"
|
|
60
|
+
f"SQLite3 database '{tdb.dbFilename}' already exists.\n"
|
|
61
61
|
"Either remove the file first or use the '-f' option.")
|
|
62
62
|
|
|
63
63
|
if not tdb.sqlPath.exists():
|
|
64
|
-
raise CommandLineError("SQL File does not exist: {tdb.sqlFilename}")
|
|
64
|
+
raise CommandLineError(f"SQL File does not exist: {tdb.sqlFilename}")
|
|
65
65
|
|
|
66
66
|
buildCache(tdb, cmdenv)
|
|
67
67
|
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
from tradedangerous import tradedb
|
|
2
|
+
from tradedangerous.tradeexcept import TradeException
|
|
2
3
|
|
|
3
|
-
import tradedb
|
|
4
|
-
from tradeexcept import TradeException
|
|
5
4
|
import json
|
|
5
|
+
import sys
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
sys.stderr.write("*** WARNING: jsonprices.py is deprecated; if you rely on it, please post a github issue\n")
|
|
9
|
+
|
|
6
10
|
|
|
7
11
|
class UnknownSystemError(TradeException):
|
|
8
12
|
def __str__(self):
|
|
@@ -12,6 +16,7 @@ class UnknownStationError(TradeException):
|
|
|
12
16
|
def __str__(self):
|
|
13
17
|
return "Unknown Station: " + ' '.join(self.args)
|
|
14
18
|
|
|
19
|
+
|
|
15
20
|
def lookup_system(tdb, tdenv, name, x, y, z):
|
|
16
21
|
try:
|
|
17
22
|
system = tdb.systemByName[name.upper()]
|
|
@@ -112,6 +117,13 @@ def load_prices_json(
|
|
|
112
117
|
blackMarket = '?'
|
|
113
118
|
except KeyError:
|
|
114
119
|
blackMarket = '?'
|
|
120
|
+
|
|
121
|
+
try:
|
|
122
|
+
maxPadSize = stnData['mps'].upper()
|
|
123
|
+
if maxPadSize not in ['S', 'M', 'L']:
|
|
124
|
+
maxPadSize = '?'
|
|
125
|
+
except KeyError:
|
|
126
|
+
maxPadSize = '?'
|
|
115
127
|
|
|
116
128
|
system = lookup_system(
|
|
117
129
|
tdb, tdenv,
|
|
@@ -139,6 +151,7 @@ def load_prices_json(
|
|
|
139
151
|
stnName,
|
|
140
152
|
lsFromStar,
|
|
141
153
|
blackMarket,
|
|
154
|
+
maxPadSize,
|
|
142
155
|
)
|
|
143
156
|
if not station:
|
|
144
157
|
if tdenv.ignoreUnknown:
|
|
@@ -129,7 +129,6 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
129
129
|
"(Useful for updating Vendor tables if they were skipped during a '-O clean' run.)",
|
|
130
130
|
'purge': "Remove any empty systems that previously had fleet carriers.",
|
|
131
131
|
'solo': "Don't download crowd-sourced market data. (Implies '-O skipvend', supercedes '-O all', '-O clean', '-O listings'.)",
|
|
132
|
-
"prices": "Backup listings to the TradeDangerous.prices cache file",
|
|
133
132
|
}
|
|
134
133
|
|
|
135
134
|
def __init__(self, tdb, tdenv):
|
|
@@ -499,7 +498,7 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
499
498
|
if self.downloadFile(self.liveListingsPath) or self.getOption("force"):
|
|
500
499
|
self.importListings(self.liveListingsPath)
|
|
501
500
|
|
|
502
|
-
if self.getOption("
|
|
501
|
+
if self.getOption("listings"):
|
|
503
502
|
self.tdenv.NOTE("Regenerating .prices file.")
|
|
504
503
|
cache.regeneratePricesFile(self.tdb, self.tdenv)
|
|
505
504
|
|
|
@@ -294,19 +294,14 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
294
294
|
|
|
295
295
|
for station, commodities in stations:
|
|
296
296
|
fq_station_name = f'@{upper_sys}/{station.name}'
|
|
297
|
-
if age_cutoff and (now - station.modified) > age_cutoff:
|
|
298
|
-
if self.tdenv.detail:
|
|
299
|
-
self.print(f' | {fq_station_name:50s} | Skipping station due to age: {now - station.modified}, ts: {station.modified}')
|
|
300
|
-
progress.bump(sys_task)
|
|
301
|
-
continue
|
|
302
297
|
|
|
303
298
|
station_info = self.known_stations.get(station.id)
|
|
304
|
-
if not station_info:
|
|
299
|
+
if not station_info or station.modified > station_info[2]:
|
|
305
300
|
self.ensure_station(station)
|
|
306
301
|
elif station_info[1] != station.system_id:
|
|
307
302
|
self.print(f' | {station.name:50s} | Megaship station moved, updating system')
|
|
308
303
|
self.execute("UPDATE Station SET system_id = ? WHERE station_id = ?", station.system_id, station.id, commitable=True)
|
|
309
|
-
self.known_stations[station.id] = (station.name, station.system_id)
|
|
304
|
+
self.known_stations[station.id] = (station.name, station.system_id, station.modified)
|
|
310
305
|
|
|
311
306
|
items = []
|
|
312
307
|
db_times = dict(self.execute("SELECT item_id, modified FROM StationItem WHERE station_id = ?", station.id))
|
|
@@ -315,12 +310,19 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
315
310
|
if commodity.id not in self.known_commodities:
|
|
316
311
|
commodity = self.ensure_commodity(commodity)
|
|
317
312
|
|
|
313
|
+
# We're concerned with the market age, not the station age,
|
|
314
|
+
# as they each have their own 'modified' times.
|
|
315
|
+
if age_cutoff and (now - commodity.modified) > age_cutoff:
|
|
316
|
+
if self.tdenv.detail:
|
|
317
|
+
self.print(f' | {fq_station_name:50s} | Skipping station due to age: {now - station.modified}, ts: {station.modified}')
|
|
318
|
+
break
|
|
319
|
+
|
|
318
320
|
db_modified = db_times.get(commodity.id)
|
|
319
321
|
modified = parse_ts(db_modified) if db_modified else None
|
|
320
322
|
if modified and commodity.modified <= modified:
|
|
321
323
|
# All commodities in a station will have the same modified time,
|
|
322
324
|
# so no need to check the rest if the fist is older.
|
|
323
|
-
if self.tdenv.detail:
|
|
325
|
+
if self.tdenv.detail > 2:
|
|
324
326
|
self.print(f' | {fq_station_name:50s} | Skipping older commodity data')
|
|
325
327
|
break
|
|
326
328
|
items.append((station.id, commodity.id, commodity.modified,
|
|
@@ -337,8 +339,8 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
337
339
|
?, ?, ?, ?
|
|
338
340
|
)""", items, commitable=True)
|
|
339
341
|
commodity_count += len(items)
|
|
340
|
-
|
|
341
|
-
|
|
342
|
+
# Good time to save data and try to keep the transaction small
|
|
343
|
+
self.commit()
|
|
342
344
|
|
|
343
345
|
if commodity_count:
|
|
344
346
|
station_count += 1
|
|
@@ -360,12 +362,6 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
360
362
|
progress.update(f"{sys_desc}{DIM} ({total_station_count}:station:, {avg_stations:.1f}per:glowing_star:){CLOSE}")
|
|
361
363
|
|
|
362
364
|
self.commit()
|
|
363
|
-
|
|
364
|
-
# Need to make sure cached tables are updated, if changes were made
|
|
365
|
-
# if self.update_cache:
|
|
366
|
-
# for table in [ "Item", "Station", "System" ]:
|
|
367
|
-
# _, path = csvexport.exportTableToFile( self.tdb, self.tdenv, table )
|
|
368
|
-
|
|
369
365
|
self.tdb.close()
|
|
370
366
|
|
|
371
367
|
# Need to make sure cached tables are updated
|
|
@@ -378,6 +374,11 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
378
374
|
f'{total_station_count} st {total_commodity_count} co'
|
|
379
375
|
)
|
|
380
376
|
|
|
377
|
+
with Timing() as timing:
|
|
378
|
+
self.print('Exporting to cache...')
|
|
379
|
+
cache.regeneratePricesFile(self.tdb, self.tdenv)
|
|
380
|
+
self.print(f'Cache export completed in {timedelta(seconds=int(timing.elapsed))!s}')
|
|
381
|
+
|
|
381
382
|
return False
|
|
382
383
|
|
|
383
384
|
def data_stream(self):
|
|
@@ -445,7 +446,7 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
445
446
|
def load_known_stations(self) -> dict[int, tuple[str, int]]:
|
|
446
447
|
""" Returns a dictionary of {station_id -> (station_name, system_id)} for all current stations in the database. """
|
|
447
448
|
try:
|
|
448
|
-
return {cols[0]: (cols[1], cols[2]) for cols in self.cursor.execute('SELECT station_id, name, system_id FROM Station')}
|
|
449
|
+
return {cols[0]: (cols[1], cols[2], parse_ts(cols[3])) for cols in self.cursor.execute('SELECT station_id, name, system_id, modified FROM Station')}
|
|
449
450
|
except Exception as e: # pylint: disable=broad-except
|
|
450
451
|
self.print("[purple]:thinking_face:Assuming no station data yet")
|
|
451
452
|
self.tdenv.DEBUG0(f"load_known_stations query raised {e}")
|
|
@@ -477,7 +478,7 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
477
478
|
""" Adds a record for a station, and registers the station in the known_stations dict. """
|
|
478
479
|
self.execute(
|
|
479
480
|
'''
|
|
480
|
-
INSERT INTO Station (
|
|
481
|
+
INSERT OR REPLACE INTO Station (
|
|
481
482
|
system_id, station_id, name,
|
|
482
483
|
ls_from_star, max_pad_size,
|
|
483
484
|
market, blackmarket, shipyard, outfitting,
|
|
@@ -513,9 +514,10 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
513
514
|
station.type,
|
|
514
515
|
commitable=True,
|
|
515
516
|
)
|
|
517
|
+
note = "Updated" if self.known_stations.get(station.id) else "Added"
|
|
516
518
|
if self.tdenv.detail > 1:
|
|
517
|
-
self.print(f' | {station.name:50s} |
|
|
518
|
-
self.known_stations[station.id] = (station.name, station.system_id)
|
|
519
|
+
self.print(f' | {station.name:50s} | {note} station')
|
|
520
|
+
self.known_stations[station.id] = (station.name, station.system_id, station.modified)
|
|
519
521
|
|
|
520
522
|
def ensure_commodity(self, commodity: Commodity):
|
|
521
523
|
""" Adds a record for a commodity and registers the commodity in the known_commodities dict. """
|
|
@@ -21,8 +21,8 @@ import sys
|
|
|
21
21
|
import tradedb
|
|
22
22
|
import tradeenv
|
|
23
23
|
|
|
24
|
-
from misc.edsc import StarSubmission, StarSubmissionResult, SubmissionError
|
|
25
|
-
from misc.clipboard import SystemNameClip
|
|
24
|
+
from tradedangerous.misc.edsc import StarSubmission, StarSubmissionResult, SubmissionError
|
|
25
|
+
from tradedangerous.misc.clipboard import SystemNameClip
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
standardStars = [
|
|
@@ -33,6 +33,10 @@ standardStars = [
|
|
|
33
33
|
"ASELLUS AUSTRALIS",
|
|
34
34
|
]
|
|
35
35
|
|
|
36
|
+
|
|
37
|
+
sys.stderr.write("*** WARNING: submit-distances.py is deprecated; if you rely on it, please post a github issue\n")
|
|
38
|
+
|
|
39
|
+
|
|
36
40
|
############################################################################
|
|
37
41
|
|
|
38
42
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tradedangerous
|
|
3
|
-
Version: 11.0.
|
|
3
|
+
Version: 11.0.6
|
|
4
4
|
Summary: Trade-Dangerous is a set of powerful trading tools for Elite Dangerous, organized around one of the most powerful trade run optimizers available.
|
|
5
5
|
Home-page: https://github.com/eyeonus/Trade-Dangerous
|
|
6
6
|
Author: eyeonus
|
|
@@ -3,6 +3,8 @@ README.md
|
|
|
3
3
|
pyproject.toml
|
|
4
4
|
setup.cfg
|
|
5
5
|
setup.py
|
|
6
|
+
trade.py
|
|
7
|
+
tradegui.py
|
|
6
8
|
tests/test_bootstrap_commands.py
|
|
7
9
|
tests/test_bootstrap_plugins.py
|
|
8
10
|
tests/test_cache.py
|
|
@@ -28,12 +30,10 @@ tradedangerous/mapping.py
|
|
|
28
30
|
tradedangerous/prices.py
|
|
29
31
|
tradedangerous/submit-distances.py
|
|
30
32
|
tradedangerous/tools.py
|
|
31
|
-
tradedangerous/trade.py
|
|
32
33
|
tradedangerous/tradecalc.py
|
|
33
34
|
tradedangerous/tradedb.py
|
|
34
35
|
tradedangerous/tradeenv.py
|
|
35
36
|
tradedangerous/tradeexcept.py
|
|
36
|
-
tradedangerous/tradegui.py
|
|
37
37
|
tradedangerous/transfers.py
|
|
38
38
|
tradedangerous/utils.py
|
|
39
39
|
tradedangerous/version.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tradedangerous-11.0.4 → tradedangerous-11.0.6}/tradedangerous.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|