cs2tracker 2.1.0__py3-none-any.whl → 2.1.2__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.
cs2tracker/__main__.py CHANGED
@@ -1,7 +1,12 @@
1
- from .main import main
1
+ from cs2tracker.main import main
2
2
 
3
3
 
4
4
  def entry_point():
5
+ """
6
+ The entry point for the CS2Tracker application.
7
+
8
+ Calls the main function to start the application.
9
+ """
5
10
  main()
6
11
 
7
12
 
cs2tracker/_version.py CHANGED
@@ -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.2'
21
+ __version_tuple__ = version_tuple = (2, 1, 2)
cs2tracker/application.py CHANGED
@@ -1,14 +1,14 @@
1
- import csv
2
- import datetime
3
1
  import os
4
2
  import subprocess
5
3
  import tkinter as tk
4
+ from typing import cast
6
5
 
7
6
  import matplotlib.pyplot as plt
7
+ from matplotlib.axes import Axes
8
8
  from matplotlib.dates import DateFormatter
9
9
 
10
- from .constants import CONFIG_FILE, OUTPUT_FILE, TEXT_EDITOR
11
- from .scraper import Scraper
10
+ from cs2tracker.constants import CONFIG_FILE, OUTPUT_FILE, TEXT_EDITOR
11
+ from cs2tracker.scraper import Scraper
12
12
 
13
13
 
14
14
  class Application:
@@ -16,6 +16,16 @@ class Application:
16
16
  self.scraper = Scraper()
17
17
 
18
18
  def run(self):
19
+ """Run the main application window with buttons for scraping prices, editing the
20
+ configuration, showing history in a chart, and editing the log file.
21
+ """
22
+ application_window = self._configure_window()
23
+ application_window.mainloop()
24
+
25
+ def _configure_window(self):
26
+ """Configure the main application window layout with buttons for the various
27
+ actions.
28
+ """
19
29
  window = tk.Tk()
20
30
  window.title("CS2Tracker")
21
31
  window.geometry("400x400")
@@ -25,12 +35,8 @@ class Application:
25
35
 
26
36
  run_button = tk.Button(window, text="Run!", command=self._scrape_prices)
27
37
  edit_button = tk.Button(window, text="Edit Config", command=self._edit_config)
28
- plot_button = tk.Button(
29
- window, text="Show History (Chart)", command=self._draw_plot
30
- )
31
- plotfile_button = tk.Button(
32
- window, text="Show History (File)", command=self._plot_file
33
- )
38
+ plot_button = tk.Button(window, text="Show History (Chart)", command=self._draw_plot)
39
+ plotfile_button = tk.Button(window, text="Show History (File)", command=self._edit_log_file)
34
40
 
35
41
  run_button.grid(row=1, column=0, pady=10, sticky="NSEW")
36
42
  edit_button.grid(row=2, column=0, pady=10, sticky="NSEW")
@@ -48,24 +54,28 @@ class Application:
48
54
  plot_button.grid_configure(sticky="NSEW")
49
55
  plotfile_button.grid_configure(sticky="NSEW")
50
56
 
51
- window.mainloop()
57
+ return window
52
58
 
53
59
  def _scrape_prices(self):
60
+ """Scrape prices from the configured sources, print the total, and save the
61
+ results to a file.
62
+ """
54
63
  self.scraper.scrape_prices()
55
- self.scraper.print_total()
56
- self.scraper.save_to_file()
57
64
 
58
65
  def _edit_config(self):
66
+ """Edit the configuration file using the specified text editor."""
59
67
  subprocess.call([TEXT_EDITOR, CONFIG_FILE])
60
- config = self.scraper.parse_config()
61
- self.scraper.set_config(config)
68
+ self.scraper.parse_config()
62
69
 
63
70
  def _draw_plot(self):
64
- datesp, dollars, euros = self._parse_output()
71
+ """Draw a plot of the scraped prices over time."""
72
+ dates, dollars, euros = self.scraper.read_price_log()
65
73
 
