tradedangerous 11.5.1__tar.gz → 11.5.3__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.5.1/tradedangerous.egg-info → tradedangerous-11.5.3}/PKG-INFO +13 -2
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/commands/import_cmd.py +3 -3
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/plugins/eddblink_plug.py +2 -1
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/plugins/spansh_plug.py +26 -6
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/version.py +1 -1
- {tradedangerous-11.5.1 → tradedangerous-11.5.3/tradedangerous.egg-info}/PKG-INFO +13 -2
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous.egg-info/SOURCES.txt +1 -2
- tradedangerous-11.5.1/tradedangerous/templates/database_changes.json +0 -6
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/LICENSE +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/README.md +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/pyproject.toml +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/setup.cfg +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/setup.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tests/test_bootstrap_commands.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tests/test_bootstrap_plugins.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tests/test_cache.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tests/test_commands.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tests/test_fs.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tests/test_peek.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tests/test_tools.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tests/test_trade.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tests/test_trade_run.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tests/test_utils.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/trade.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/__init__.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/cache.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/cli.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/commands/TEMPLATE.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/commands/__init__.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/commands/buildcache_cmd.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/commands/buy_cmd.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/commands/commandenv.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/commands/exceptions.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/commands/export_cmd.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/commands/local_cmd.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/commands/market_cmd.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/commands/nav_cmd.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/commands/olddata_cmd.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/commands/parsing.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/commands/rares_cmd.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/commands/run_cmd.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/commands/sell_cmd.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/commands/shipvendor_cmd.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/commands/station_cmd.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/commands/trade_cmd.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/commands/update_cmd.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/commands/update_gui.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/corrections.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/csvexport.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/edscupdate.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/edsmupdate.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/formatting.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/fs.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/gui.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/jsonprices.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/mapping.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/mfd/__init__.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/mfd/saitek/__init__.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/mfd/saitek/directoutput.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/mfd/saitek/x52pro.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/misc/checkpricebounds.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/misc/clipboard.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/misc/coord64.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/misc/derp-sentinel.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/misc/diff-system-csvs.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/misc/eddb.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/misc/eddn.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/misc/edsc.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/misc/edsm.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/misc/importeddbstats.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/misc/prices-json-exp.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/misc/progress.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/plugins/__init__.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/plugins/edapi_plug.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/plugins/edcd_plug.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/plugins/edmc_batch_plug.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/plugins/journal_plug.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/plugins/netlog_plug.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/prices.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/submit-distances.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/templates/Added.csv +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/templates/Category.csv +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/templates/RareItem.csv +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/templates/TradeDangerous.sql +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/tools.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/tradecalc.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/tradedb.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/tradeenv.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/tradeexcept.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/transfers.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous/utils.py +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous.egg-info/dependency_links.txt +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous.egg-info/entry_points.txt +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous.egg-info/not-zip-safe +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous.egg-info/requires.txt +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous.egg-info/top_level.txt +0 -0
- {tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradegui.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: tradedangerous
|
|
3
|
-
Version: 11.5.
|
|
3
|
+
Version: 11.5.3
|
|
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
|
|
@@ -23,6 +23,17 @@ Requires-Dist: requests
|
|
|
23
23
|
Requires-Dist: appJar
|
|
24
24
|
Requires-Dist: ijson
|
|
25
25
|
Requires-Dist: rich
|
|
26
|
+
Dynamic: author
|
|
27
|
+
Dynamic: author-email
|
|
28
|
+
Dynamic: classifier
|
|
29
|
+
Dynamic: description
|
|
30
|
+
Dynamic: description-content-type
|
|
31
|
+
Dynamic: home-page
|
|
32
|
+
Dynamic: keywords
|
|
33
|
+
Dynamic: license
|
|
34
|
+
Dynamic: project-url
|
|
35
|
+
Dynamic: requires-dist
|
|
36
|
+
Dynamic: summary
|
|
26
37
|
|
|
27
38
|
|
|
28
39
|
----------
|
|
@@ -25,9 +25,9 @@ help = (
|
|
|
25
25
|
name = 'import'
|
|
26
26
|
epilog = (
|
|
27
27
|
"This sub-command provides a plugin infrastructure, and comes "
|
|
28
|
-
"with a module to import data from
|
|
29
|
-
"(
|
|
30
|
-
"See \"import -P
|
|
28
|
+
"with a module to import data from Tromador's Trading Dangerously server"
|
|
29
|
+
"(https://elite.tromador.com/).\n"
|
|
30
|
+
"See \"trade import -P eddblink -O help\" for more help."
|
|
31
31
|
)
|
|
32
32
|
wantsTradeDB = False
|
|
33
33
|
arguments = [
|
|
@@ -69,7 +69,8 @@ def _collect_station_modified_times(tdenv: TradeEnv, db: sqlite3.Cursor) -> dict
|
|
|
69
69
|
|
|
70
70
|
class ImportPlugin(plugins.ImportPluginBase):
|
|
71
71
|
"""
|
|
72
|
-
|
|
72
|
+
Import plugin that uses data files from
|
|
73
|
+
https://elite.tromador.com/ to update the Database.
|
|
73
74
|
"""
|
|
74
75
|
pluginOptions = {
|
|
75
76
|
'item': "Update Items using latest file from server. (Implies '-O system,station')",
|
|
@@ -4,16 +4,18 @@ from __future__ import annotations
|
|
|
4
4
|
from collections import namedtuple
|
|
5
5
|
from contextlib import contextmanager
|
|
6
6
|
from datetime import datetime, timedelta
|
|
7
|
+
from email.utils import parsedate_to_datetime
|
|
7
8
|
from pathlib import Path
|
|
8
9
|
from rich.progress import Progress
|
|
9
10
|
|
|
10
11
|
from .. import plugins, cache, transfers, csvexport, corrections
|
|
11
12
|
|
|
13
|
+
import os
|
|
14
|
+
import requests
|
|
12
15
|
import sqlite3
|
|
13
16
|
import sys
|
|
14
17
|
import time
|
|
15
18
|
import typing
|
|
16
|
-
|
|
17
19
|
import ijson
|
|
18
20
|
|
|
19
21
|
if sys.version_info.major == 3 and sys.version_info.minor >= 10:
|
|
@@ -277,14 +279,32 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
277
279
|
|
|
278
280
|
theme = self.tdenv.theme
|
|
279
281
|
BOLD, CLOSE, DIM, ITALIC = theme.bold, theme.CLOSE, theme.dim, theme.italic # pylint: disable=invalid-name
|
|
280
|
-
# TODO: don't download file if local copy is not older
|
|
281
|
-
# see eddblink_plug.download_file()
|
|
282
282
|
if not self.file:
|
|
283
283
|
url = self.url or SOURCE_URL
|
|
284
|
-
|
|
284
|
+
local_mod_time = 0
|
|
285
285
|
self.file = Path(self.tdenv.tmpDir, "galaxy_stations.json")
|
|
286
|
-
|
|
287
|
-
|
|
286
|
+
if self.file.exists():
|
|
287
|
+
local_mod_time = self.file.stat().st_mtime
|
|
288
|
+
|
|
289
|
+
headers = {"User-Agent": "Trade-Dangerous", "Accept-Encoding": "identity"}
|
|
290
|
+
try:
|
|
291
|
+
response = requests.head(url, headers=headers, timeout=70)
|
|
292
|
+
except Exception as e: # pylint: disable=broad-exception-caught
|
|
293
|
+
self.tdenv.WARN("Problem with download:\n URL: {}\n Error: {}", url, str(e))
|
|
294
|
+
return False
|
|
295
|
+
last_modified = response.headers.get("last-modified")
|
|
296
|
+
dump_mod_time = parsedate_to_datetime(last_modified).timestamp()
|
|
297
|
+
if local_mod_time < dump_mod_time:
|
|
298
|
+
if self.file.exists():
|
|
299
|
+
self.file.unlink()
|
|
300
|
+
self.print(f'Downloading prices from remote URL: {url}')
|
|
301
|
+
try:
|
|
302
|
+
transfers.download(self.tdenv, url, self.file)
|
|
303
|
+
except Exception as e: # pylint: disable=broad-exception-caught
|
|
304
|
+
self.tdenv.WARN("Problem with download:\n URL: {}\n Error: {}", url, str(e))
|
|
305
|
+
return False
|
|
306
|
+
self.print(f'Download complete, saved to local file: "{self.file}"')
|
|
307
|
+
os.utime(self.file, (dump_mod_time, dump_mod_time))
|
|
288
308
|
|
|
289
309
|
sys_desc = f"Importing {ITALIC}spansh{CLOSE} data"
|
|
290
310
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: tradedangerous
|
|
3
|
-
Version: 11.5.
|
|
3
|
+
Version: 11.5.3
|
|
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
|
|
@@ -23,6 +23,17 @@ Requires-Dist: requests
|
|
|
23
23
|
Requires-Dist: appJar
|
|
24
24
|
Requires-Dist: ijson
|
|
25
25
|
Requires-Dist: rich
|
|
26
|
+
Dynamic: author
|
|
27
|
+
Dynamic: author-email
|
|
28
|
+
Dynamic: classifier
|
|
29
|
+
Dynamic: description
|
|
30
|
+
Dynamic: description-content-type
|
|
31
|
+
Dynamic: home-page
|
|
32
|
+
Dynamic: keywords
|
|
33
|
+
Dynamic: license
|
|
34
|
+
Dynamic: project-url
|
|
35
|
+
Dynamic: requires-dist
|
|
36
|
+
Dynamic: summary
|
|
26
37
|
|
|
27
38
|
|
|
28
39
|
----------
|
|
@@ -92,5 +92,4 @@ tradedangerous/plugins/spansh_plug.py
|
|
|
92
92
|
tradedangerous/templates/Added.csv
|
|
93
93
|
tradedangerous/templates/Category.csv
|
|
94
94
|
tradedangerous/templates/RareItem.csv
|
|
95
|
-
tradedangerous/templates/TradeDangerous.sql
|
|
96
|
-
tradedangerous/templates/database_changes.json
|
|
95
|
+
tradedangerous/templates/TradeDangerous.sql
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
"DROP TABLE Ship;",
|
|
3
|
-
"CREATE TABLE Ship (ship_id INTEGER PRIMARY KEY, name VARCHAR(40) COLLATE nocase, cost INTEGER, UNIQUE (ship_id));",
|
|
4
|
-
"DROP TABLE Upgrade;",
|
|
5
|
-
"CREATE TABLE Upgrade(upgrade_id INTEGER PRIMARY KEY, name VARCHAR(40) COLLATE nocase, class NUMBER NOT NULL, rating CHAR(1) NOT NULL, ship VARCHAR(40) COLLATE nocase, UNIQUE (upgrade_id));"
|
|
6
|
-
]
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tradedangerous-11.5.1 → tradedangerous-11.5.3}/tradedangerous.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|