cs2tracker 2.1.0__py3-none-any.whl → 2.1.1__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 cs2tracker might be problematic. Click here for more details.
- cs2tracker/_version.py +2 -2
- cs2tracker/application.py +2 -2
- cs2tracker/main.py +6 -6
- cs2tracker/scraper.py +8 -18
- {cs2tracker-2.1.0.dist-info → cs2tracker-2.1.1.dist-info}/METADATA +6 -3
- cs2tracker-2.1.1.dist-info/RECORD +14 -0
- cs2tracker-2.1.0.dist-info/RECORD +0 -14
- {cs2tracker-2.1.0.dist-info → cs2tracker-2.1.1.dist-info}/WHEEL +0 -0
- {cs2tracker-2.1.0.dist-info → cs2tracker-2.1.1.dist-info}/entry_points.txt +0 -0
- {cs2tracker-2.1.0.dist-info → cs2tracker-2.1.1.dist-info}/licenses/LICENSE.md +0 -0
- {cs2tracker-2.1.0.dist-info → cs2tracker-2.1.1.dist-info}/top_level.txt +0 -0
cs2tracker/_version.py
CHANGED
cs2tracker/application.py
CHANGED
|
@@ -88,7 +88,7 @@ class Application:
|
|
|
88
88
|
row_num = 0
|
|
89
89
|
|
|
90
90
|
if not os.path.isfile(OUTPUT_FILE):
|
|
91
|
-
open(OUTPUT_FILE, "w").close()
|
|
91
|
+
open(OUTPUT_FILE, "w", encoding="utf-8").close()
|
|
92
92
|
|
|
93
93
|
with open(OUTPUT_FILE, "r", newline="", encoding="utf-8") as csvfile:
|
|
94
94
|
reader = csv.reader(csvfile)
|
|
@@ -110,5 +110,5 @@ class Application:
|
|
|
110
110
|
|
|
111
111
|
def _plot_file(self):
|
|
112
112
|
if not os.path.isfile(OUTPUT_FILE):
|
|
113
|
-
open(OUTPUT_FILE, "w").close()
|
|
113
|
+
open(OUTPUT_FILE, "w", encoding="utf-8").close()
|
|
114
114
|
subprocess.call([TEXT_EDITOR, OUTPUT_FILE])
|
cs2tracker/main.py
CHANGED
|
@@ -16,12 +16,12 @@ def main():
|
|
|
16
16
|
"[bold yellow]"
|
|
17
17
|
+ """
|
|
18
18
|
__ _____ _____ ______ ____ ____ __ __ _ ___ ____
|
|
19
|
-
/ ] / ___/| T| T|
|
|
20
|
-
/ / (
|
|
21
|
-
/ /
|
|
22
|
-
/
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
/ ] / ___/| T| T| \\ / T / ]| l/ ] / _]| \\
|
|
20
|
+
/ / ( \\_ l__/ || || D )Y o | / / | ' / / [_ | D )
|
|
21
|
+
/ / \\__ T| __jl_j l_j| / | | / / | \\ Y _]| /
|
|
22
|
+
/ \\_ / \\ || / | | | | \\ | _ |/ \\_ | Y| [_ | \\
|
|
23
|
+
\\ | \\ || | | | | . Y| | |\\ || . || T| . Y
|
|
24
|
+
\\____j \\___jl_____j l__j l__j\\_jl__j__j \\____jl__j\\_jl_____jl__j\\_j
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
"""
|
cs2tracker/scraper.py
CHANGED
|
@@ -24,8 +24,6 @@ from .constants import (
|
|
|
24
24
|
)
|
|
25
25
|
|
|
26
26
|
MAX_LINE_LEN = 72
|
|
27
|
-
PADDING_LEN = MAX_LINE_LEN // 2 - 1
|
|
28
|
-
PADDING = "-" * PADDING_LEN
|
|
29
27
|
|
|
30
28
|
|
|
31
29
|
class Scraper:
|
|
@@ -124,21 +122,17 @@ class Scraper:
|
|
|
124
122
|
)
|
|
125
123
|
|
|
126
124
|
def print_total(self):
|
|
127
|
-
usd_string = "USD Total".center(
|
|
128
|
-
MAX_LINE_LEN, "-"
|
|
129
|
-
) # f"{PADDING}USD Total{PADDING}"[:MAX_LINE_LEN]
|
|
125
|
+
usd_string = "USD Total".center(MAX_LINE_LEN, "-")
|
|
130
126
|
self.console.print(f"[bold green]{usd_string}")
|
|
131
127
|
self.console.print(f"${self.total_price:.2f}")
|
|
132
128
|
|
|
133
129
|
self.total_price_euro = CurrencyConverter().convert(
|
|
134
130
|
self.total_price, "USD", "EUR"
|
|
135
131
|
)
|
|
136
|
-
eur_string = "EUR Total".center(
|
|
137
|
-
MAX_LINE_LEN, "-"
|
|
138
|
-
) # f"{PADDING}EUR Total{PADDING}"[:MAX_LINE_LEN]
|
|
132
|
+
eur_string = "EUR Total".center(MAX_LINE_LEN, "-")
|
|
139
133
|
self.console.print(f"[bold green]{eur_string}")
|
|
140
134
|
self.console.print(f"€{self.total_price_euro:.2f}")
|
|
141
|
-
end_string =
|
|
135
|
+
end_string = "-" * MAX_LINE_LEN
|
|
142
136
|
self.console.print(f"[bold green]{end_string}\n")
|
|
143
137
|
|
|
144
138
|
def save_to_file(self):
|
|
@@ -146,7 +140,7 @@ class Scraper:
|
|
|
146
140
|
date = now.strftime("%Y-%m-%d")
|
|
147
141
|
|
|
148
142
|
if not os.path.isfile(OUTPUT_FILE):
|
|
149
|
-
open(OUTPUT_FILE, "w").close()
|
|
143
|
+
open(OUTPUT_FILE, "w", encoding="utf-8").close()
|
|
150
144
|
|
|
151
145
|
with open(OUTPUT_FILE, "r", encoding="utf-8") as csvfile:
|
|
152
146
|
reader = csv.reader(csvfile)
|
|
@@ -255,9 +249,7 @@ class Scraper:
|
|
|
255
249
|
capsule_quantities,
|
|
256
250
|
):
|
|
257
251
|
if any([quantity > 0 for quantity in capsule_quantities]):
|
|
258
|
-
title_string = capsule_name.center(
|
|
259
|
-
MAX_LINE_LEN, "-"
|
|
260
|
-
) # f"{PADDING}{capsule_name}{PADDING}"[:MAX_LINE_LEN]
|
|
252
|
+
title_string = capsule_name.center(MAX_LINE_LEN, "-")
|
|
261
253
|
self.console.print(f"[bold magenta]{title_string}")
|
|
262
254
|
|
|
263
255
|
page = self._get_page(capsule_page_url)
|
|
@@ -295,7 +287,7 @@ class Scraper:
|
|
|
295
287
|
|
|
296
288
|
self.total_price += price_total
|
|
297
289
|
|
|
298
|
-
except
|
|
290
|
+
except (AttributeError, ValueError):
|
|
299
291
|
self.console.print("[bold red][!] Failed to find price listing")
|
|
300
292
|
break
|
|
301
293
|
|
|
@@ -306,9 +298,7 @@ class Scraper:
|
|
|
306
298
|
):
|
|
307
299
|
for index, case_quantity in enumerate(case_quantities):
|
|
308
300
|
if case_quantity > 0:
|
|
309
|
-
title_string = case_names[index].center(
|
|
310
|
-
MAX_LINE_LEN, "-"
|
|
311
|
-
) # f"{PADDING}{case_names[index]}{PADDING}"[:MAX_LINE_LEN]
|
|
301
|
+
title_string = case_names[index].center(MAX_LINE_LEN, "-")
|
|
312
302
|
self.console.print(f"[bold magenta]{title_string}")
|
|
313
303
|
|
|
314
304
|
page = self._get_page(case_page_urls[index])
|
|
@@ -339,7 +329,7 @@ class Scraper:
|
|
|
339
329
|
|
|
340
330
|
self.total_price += price_total
|
|
341
331
|
|
|
342
|
-
except
|
|
332
|
+
except (AttributeError, ValueError):
|
|
343
333
|
self.console.print("[bold red][!] Failed to find price listing")
|
|
344
334
|
|
|
345
335
|
self.console.print("\n")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cs2tracker
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.1
|
|
4
4
|
Summary: Tracking the steam market prices of CS2 items
|
|
5
5
|
Home-page: https://github.com/ashiven/cs2tracker
|
|
6
6
|
Author: Jannik Novak
|
|
@@ -27,6 +27,9 @@ Dynamic: license-file
|
|
|
27
27
|
|
|
28
28
|
**CS2Tracker** is a tool that can be used to keep track of the steam market prices of your CS2 investment.
|
|
29
29
|
|
|
30
|
+

|
|
31
|
+
|
|
32
|
+
|
|
30
33
|
## Getting Started
|
|
31
34
|
|
|
32
35
|
### Prerequisites
|
|
@@ -49,10 +52,10 @@ Dynamic: license-file
|
|
|
49
52
|
|
|
50
53
|
### Options
|
|
51
54
|
|
|
52
|
-
- `Edit Config` to change the specific numbers of each item you own and then save the config file.
|
|
53
55
|
- `Run!` to gather the current market prices of your items and calculate the total amount in USD and EUR.
|
|
56
|
+
- `Edit Config` to change the specific numbers of each item you own and then save the config file.
|
|
54
57
|
- `Show History` to see a price chart consisting of past calculations. A new data point for this chart is generated once a day upon running the program.
|
|
55
|
-
- If you want to
|
|
58
|
+
- If you want to prevent your requests from being rate limited by the steamcommunity server, register for an API key on [Crawlbase](crawlbase.com) and enter it into the `API_Key` field at the end of the config file. This will route every request through a different proxy server.
|
|
56
59
|
|
|
57
60
|
---
|
|
58
61
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
cs2tracker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
cs2tracker/__main__.py,sha256=gvsnabJSDMbzKEcB7i3ET7AoV5OqYwUjIrkLfmN0R-U,111
|
|
3
|
+
cs2tracker/_version.py,sha256=e93DN6a88mHp4XiW8PUMNpgcL72dYKhIYIiM2vzzNTM,511
|
|
4
|
+
cs2tracker/application.py,sha256=sOOsZxigUSkjoAqwhUKcSw5IiZXrXoheYJmhvXJ5gZ8,3739
|
|
5
|
+
cs2tracker/constants.py,sha256=GmCiwmzZblQT8mTXvmuQX-Bho7isBQTsRw5YmETvh_E,14881
|
|
6
|
+
cs2tracker/main.py,sha256=aB-xglyrrlKwx-WSrsw5YvZUbK5cVKIQ_WuhCJJy3Eo,1085
|
|
7
|
+
cs2tracker/scraper.py,sha256=W5GeqlA0XTGc3uNvzqxYjkNVbyJVNPiOAWXsIBN70bQ,13184
|
|
8
|
+
cs2tracker/data/config.ini,sha256=j0aXl-MkZILsJ0cj6w-6b5HbqLuLl73cewVpk204Ick,2514
|
|
9
|
+
cs2tracker-2.1.1.dist-info/licenses/LICENSE.md,sha256=G5wqQ_8KGA808kVuF-Fpu_Yhteg8K_5ux9n2v8eQK7s,1069
|
|
10
|
+
cs2tracker-2.1.1.dist-info/METADATA,sha256=6MLVDmUHwe7yBJcuv6eWvLCXMihmg7yMUEojiqkDZNo,2328
|
|
11
|
+
cs2tracker-2.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
12
|
+
cs2tracker-2.1.1.dist-info/entry_points.txt,sha256=K8IwDIkg8QztSB9g9c89B9jR_2pG4QyJGrNs4z5RcZw,63
|
|
13
|
+
cs2tracker-2.1.1.dist-info/top_level.txt,sha256=2HB4xDDOxaU5BDc_yvdi9UlYLgL768n8aR-hRhFM6VQ,11
|
|
14
|
+
cs2tracker-2.1.1.dist-info/RECORD,,
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
cs2tracker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
cs2tracker/__main__.py,sha256=gvsnabJSDMbzKEcB7i3ET7AoV5OqYwUjIrkLfmN0R-U,111
|
|
3
|
-
cs2tracker/_version.py,sha256=dseuoOPG9WZ1Ezr1SC3wS9_hczkX-b1NdE4TQPHFJso,511
|
|
4
|
-
cs2tracker/application.py,sha256=iLIVN7njRAfesaU6ht2Az_lPqpQhruOI7xMo3pSj0Qw,3703
|
|
5
|
-
cs2tracker/constants.py,sha256=GmCiwmzZblQT8mTXvmuQX-Bho7isBQTsRw5YmETvh_E,14881
|
|
6
|
-
cs2tracker/main.py,sha256=UTihQ0BgP9xPgnfTuVMaDvSPOgVDVhS-82l2VVeG2iI,1068
|
|
7
|
-
cs2tracker/scraper.py,sha256=4ROfmEhTcDvf5hUYqPWreWApSgq_REfBjaLy94oBF5w,13542
|
|
8
|
-
cs2tracker/data/config.ini,sha256=j0aXl-MkZILsJ0cj6w-6b5HbqLuLl73cewVpk204Ick,2514
|
|
9
|
-
cs2tracker-2.1.0.dist-info/licenses/LICENSE.md,sha256=G5wqQ_8KGA808kVuF-Fpu_Yhteg8K_5ux9n2v8eQK7s,1069
|
|
10
|
-
cs2tracker-2.1.0.dist-info/METADATA,sha256=3fLv45r19wSuDMDwc8L4m6r2UTj_JJNMoOej4uhPL38,2188
|
|
11
|
-
cs2tracker-2.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
12
|
-
cs2tracker-2.1.0.dist-info/entry_points.txt,sha256=K8IwDIkg8QztSB9g9c89B9jR_2pG4QyJGrNs4z5RcZw,63
|
|
13
|
-
cs2tracker-2.1.0.dist-info/top_level.txt,sha256=2HB4xDDOxaU5BDc_yvdi9UlYLgL768n8aR-hRhFM6VQ,11
|
|
14
|
-
cs2tracker-2.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|