66
- fig, ax = plt.subplots()
67
- ax.plot(datesp, dollars, label="Dollars")
68
- ax.plot(datesp, euros, label="Euros")
74
+ fig, ax_raw = plt.subplots()
75
+ ax = cast(Axes, ax_raw)
76
+
77
+ ax.plot(dates, dollars, label="Dollars")
78
+ ax.plot(dates, euros, label="Euros")
69
79
  ax.set_xlabel("Date")
70
80
  ax.set_ylabel("Price")
71
81
  ax.legend()
@@ -76,39 +86,8 @@ class Application:
76
86
 
77
87
  plt.show()
78
88
 
79
- def _parse_output(self):
80
- def parse_row(row):
81
- date_str, price_str = row
82
- price = float(price_str[:-1])
83
- return date_str, price
84
-
85
- dates = []
86
- dollars = []
87
- euros = []
88
- row_num = 0
89
-
90
- if not os.path.isfile(OUTPUT_FILE):
91
- open(OUTPUT_FILE, "w").close()
92
-
93
- with open(OUTPUT_FILE, "r", newline="", encoding="utf-8") as csvfile:
94
- reader = csv.reader(csvfile)
95
- for row in reader:
96
- row_num += 1
97
- date, price = parse_row(row)
98
- if row_num % 2 == 0:
99
- euros.append(price)
100
- else:
101
- dollars.append(price)
102
- dates.append(date)
103
-
104
- datesp = []
105
- for date_str in dates:
106
- date = datetime.datetime.strptime(date_str[:-9], "%Y-%m-%d")
107
- datesp.append(date)
108
-
109
- return datesp, dollars, euros
110
-
111
- def _plot_file(self):
89
+ def _edit_log_file(self):
90
+ """Opens the file containing past price calculations."""
112
91
  if not os.path.isfile(OUTPUT_FILE):
113
- open(OUTPUT_FILE, "w").close()
92
+ open(OUTPUT_FILE, "w", encoding="utf-8").close()
114
93
  subprocess.call([TEXT_EDITOR, OUTPUT_FILE])
cs2tracker/constants.py CHANGED
@@ -7,178 +7,177 @@ OUTPUT_FILE = f"{BASE_DIR}/data/output.csv"
7
7
  CONFIG_FILE = f"{BASE_DIR}/data/config.ini"
8
8
 
9
9
 
10
- CAPSULE_NAMES = [
11
- "RMR Legends",
12
- "RMR Challengers",
13
- "RMR Contenders",
14
- "Stockholm Legends",
15
- "Stockholm Challengers",
16
- "Stockholm Contenders",
17
- "Stockholm Champions Autographs",
18
- "Stockholm Finalists Autographs",
19
- "Antwerp Legends",
20
- "Antwerp Challengers",
21
- "Antwerp Contenders",
22
- "Antwerp Champions Autographs",
23
- "Antwerp Challengers Autographs",
24
- "Antwerp Legends Autographs",
25
- "Antwerp Contenders Autographs",
26
- "Rio Legends",
27
- "Rio Challengers",
28
- "Rio Contenders",
29
- "Rio Champions Autographs",
30
- "Rio Challengers Autographs",
31
- "Rio Legends Autographs",
32
- "Rio Contenders Autographs",
33
- "Paris Legends",
34
- "Paris Challengers",
35
- "Paris Contenders",
36
- "Paris Champions Autographs",
37
- "Paris Challengers Autographs",
38
- "Paris Legends Autographs",
39
- "Paris Contenders Autographs",
40
- "Copenhagen Legends",
41
- "Copenhagen Challengers",
42
- "Copenhagen Contenders",
43
- "Copenhagen Champions Autographs",
44
- "Copenhagen Challengers Autographs",
45
- "Copenhagen Legends Autographs",
46
- "Copenhagen Contenders Autographs",
47
- "Shanghai Legends",
48
- "Shanghai Challengers",
49
- "Shanghai Contenders",
50
- "Shanghai Champions Autographs",
51
- "Shanghai Challengers Autographs",
52
- "Shanghai Legends Autographs",
53
- "Shanghai Contenders Autographs",
54
- "Austin Legends",
55
- "Austin Challengers",
56
- "Austin Contenders",
57
- "Austin Champions Autographs",
58
- "Austin Challengers Autographs",
59
- "Austin Legends Autographs",
60
- "Austin Contenders Autographs",
61
- ]
10
+ RMR_CAPSULES = {
11
+ "page": "https://steamcommunity.com/market/search?q=2020+rmr",
12
+ "items": [
13
+ "https://steamcommunity.com/market/listings/730/2020%20RMR%20Legends",
14
+ "https://steamcommunity.com/market/listings/730/2020%20RMR%20Challengers",
15
+ "https://steamcommunity.com/market/listings/730/2020%20RMR%20Contenders",
16
+ ],
17
+ "names": ["RMR Legends", "RMR Challengers", "RMR Contenders"],
18
+ }
62
19
 
63
- CAPSULE_NAMES_GENERIC = [
64
- "Legends",
65
- "Challengers",
66
- "Contenders",
67
- "Champions Autographs",
68
- "Challengers Autographs",
69
- "Legends Autographs",
70
- "Contenders Autographs",
71
- "Finalists Autographs",
72
- ]
20
+ STOCKHOLM_CAPSULES = {
21
+ "page": "https://steamcommunity.com/market/search?q=stockholm+capsule",
22
+ "items": [
23
+ "https://steamcommunity.com/market/listings/730/Stockholm%202021%20Legends%20Sticker%20Capsule",
24
+ "https://steamcommunity.com/market/listings/730/Stockholm%202021%20Challengers%20Sticker%20Capsule",
25
+ "https://steamcommunity.com/market/listings/730/Stockholm%202021%20Contenders%20Sticker%20Capsule",
26
+ "https://steamcommunity.com/market/listings/730/Stockholm%202021%20Champions%20Autograph%20Capsule",
27
+ "https://steamcommunity.com/market/listings/730/Stockholm%202021%20Finalists%20Autograph%20Capsule",
28
+ ],
29
+ "names": [
30
+ "Stockholm Legends",
31
+ "Stockholm Challengers",
32
+ "Stockholm Contenders",
33
+ "Stockholm Champions Autographs",
34
+ "Stockholm Finalists Autographs",
35
+ ],
36
+ }
73
37
 
74
- CAPSULE_PAGES = [
75
- "https://steamcommunity.com/market/search?q=2020+rmr",
76
- "https://steamcommunity.com/market/search?q=stockholm+capsule",
77
- "https://steamcommunity.com/market/search?q=antwerp+capsule",
78
- "https://steamcommunity.com/market/search?q=rio+capsule",
79
- "https://steamcommunity.com/market/search?q=paris+capsule",
80
- "https://steamcommunity.com/market/search?q=copenhagen+capsule",
81
- "https://steamcommunity.com/market/search?q=shanghai+capsule",
82
- "https://steamcommunity.com/market/search?q=austin+capsule",
83
- ]
38
+ ANTWERP_CAPSULES = {
39
+ "page": "https://steamcommunity.com/market/search?q=antwerp+capsule",
40
+ "items": [
41
+ "https://steamcommunity.com/market/listings/730/Antwerp%202022%20Legends%20Sticker%20Capsule",
42
+ "https://steamcommunity.com/market/listings/730/Antwerp%202022%20Challengers%20Sticker%20Capsule",
43
+ "https://steamcommunity.com/market/listings/730/Antwerp%202022%20Contenders%20Sticker%20Capsule",
44
+ "https://steamcommunity.com/market/listings/730/Antwerp%202022%20Champions%20Autograph%20Capsule",
45
+ "https://steamcommunity.com/market/listings/730/Antwerp%202022%20Challengers%20Autograph%20Capsule",
46
+ "https://steamcommunity.com/market/listings/730/Antwerp%202022%20Legends%20Autograph%20Capsule",
47
+ "https://steamcommunity.com/market/listings/730/Antwerp%202022%20Contenders%20Autograph%20Capsule",
48
+ ],
49
+ "names": [
50
+ "Antwerp Legends",
51
+ "Antwerp Challengers",
52
+ "Antwerp Contenders",
53
+ "Antwerp Champions Autographs",
54
+ "Antwerp Challengers Autographs",
55
+ "Antwerp Legends Autographs",
56
+ "Antwerp Contenders Autographs",
57
+ ],
58
+ }
84
59
 
85
- CAPSULE_HREFS = [
86
- "https://steamcommunity.com/market/listings/730/2020%20RMR%20Legends",
87
- "https://steamcommunity.com/market/listings/730/2020%20RMR%20Challengers",
88
- "https://steamcommunity.com/market/listings/730/2020%20RMR%20Contenders",
89
- "https://steamcommunity.com/market/listings/730/Stockholm%202021%20Legends%20Sticker%20Capsule",
90
- "https://steamcommunity.com/market/listings/730/Stockholm%202021%20Challengers%20Sticker%20Capsule",
91
- "https://steamcommunity.com/market/listings/730/Stockholm%202021%20Contenders%20Sticker%20Capsule",
92
- "https://steamcommunity.com/market/listings/730/Stockholm%202021%20Champions%20Autograph%20Capsule",
93
- "https://steamcommunity.com/market/listings/730/Stockholm%202021%20Finalists%20Autograph%20Capsule",
94
- "https://steamcommunity.com/market/listings/730/Antwerp%202022%20Legends%20Sticker%20Capsule",
95
- "https://steamcommunity.com/market/listings/730/Antwerp%202022%20Challengers%20Sticker%20Capsule",
96
- "https://steamcommunity.com/market/listings/730/Antwerp%202022%20Contenders%20Sticker%20Capsule",
97
- "https://steamcommunity.com/market/listings/730/Antwerp%202022%20Champions%20Autograph%20Capsule",
98
- "https://steamcommunity.com/market/listings/730/Antwerp%202022%20Challengers%20Autograph%20Capsule",
99
- "https://steamcommunity.com/market/listings/730/Antwerp%202022%20Legends%20Autograph%20Capsule",
100
- "https://steamcommunity.com/market/listings/730/Antwerp%202022%20Contenders%20Autograph%20Capsule",
101
- "https://steamcommunity.com/market/listings/730/Rio%202022%20Legends%20Sticker%20Capsule",
102
- "https://steamcommunity.com/market/listings/730/Rio%202022%20Challengers%20Sticker%20Capsule",
103
- "https://steamcommunity.com/market/listings/730/Rio%202022%20Contenders%20Sticker%20Capsule",
104
- "https://steamcommunity.com/market/listings/730/Rio%202022%20Champions%20Autograph%20Capsule",
105
- "https://steamcommunity.com/market/listings/730/Rio%202022%20Challengers%20Autograph%20Capsule",
106
- "https://steamcommunity.com/market/listings/730/Rio%202022%20Legends%20Autograph%20Capsule",
107
- "https://steamcommunity.com/market/listings/730/Rio%202022%20Contenders%20Autograph%20Capsule",
108
- "https://steamcommunity.com/market/listings/730/Paris%202023%20Legends%20Sticker%20Capsule",
109
- "https://steamcommunity.com/market/listings/730/Paris%202023%20Challengers%20Sticker%20Capsule",
110
- "https://steamcommunity.com/market/listings/730/Paris%202023%20Contenders%20Sticker%20Capsule",
111
- "https://steamcommunity.com/market/listings/730/Paris%202023%20Champions%20Autograph%20Capsule",
112
- "https://steamcommunity.com/market/listings/730/Paris%202023%20Challengers%20Autograph%20Capsule",
113
- "https://steamcommunity.com/market/listings/730/Paris%202023%20Legends%20Autograph%20Capsule",
114
- "https://steamcommunity.com/market/listings/730/Paris%202023%20Contenders%20Autograph%20Capsule",
115
- "https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Legends%20Sticker%20Capsule",
116
- "https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Challengers%20Sticker%20Capsule",
117
- "https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Contenders%20Sticker%20Capsule",
118
- "https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Champions%20Autograph%20Capsule",
119
- "https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Challengers%20Autograph%20Capsule",
120
- "https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Legends%20Autograph%20Capsule",
121
- "https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Contenders%20Autograph%20Capsule",
122
- "https://steamcommunity.com/market/listings/730/Shanghai%202024%20Legends%20Sticker%20Capsule",
123
- "https://steamcommunity.com/market/listings/730/Shanghai%202024%20Challengers%20Sticker%20Capsule",
124
- "https://steamcommunity.com/market/listings/730/Shanghai%202024%20Contenders%20Sticker%20Capsule",
125
- "https://steamcommunity.com/market/listings/730/Shanghai%202024%20Champions%20Autograph%20Capsule",
126
- "https://steamcommunity.com/market/listings/730/Shanghai%202024%20Challengers%20Autograph%20Capsule",
127
- "https://steamcommunity.com/market/listings/730/Shanghai%202024%20Legends%20Autograph%20Capsule",
128
- "https://steamcommunity.com/market/listings/730/Shanghai%202024%20Contenders%20Autograph%20Capsule",
129
- "https://steamcommunity.com/market/listings/730/Austin%202025%20Legends%20Sticker%20Capsule",
130
- "https://steamcommunity.com/market/listings/730/Austin%202025%20Challengers%20Sticker%20Capsule",
131
- "https://steamcommunity.com/market/listings/730/Austin%202025%20Contenders%20Sticker%20Capsule",
132
- "https://steamcommunity.com/market/listings/730/Austin%202025%20Champions%20Autograph%20Capsule",
133
- "https://steamcommunity.com/market/listings/730/Austin%202025%20Challengers%20Autograph%20Capsule",
134
- "https://steamcommunity.com/market/listings/730/Austin%202025%20Legends%20Autograph%20Capsule",
135
- "https://steamcommunity.com/market/listings/730/Austin%202025%20Contenders%20Autograph%20Capsule",
136
- ]
60
+ RIO_CAPSULES = {
61
+ "page": "https://steamcommunity.com/market/search?q=rio+capsule",
62
+ "items": [
63
+ "https://steamcommunity.com/market/listings/730/Rio%202022%20Legends%20Sticker%20Capsule",
64
+ "https://steamcommunity.com/market/listings/730/Rio%202022%20Challengers%20Sticker%20Capsule",
65
+ "https://steamcommunity.com/market/listings/730/Rio%202022%20Contenders%20Sticker%20Capsule",
66
+ "https://steamcommunity.com/market/listings/730/Rio%202022%20Champions%20Autograph%20Capsule",
67
+ "https://steamcommunity.com/market/listings/730/Rio%202022%20Challengers%20Autograph%20Capsule",
68
+ "https://steamcommunity.com/market/listings/730/Rio%202022%20Legends%20Autograph%20Capsule",
69
+ "https://steamcommunity.com/market/listings/730/Rio%202022%20Contenders%20Autograph%20Capsule",
70
+ ],
71
+ "names": [
72
+ "Rio Legends",
73
+ "Rio Challengers",
74
+ "Rio Contenders",
75
+ "Rio Champions Autographs",
76
+ "Rio Challengers Autographs",
77
+ "Rio Legends Autographs",
78
+ "Rio Contenders Autographs",
79
+ ],
80
+ }
137
81
 
138
- CASE_NAMES = [
139
- "Revolution Case",
140
- "Recoil Case",
141
- "Dreams And Nightmares Case",
142
- "Operation Riptide Case",
143
- "Snakebite Case",
144
- "Operation Broken Fang Case",
145
- "Fracture Case",
146
- "Chroma Case",
147
- "Chroma 2 Case",
148
- "Chroma 3 Case",
149
- "Clutch Case",
150
- "CSGO Weapon Case",
151
- "CSGO Weapon Case 2",
152
- "CSGO Weapon Case 3",
153
- "CS20 Case",
154
- "Danger Zone Case",
155
- "eSports 2013 Case",
156
- "eSports 2013 Winter Case",
157
- "eSports 2014 Summer Case",
158
- "Falchion Case",
159
- "Gamma Case",
160
- "Gamma 2 Case",
161
- "Glove Case",
162
- "Horizon Case",
163
- "Huntsman Case",
164
- "Operation Bravo Case",
165
- "Operation Breakout Case",
166
- "Operation Hydra Case",
167
- "Operation Phoenix Case",
168
- "Operation Vanguard Case",
169
- "Operation Wildfire Case",
170
- "Prisma Case",
171
- "Prisma 2 Case",
172
- "Revolver Case",
173
- "Shadow Case",
174
- "Shattered Web Case",
175
- "Spectrum Case",
176
- "Spectrum 2 Case",
177
- "Winter Offensive Case",
178
- "Kilowatt Case",
179
- "Gallery Case",
180
- "Fever Case",
181
- ]
82
+ PARIS_CAPSULES = {
83
+ "page": "https://steamcommunity.com/market/search?q=paris+capsule",
84
+ "items": [
85
+ "https://steamcommunity.com/market/listings/730/Paris%202023%20Legends%20Sticker%20Capsule",
86
+ "https://steamcommunity.com/market/listings/730/Paris%202023%20Challengers%20Sticker%20Capsule",
87
+ "https://steamcommunity.com/market/listings/730/Paris%202023%20Contenders%20Sticker%20Capsule",
88
+ "https://steamcommunity.com/market/listings/730/Paris%202023%20Champions%20Autograph%20Capsule",
89
+ "https://steamcommunity.com/market/listings/730/Paris%202023%20Challengers%20Autograph%20Capsule",
90
+ "https://steamcommunity.com/market/listings/730/Paris%202023%20Legends%20Autograph%20Capsule",
91
+ "https://steamcommunity.com/market/listings/730/Paris%202023%20Contenders%20Autograph%20Capsule",
92
+ ],
93
+ "names": [
94
+ "Paris Legends",
95
+ "Paris Challengers",
96
+ "Paris Contenders",
97
+ "Paris Champions Autographs",
98
+ "Paris Challengers Autographs",
99
+ "Paris Legends Autographs",
100
+ "Paris Contenders Autographs",
101
+ ],
102
+ }
103
+
104
+ COPENHAGEN_CAPSULES = {
105
+ "page": "https://steamcommunity.com/market/search?q=copenhagen+capsule",
106
+ "items": [
107
+ "https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Legends%20Sticker%20Capsule",
108
+ "https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Challengers%20Sticker%20Capsule",
109
+ "https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Contenders%20Sticker%20Capsule",
110
+ "https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Champions%20Autograph%20Capsule",
111
+ "https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Challengers%20Autograph%20Capsule",
112
+ "https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Legends%20Autograph%20Capsule",
113
+ "https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Contenders%20Autograph%20Capsule",
114
+ ],
115
+ "names": [
116
+ "Copenhagen Legends",
117
+ "Copenhagen Challengers",
118
+ "Copenhagen Contenders",
119
+ "Copenhagen Champions Autographs",
120
+ "Copenhagen Challengers Autographs",
121
+ "Copenhagen Legends Autographs",
122
+ "Copenhagen Contenders Autographs",
123
+ ],
124
+ }
125
+
126
+ SHANGHAI_CAPSULES = {
127
+ "page": "https://steamcommunity.com/market/search?q=shanghai+capsule",
128
+ "items": [
129
+ "https://steamcommunity.com/market/listings/730/Shanghai%202024%20Legends%20Sticker%20Capsule",
130
+ "https://steamcommunity.com/market/listings/730/Shanghai%202024%20Challengers%20Sticker%20Capsule",
131
+ "https://steamcommunity.com/market/listings/730/Shanghai%202024%20Contenders%20Sticker%20Capsule",
132
+ "https://steamcommunity.com/market/listings/730/Shanghai%202024%20Champions%20Autograph%20Capsule",
133
+ "https://steamcommunity.com/market/listings/730/Shanghai%202024%20Challengers%20Autograph%20Capsule",
134
+ "https://steamcommunity.com/market/listings/730/Shanghai%202024%20Legends%20Autograph%20Capsule",
135
+ "https://steamcommunity.com/market/listings/730/Shanghai%202024%20Contenders%20Autograph%20Capsule",
136
+ ],
137
+ "names": [
138
+ "Shanghai Legends",
139
+ "Shanghai Challengers",
140
+ "Shanghai Contenders",
141
+ "Shanghai Champions Autographs",
142
+ "Shanghai Challengers Autographs",
143
+ "Shanghai Legends Autographs",
144
+ "Shanghai Contenders Autographs",
145
+ ],
146
+ }
147
+
148
+
149
+ AUSTIN_CAPSULES = {
150
+ "page": "https://steamcommunity.com/market/search?q=austin+capsule",
151
+ "items": [
152
+ "https://steamcommunity.com/market/listings/730/Austin%202025%20Legends%20Sticker%20Capsule",
153
+ "https://steamcommunity.com/market/listings/730/Austin%202025%20Challengers%20Sticker%20Capsule",
154
+ "https://steamcommunity.com/market/listings/730/Austin%202025%20Contenders%20Sticker%20Capsule",
155
+ "https://steamcommunity.com/market/listings/730/Austin%202025%20Champions%20Autograph%20Capsule",
156
+ "https://steamcommunity.com/market/listings/730/Austin%202025%20Challengers%20Autograph%20Capsule",
157
+ "https://steamcommunity.com/market/listings/730/Austin%202025%20Legends%20Autograph%20Capsule",
158
+ "https://steamcommunity.com/market/listings/730/Austin%202025%20Contenders%20Autograph%20Capsule",
159
+ ],
160
+ "names": [
161
+ "Austin Legends",
162
+ "Austin Challengers",
163
+ "Austin Contenders",
164
+ "Austin Champions Autographs",
165
+ "Austin Challengers Autographs",
166
+ "Austin Legends Autographs",
167
+ "Austin Contenders Autographs",
168
+ ],
169
+ }
170
+
171
+ CAPSULE_INFO = {
172
+ "2020 RMR Sticker Capsule": RMR_CAPSULES,
173
+ "Stockholm Sticker Capsule": STOCKHOLM_CAPSULES,
174
+ "Antwerp Sticker Capsule": ANTWERP_CAPSULES,
175
+ "Rio Sticker Capsule": RIO_CAPSULES,
176
+ "Paris Sticker Capsule": PARIS_CAPSULES,
177
+ "Copenhagen Sticker Capsule": COPENHAGEN_CAPSULES,
178
+ "Shanghai Sticker Capsule": SHANGHAI_CAPSULES,
179
+ "Austin Sticker Capsule": AUSTIN_CAPSULES,
180
+ }
182
181
 
