tradedangerous 10.15.0__tar.gz → 10.15.2__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-10.15.0 → tradedangerous-10.15.2}/PKG-INFO +1 -1
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/cache.py +6 -5
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/plugins/spansh_plug.py +38 -8
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/version.py +1 -1
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous.egg-info/PKG-INFO +1 -1
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/LICENSE +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/README.md +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/pyproject.toml +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/setup.cfg +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/setup.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tests/test_bootstrap_commands.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tests/test_bootstrap_plugins.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tests/test_cache.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tests/test_commands.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tests/test_fs.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tests/test_peek.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tests/test_tools.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tests/test_trade.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tests/test_trade_import_eddblink.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tests/test_trade_run.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tests/test_utils.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/__init__.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/cli.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/commands/TEMPLATE.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/commands/__init__.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/commands/buildcache_cmd.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/commands/buy_cmd.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/commands/commandenv.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/commands/exceptions.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/commands/export_cmd.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/commands/import_cmd.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/commands/local_cmd.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/commands/market_cmd.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/commands/nav_cmd.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/commands/olddata_cmd.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/commands/parsing.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/commands/rares_cmd.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/commands/run_cmd.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/commands/sell_cmd.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/commands/shipvendor_cmd.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/commands/station_cmd.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/commands/trade_cmd.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/commands/update_cmd.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/commands/update_gui.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/corrections.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/csvexport.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/edscupdate.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/edsmupdate.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/formatting.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/fs.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/gui.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/jsonprices.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/mapping.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/mfd/__init__.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/mfd/saitek/__init__.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/mfd/saitek/directoutput.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/mfd/saitek/x52pro.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/misc/checkpricebounds.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/misc/clipboard.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/misc/coord64.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/misc/derp-sentinel.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/misc/diff-system-csvs.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/misc/eddb.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/misc/eddn.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/misc/edsc.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/misc/edsm.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/misc/importeddbstats.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/misc/prices-json-exp.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/misc/progress.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/plugins/__init__.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/plugins/edapi_plug.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/plugins/edcd_plug.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/plugins/eddblink_plug.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/plugins/edmc_batch_plug.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/plugins/journal_plug.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/plugins/netlog_plug.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/prices.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/submit-distances.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/templates/Added.csv +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/templates/DefaultShipIndex.json +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/templates/RareItem.csv +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/templates/TradeDangerous.sql +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/tools.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/trade.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/tradecalc.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/tradedb.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/tradeenv.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/tradeexcept.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/tradegui.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/transfers.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/utils.py +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous.egg-info/SOURCES.txt +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous.egg-info/dependency_links.txt +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous.egg-info/entry_points.txt +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous.egg-info/not-zip-safe +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous.egg-info/requires.txt +0 -0
- {tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tradedangerous
|
|
3
|
-
Version: 10.15.
|
|
3
|
+
Version: 10.15.2
|
|
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
|
|
@@ -548,17 +548,18 @@ def processPrices(tdenv, priceFile, db, defaultZero):
|
|
|
548
548
|
|
|
549
549
|
processedItems[itemID] = lineNo
|
|
550
550
|
|
|
551
|
+
space_cleanup = re.compile(r'\s{2,}').sub
|
|
551
552
|
for line in priceFile:
|
|
552
553
|
lineNo += 1
|
|
553
554
|
text, _, comment = line.partition('#')
|
|
554
|
-
text =
|
|
555
|
+
text = space_cleanup(line, ' ').strip()
|
|
555
556
|
if not text:
|
|
556
557
|
continue
|
|
557
558
|
|
|
558
|
-
# replace whitespace with single spaces
|
|
559
|
-
if text.find(" "):
|
|
560
|
-
|
|
561
|
-
|
|
559
|
+
# # replace whitespace with single spaces
|
|
560
|
+
# if text.find(" "):
|
|
561
|
+
# # http://stackoverflow.com/questions/2077897
|
|
562
|
+
# text = ' '.join(text.split())
|
|
562
563
|
|
|
563
564
|
########################################
|
|
564
565
|
# ## "@ STAR/Station" lines.
|
|
@@ -9,7 +9,7 @@ import requests
|
|
|
9
9
|
import simdjson
|
|
10
10
|
import sqlite3
|
|
11
11
|
|
|
12
|
-
from .. import plugins, cache, fs, transfers
|
|
12
|
+
from .. import plugins, cache, fs, transfers, csvexport
|
|
13
13
|
|
|
14
14
|
SOURCE_URL = 'https://downloads.spansh.co.uk/galaxy_stations.json'
|
|
15
15
|
|
|
@@ -63,7 +63,7 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
63
63
|
super().__init__(*args, **kwargs)
|
|
64
64
|
self.url = self.getOption('url')
|
|
65
65
|
self.file = self.getOption('file')
|
|
66
|
-
self.maxage = float(self.getOption('maxage'))
|
|
66
|
+
self.maxage = float(self.getOption('maxage')) if self.getOption('maxage') else None
|
|
67
67
|
self.listener = self.getOption('listener')
|
|
68
68
|
assert not (self.url and self.file), 'Provide either url or file, not both'
|
|
69
69
|
if self.file and (self.file != '-'):
|
|
@@ -100,18 +100,19 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
100
100
|
total_station_count = 0
|
|
101
101
|
total_commodity_count = 0
|
|
102
102
|
self.need_commit = False
|
|
103
|
+
self.update_cache = False
|
|
103
104
|
seen_stations = set()
|
|
104
105
|
for system, stations in self.data_stream():
|
|
105
106
|
self.ensure_system(system)
|
|
106
107
|
station_count = 0
|
|
107
108
|
commodity_count = 0
|
|
108
109
|
for station, commodities in stations:
|
|
109
|
-
|
|
110
|
+
fq_station_name = f'@{system.name.upper()}/{station.name}'
|
|
111
|
+
if self.maxage and (datetime.now() - station.modified) > timedelta(days=self.maxage):
|
|
110
112
|
if self.tdenv.detail >= 1:
|
|
111
|
-
self.print(f' |
|
|
113
|
+
self.print(f' | {fq_station_name:50s} | Skipping station due to age: {datetime.now() - station.modified}, ts: {station.modified}')
|
|
112
114
|
continue
|
|
113
115
|
if (system.name.upper(), station.name.upper()) in seen_stations:
|
|
114
|
-
fq_station_name = f'@{system.name.upper()}/{station.name}'
|
|
115
116
|
if self.tdenv.detail >= 1:
|
|
116
117
|
self.print(f' | {fq_station_name:50s} | Skipping duplicate station record')
|
|
117
118
|
continue
|
|
@@ -148,6 +149,13 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
148
149
|
if self.need_commit:
|
|
149
150
|
self.execute('COMMIT')
|
|
150
151
|
self.need_commit = False
|
|
152
|
+
self.update_cache = True
|
|
153
|
+
|
|
154
|
+
# Need to make sure cached tables are updated, if changes were made
|
|
155
|
+
if self.update_cache:
|
|
156
|
+
for table in [ "Item", "Station", "System" ]:
|
|
157
|
+
_, path = csvexport.exportTableToFile( self.tdb, self.tdenv, table )
|
|
158
|
+
|
|
151
159
|
self.print(
|
|
152
160
|
f'{timedelta(seconds=int(timing.elapsed))!s} Done '
|
|
153
161
|
f'{total_station_count} st {total_commodity_count} co'
|
|
@@ -198,7 +206,7 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
198
206
|
# if not attempts:
|
|
199
207
|
# raise
|
|
200
208
|
# attempts -= 1
|
|
201
|
-
self.print(f'Retrying query: {ex!s}')
|
|
209
|
+
self.print(f'Retrying query \'{query}\': {ex!s}')
|
|
202
210
|
time.sleep(1)
|
|
203
211
|
|
|
204
212
|
def load_known_space(self):
|
|
@@ -296,13 +304,35 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
296
304
|
return commodity
|
|
297
305
|
self.execute(
|
|
298
306
|
'''
|
|
299
|
-
INSERT INTO Item (category_id, name, fdev_id)
|
|
300
|
-
VALUES ((SELECT category_id FROM Category WHERE upper(name) = ?), ?, ?)
|
|
307
|
+
INSERT INTO Item (item_id, category_id, name, fdev_id)
|
|
308
|
+
VALUES (?, (SELECT category_id FROM Category WHERE upper(name) = ?), ?, ?)
|
|
301
309
|
''',
|
|
310
|
+
commodity.id,
|
|
302
311
|
commodity.category.upper(),
|
|
303
312
|
commodity.name,
|
|
304
313
|
commodity.id,
|
|
305
314
|
)
|
|
315
|
+
|
|
316
|
+
# Need to update ui_order
|
|
317
|
+
temp = self.execute("""SELECT
|
|
318
|
+
name, category_id, fdev_id
|
|
319
|
+
FROM Item
|
|
320
|
+
ORDER BY category_id, name
|
|
321
|
+
""")
|
|
322
|
+
cat_id = 0
|
|
323
|
+
ui_order = 1
|
|
324
|
+
self.tdenv.DEBUG0("Adding ui_order data to items.")
|
|
325
|
+
for line in temp:
|
|
326
|
+
if line[1] != cat_id:
|
|
327
|
+
ui_order = 1
|
|
328
|
+
cat_id = line[1]
|
|
329
|
+
else:
|
|
330
|
+
ui_order += 1
|
|
331
|
+
self.execute("""UPDATE Item
|
|
332
|
+
set ui_order = ?
|
|
333
|
+
WHERE fdev_id = ?""",
|
|
334
|
+
ui_order, line[2],)
|
|
335
|
+
|
|
306
336
|
self.need_commit = True
|
|
307
337
|
if self.tdenv.detail >= 2:
|
|
308
338
|
self.print(f' | {commodity.name:50s} | Added missing commodity')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tradedangerous
|
|
3
|
-
Version: 10.15.
|
|
3
|
+
Version: 10.15.2
|
|
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
|
|
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-10.15.0 → tradedangerous-10.15.2}/tradedangerous/templates/DefaultShipIndex.json
RENAMED
|
File without changes
|
|
File without changes
|
{tradedangerous-10.15.0 → tradedangerous-10.15.2}/tradedangerous/templates/TradeDangerous.sql
RENAMED
|
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-10.15.0 → tradedangerous-10.15.2}/tradedangerous.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|