tradedangerous 12.0.6__py3-none-any.whl → 12.0.8__py3-none-any.whl
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/plugins/eddblink_plug.py +2 -2
- tradedangerous/plugins/spansh_plug.py +1 -1
- tradedangerous/transfers.py +26 -13
- tradedangerous/version.py +1 -1
- {tradedangerous-12.0.6.dist-info → tradedangerous-12.0.8.dist-info}/METADATA +1 -1
- {tradedangerous-12.0.6.dist-info → tradedangerous-12.0.8.dist-info}/RECORD +10 -10
- {tradedangerous-12.0.6.dist-info → tradedangerous-12.0.8.dist-info}/WHEEL +0 -0
- {tradedangerous-12.0.6.dist-info → tradedangerous-12.0.8.dist-info}/entry_points.txt +0 -0
- {tradedangerous-12.0.6.dist-info → tradedangerous-12.0.8.dist-info}/licenses/LICENSE +0 -0
- {tradedangerous-12.0.6.dist-info → tradedangerous-12.0.8.dist-info}/top_level.txt +0 -0
|
@@ -129,7 +129,7 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
129
129
|
self.pricesPath = Path("listings.prices")
|
|
130
130
|
|
|
131
131
|
def now(self):
|
|
132
|
-
return datetime.datetime.now()
|
|
132
|
+
return datetime.datetime.now().strftime('%H:%M:%S')
|
|
133
133
|
|
|
134
134
|
def downloadFile(self, path):
|
|
135
135
|
"""
|
|
@@ -216,7 +216,7 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
216
216
|
return
|
|
217
217
|
|
|
218
218
|
self.tdenv.NOTE(
|
|
219
|
-
"Processing market data from {}: Start time = {}
|
|
219
|
+
"Processing market data from {}: Start time = {}, Live = {}",
|
|
220
220
|
listings_file, self.now(), from_live
|
|
221
221
|
)
|
|
222
222
|
|
|
@@ -2025,7 +2025,7 @@ class ImportPlugin(plugins.ImportPluginBase):
|
|
|
2025
2025
|
commodity_csv = files.get("commodity")
|
|
2026
2026
|
if commodity_csv and Path(commodity_csv).exists():
|
|
2027
2027
|
with open(commodity_csv, "r", encoding="utf-8", newline="") as fh2:
|
|
2028
|
-
rd2 =
|
|
2028
|
+
rd2 = csv.DictReader(fh2)
|
|
2029
2029
|
k2_name = _kwant(rd2.fieldnames, "name","commodity","commodityname","product")
|
|
2030
2030
|
k2_cat = _kwant(rd2.fieldnames, "category","categoryname")
|
|
2031
2031
|
if k2_name and k2_cat:
|
tradedangerous/transfers.py
CHANGED
|
@@ -26,18 +26,29 @@ if typing.TYPE_CHECKING:
|
|
|
26
26
|
class HTTP404(TradeException):
|
|
27
27
|
pass
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
|
|
30
|
+
def makeUnit(value: float) -> str:
|
|
31
|
+
num, unit = split_unit(value)
|
|
32
|
+
return f"{num}{unit}"
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def split_unit(value: float) -> tuple[str, str]:
|
|
30
36
|
"""
|
|
31
|
-
|
|
37
|
+
Split a byte size into a (number_str, unit_str) tuple.
|
|
38
|
+
Used when you need to colour or format the numeric part separately.
|
|
39
|
+
|
|
40
|
+
Example:
|
|
41
|
+
>>> split_unit(30200000)
|
|
42
|
+
('28.8', 'MB')
|
|
32
43
|
"""
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return
|
|
44
|
+
units = ["B", "KB", "MB", "GB", "TB"]
|
|
45
|
+
n = float(value)
|
|
46
|
+
i = 0
|
|
47
|
+
while n >= 1024.0 and i < len(units) - 1:
|
|
48
|
+
n /= 1024.0
|
|
49
|
+
i += 1
|
|
50
|
+
num_str = f"{n:.1f}" if i > 0 else f"{int(n)}"
|
|
51
|
+
return num_str, units[i]
|
|
41
52
|
|
|
42
53
|
|
|
43
54
|
def get_filename_from_url(url: str) -> str:
|
|
@@ -128,11 +139,13 @@ def download(
|
|
|
128
139
|
|
|
129
140
|
if not tdenv.quiet:
|
|
130
141
|
elapsed = (time.time() - started) or 1
|
|
142
|
+
num1, unit1 = split_unit(fetched)
|
|
143
|
+
num2, unit2 = split_unit(fetched / elapsed)
|
|
131
144
|
tdenv.NOTE(
|
|
132
|
-
"Downloaded {} of {}ed data
|
|
133
|
-
|
|
134
|
-
makeUnit(fetched / elapsed)
|
|
145
|
+
f"Downloaded [cyan]{num1}[/]{unit1} of {encoding}ed data "
|
|
146
|
+
f"[cyan]{num2}[/]{unit2}/s"
|
|
135
147
|
)
|
|
148
|
+
|
|
136
149
|
|
|
137
150
|
fs.ensurefolder(actPath.parent)
|
|
138
151
|
|
tradedangerous/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tradedangerous
|
|
3
|
-
Version: 12.0.
|
|
3
|
+
Version: 12.0.8
|
|
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
|
|
@@ -18,9 +18,9 @@ tradedangerous/tradecalc.py,sha256=LA37VAaVS8lSRW1Ydmo28R9FmFwhjoieOMG6KxVtn9A,4
|
|
|
18
18
|
tradedangerous/tradedb.py,sha256=s1ZFK1ZmJz1_EBdIBdW0IBeWNoT-UP0j1JhBxIFQvws,79215
|
|
19
19
|
tradedangerous/tradeenv.py,sha256=FrKAqFQQO5N0jrld9Ie1Tw23PoXxVBpA85n9RyEw2xg,12338
|
|
20
20
|
tradedangerous/tradeexcept.py,sha256=aZ-Y31MbkjF7lmAzBAbaMsPPE7FEEfuf4gaX2GvriDk,368
|
|
21
|
-
tradedangerous/transfers.py,sha256=
|
|
21
|
+
tradedangerous/transfers.py,sha256=mx5bidC8g67ShP3G-1IoWcXjDgMOHH35Kw6qUROcP4Y,6363
|
|
22
22
|
tradedangerous/utils.py,sha256=PUPvAEqUyxYGqqQa0b_yfLAvq8YVUxK6HfdS-CxM-Lo,5186
|
|
23
|
-
tradedangerous/version.py,sha256=
|
|
23
|
+
tradedangerous/version.py,sha256=2TUHZgKzIdGYfEB7HvkeIqcgKAxuuDubL1n-Ekw5WD4,646
|
|
24
24
|
tradedangerous/commands/TEMPLATE.py,sha256=seMXDN_Nf_Rvj_5BivI-0yhVT6W9iRDihr5yo8kr5qw,2069
|
|
25
25
|
tradedangerous/commands/__init__.py,sha256=UvcWgcr_PVScbJ6R83iaUb2_4Ttmft85HYexTFo7FwU,9171
|
|
26
26
|
tradedangerous/commands/buildcache_cmd.py,sha256=WwDRLcVGCWZSM9x2jKpXXj2QRt5RLkvrcHzmZ8UCI_s,3346
|
|
@@ -68,16 +68,16 @@ tradedangerous/misc/prices-json-exp.py,sha256=Fpm62ugP35ZBqnRs6ekYfS3GoDFYmvLD3b
|
|
|
68
68
|
tradedangerous/misc/progress.py,sha256=QwWgbbhAuMB7LG0o-jy7WxN1uhLHtN0FwKkV314ulrA,7170
|
|
69
69
|
tradedangerous/plugins/__init__.py,sha256=TL-OIptlqNENKhoFqkFeBJn_vSw8L0pVaDJgjhaTj7A,7860
|
|
70
70
|
tradedangerous/plugins/edcd_plug.py,sha256=JuDtuEM_mN9Sz2H09-qYizM-9N3cuNjgvQy7Y-wHwKw,14412
|
|
71
|
-
tradedangerous/plugins/eddblink_plug.py,sha256=
|
|
71
|
+
tradedangerous/plugins/eddblink_plug.py,sha256=oHQi0TUK6mdGFNCEIh6YVXy2tielwsSslT0AGvDrWVA,20402
|
|
72
72
|
tradedangerous/plugins/edmc_batch_plug.py,sha256=rrP_lFFxWsba8DPEo0WF2EdCiMoRC7tCT8z62MIvtIo,4173
|
|
73
|
-
tradedangerous/plugins/spansh_plug.py,sha256=
|
|
73
|
+
tradedangerous/plugins/spansh_plug.py,sha256=IROvg7A3s9pYgr0Dcx0NaVVAkejaij0wqWPH3xNeeEQ,110833
|
|
74
74
|
tradedangerous/templates/Added.csv,sha256=8o54civQCcS9y7_DBo0GX196XWRbbREQqKDYTKibsgQ,649
|
|
75
75
|
tradedangerous/templates/Category.csv,sha256=8xwUDcBZE25T6x6dZGlRUMTCqeDLt3a9LXU5h6hRHV8,250
|
|
76
76
|
tradedangerous/templates/RareItem.csv,sha256=F1RhRnTD82PiwrVUO-ai2ErGH2PTqNnQaDw5mcgljXs,10483
|
|
77
77
|
tradedangerous/templates/TradeDangerous.sql,sha256=pCw2Js8GQniqAWC6N3SL-ujyqlLYCeR2-SI-qhk6VsI,9336
|
|
78
|
-
tradedangerous-12.0.
|
|
79
|
-
tradedangerous-12.0.
|
|
80
|
-
tradedangerous-12.0.
|
|
81
|
-
tradedangerous-12.0.
|
|
82
|
-
tradedangerous-12.0.
|
|
83
|
-
tradedangerous-12.0.
|
|
78
|
+
tradedangerous-12.0.8.dist-info/licenses/LICENSE,sha256=HyVuytGSiAUQ6ErWBHTqt1iSGHhLmlC8fO7jTCuR8dU,16725
|
|
79
|
+
tradedangerous-12.0.8.dist-info/METADATA,sha256=WDIeVtAbL5OGPRuUFJXabQ6DG-bkOO6JLk-kgS_dCIc,4873
|
|
80
|
+
tradedangerous-12.0.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
81
|
+
tradedangerous-12.0.8.dist-info/entry_points.txt,sha256=lrA7U9JHOcNuam2WEK4Hmc3vQ3mrJfsbJCE74qd9au8,62
|
|
82
|
+
tradedangerous-12.0.8.dist-info/top_level.txt,sha256=JEoOVAhg5GfXZ4kHpNontu0RVzek_7P9_jp93f3Pqn8,16
|
|
83
|
+
tradedangerous-12.0.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|