183
182
 
184
183
  CASE_PAGES = [
@@ -1,16 +1,16 @@
1
- [2020 RMR]
1
+ [2020 RMR Sticker Capsule]
2
2
  RMR_Challengers = 0
3
3
  RMR_Legends = 0
4
4
  RMR_Contenders = 0
5
5
 
6
- [Stockholm]
6
+ [Stockholm Sticker Capsule]
7
7
  Stockholm_Challengers = 0
8
8
  Stockholm_Legends = 0
9
9
  Stockholm_Contenders = 0
10
10
  Stockholm_Champions_Autographs = 0
11
11
  Stockholm_Finalists_Autographs = 0
12
12
 
13
- [Antwerp]
13
+ [Antwerp Sticker Capsule]
14
14
  Antwerp_Challengers = 0
15
15
  Antwerp_Legends = 0
16
16
  Antwerp_Contenders = 0
@@ -19,7 +19,7 @@ Antwerp_Contenders_Autographs = 0
19
19
  Antwerp_Challengers_Autographs = 0
20
20
  Antwerp_Legends_Autographs = 0
21
21
 
22
- [Rio]
22
+ [Rio Sticker Capsule]
23
23
  Rio_Challengers = 0
24
24
  Rio_Legends = 0
25
25
  Rio_Contenders = 0
@@ -28,7 +28,7 @@ Rio_Contenders_Autographs = 0
28
28
  Rio_Challengers_Autographs = 0
29
29
  Rio_Legends_Autographs = 0
30
30
 
31
- [Paris]
31
+ [Paris Sticker Capsule]
32
32
  Paris_Challengers = 0
33
33
  Paris_Legends = 0
34
34
  Paris_Contenders = 0
@@ -37,7 +37,7 @@ Paris_Contenders_Autographs = 0
37
37
  Paris_Challengers_Autographs = 0
38
38
  Paris_Legends_Autographs = 0
39
39
 
40
- [Copenhagen]
40
+ [Copenhagen Sticker Capsule]
41
41
  Copenhagen_Challengers = 0
42
42
  Copenhagen_Legends = 0
43
43
  Copenhagen_Contenders = 0
@@ -46,7 +46,7 @@ Copenhagen_Contenders_Autographs = 0
46
46
  Copenhagen_Challengers_Autographs = 0
47
47
  Copenhagen_Legends_Autographs = 0
48
48
 
49
- [Shanghai]
49
+ [Shanghai Sticker Capsule]
50
50
  Shanghai_Challengers = 0
51
51
  Shanghai_Legends = 0
52
52
  Shanghai_Contenders = 0
@@ -55,7 +55,7 @@ Shanghai_Contenders_Autographs = 0
55
55
  Shanghai_Challengers_Autographs = 0
56
56
  Shanghai_Legends_Autographs = 0
57
57
 
58
- [Austin]
58
+ [Austin Sticker Capsule]
59
59
  Austin_Challengers = 0
60
60
  Austin_Legends = 0
61
61
  Austin_Contenders = 0
@@ -108,6 +108,6 @@ Kilowatt_Case = 0
108
108
  Gallery_Case = 0
109
109
  Fever_Case = 0
110
110
 
111
- [Proxy API Key]
111
+ [Settings]
112
112
  Use_Proxy = False
113
113
  API_Key = None
cs2tracker/main.py CHANGED
@@ -3,11 +3,18 @@ from datetime import datetime
3
3
  import urllib3
4
4
  from rich.console import Console
5
5
 
6
- from ._version import version
7
- from .application import Application
6
+ from cs2tracker._version import version # pylint: disable=E0611
7
+ from cs2tracker.application import Application
8
8
 
9
9
 
10
10
  def main():
11
+ """
12
+ The main entry point for the CS2Tracker application.
13
+
14
+ Provides a console output with the application version and date, and initializes the
15
+ application.
16
+ """
17
+
11
18
  ## disable warnings for proxy requests
12
19
  urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
13
20
 
@@ -16,16 +23,16 @@ def main():
16
23
  "[bold yellow]"
17
24
  + """
18
25
  __ _____ _____ ______ ____ ____ __ __ _ ___ ____
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
26
+ / ] / ___/| T| T| \\ / T / ]| l/ ] / _]| \\
27
+ / / ( \\_ l__/ || || D )Y o | / / | ' / / [_ | D )
28
+ / / \\__ T| __jl_j l_j| / | | / / | \\ Y _]| /
29
+ / \\_ / \\ || / | | | | \\ | _ |/ \\_ | Y| [_ | \\
30
+ \\ | \\ || | | | | . Y| | |\\ || . || T| . Y
31
+ \\____j \\___jl_____j l__j l__j\\_jl__j__j \\____jl__j\\_jl_____jl__j\\_j
25
32
 
26
33
 
27
34
  """
28
- + f"Version: v{version} - {datetime.today().strftime('%Y/%m/%d')} - Jannik Novak @ashiven_\n"
35
+ + f"Version: v{version} - {datetime.today().strftime('%Y/%m/%d')} - Jannik Novak @ashiven\n"
29
36
  )
30
37
 
31
38
  application = Application()