cs2tracker 2.1.0__tar.gz → 2.1.1__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 cs2tracker might be problematic. Click here for more details.

Files changed (25) hide show
  1. {cs2tracker-2.1.0 → cs2tracker-2.1.1}/PKG-INFO +6 -3
  2. {cs2tracker-2.1.0 → cs2tracker-2.1.1}/README.md +5 -2
  3. {cs2tracker-2.1.0 → cs2tracker-2.1.1}/cs2tracker/_version.py +2 -2
  4. {cs2tracker-2.1.0 → cs2tracker-2.1.1}/cs2tracker/application.py +2 -2
  5. {cs2tracker-2.1.0 → cs2tracker-2.1.1}/cs2tracker/main.py +6 -6
  6. {cs2tracker-2.1.0 → cs2tracker-2.1.1}/cs2tracker/scraper.py +8 -18
  7. {cs2tracker-2.1.0 → cs2tracker-2.1.1}/cs2tracker.egg-info/PKG-INFO +6 -3
  8. {cs2tracker-2.1.0 → cs2tracker-2.1.1}/.flake8 +0 -0
  9. {cs2tracker-2.1.0 → cs2tracker-2.1.1}/.gitignore +0 -0
  10. {cs2tracker-2.1.0 → cs2tracker-2.1.1}/.isort.cfg +0 -0
  11. {cs2tracker-2.1.0 → cs2tracker-2.1.1}/.pre-commit-config.yaml +0 -0
  12. {cs2tracker-2.1.0 → cs2tracker-2.1.1}/LICENSE.md +0 -0
  13. {cs2tracker-2.1.0 → cs2tracker-2.1.1}/MANIFEST.in +0 -0
  14. {cs2tracker-2.1.0 → cs2tracker-2.1.1}/cs2tracker/__init__.py +0 -0
  15. {cs2tracker-2.1.0 → cs2tracker-2.1.1}/cs2tracker/__main__.py +0 -0
  16. {cs2tracker-2.1.0 → cs2tracker-2.1.1}/cs2tracker/constants.py +0 -0
  17. {cs2tracker-2.1.0 → cs2tracker-2.1.1}/cs2tracker/data/config.ini +0 -0
  18. {cs2tracker-2.1.0 → cs2tracker-2.1.1}/cs2tracker.egg-info/SOURCES.txt +0 -0
  19. {cs2tracker-2.1.0 → cs2tracker-2.1.1}/cs2tracker.egg-info/dependency_links.txt +0 -0
  20. {cs2tracker-2.1.0 → cs2tracker-2.1.1}/cs2tracker.egg-info/entry_points.txt +0 -0
  21. {cs2tracker-2.1.0 → cs2tracker-2.1.1}/cs2tracker.egg-info/requires.txt +0 -0
  22. {cs2tracker-2.1.0 → cs2tracker-2.1.1}/cs2tracker.egg-info/top_level.txt +0 -0
  23. {cs2tracker-2.1.0 → cs2tracker-2.1.1}/pyproject.toml +0 -0
  24. {cs2tracker-2.1.0 → cs2tracker-2.1.1}/requirements.txt +0 -0
  25. {cs2tracker-2.1.0 → cs2tracker-2.1.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cs2tracker
3
- Version: 2.1.0
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
+ ![demo](https://github.com/user-attachments/assets/6bd13c96-55ea-4857-8910-f97f5ce78704)
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 avoid temporary IP blocks, 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.
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
 
@@ -5,6 +5,9 @@
5
5
 
6
6
  **CS2Tracker** is a tool that can be used to keep track of the steam market prices of your CS2 investment.
7
7
 
8
+ ![demo](https://github.com/user-attachments/assets/6bd13c96-55ea-4857-8910-f97f5ce78704)
9
+
10
+
8
11
  ## Getting Started
9
12
 
10
13
  ### Prerequisites
@@ -27,10 +30,10 @@
27
30
 
28
31
  ### Options
29
32
 
30
- - `Edit Config` to change the specific numbers of each item you own and then save the config file.
31
33
  - `Run!` to gather the current market prices of your items and calculate the total amount in USD and EUR.
34
+ - `Edit Config` to change the specific numbers of each item you own and then save the config file.
32
35
  - `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.
33
- - If you want to avoid temporary IP blocks, 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.
36
+ - 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.
34
37
 
35
38
  ---
36
39
 
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '2.1.0'
21
- __version_tuple__ = version_tuple = (2, 1, 0)
20
+ __version__ = version = '2.1.1'
21
+ __version_tuple__ = version_tuple = (2, 1, 1)
@@ -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])
@@ -16,12 +16,12 @@ def main():
16
16
  "[bold yellow]"
17
17
  + """
18
18
  __ _____ _____ ______ ____ ____ __ __ _ ___ ____
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
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
  """
@@ -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 = f"{PADDING}{PADDING}{PADDING}"[:MAX_LINE_LEN]
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 Exception:
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 Exception:
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.0
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
+ ![demo](https://github.com/user-attachments/assets/6bd13c96-55ea-4857-8910-f97f5ce78704)
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 avoid temporary IP blocks, 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.
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
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes