cs2tracker 2.1.16__py3-none-any.whl → 2.1.17__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/app/app.py +48 -15
- cs2tracker/app/editor_frame.py +40 -16
- cs2tracker/constants.py +85 -25
- {cs2tracker-2.1.16.dist-info → cs2tracker-2.1.17.dist-info}/METADATA +25 -5
- {cs2tracker-2.1.16.dist-info → cs2tracker-2.1.17.dist-info}/RECORD +10 -10
- {cs2tracker-2.1.16.dist-info → cs2tracker-2.1.17.dist-info}/WHEEL +0 -0
- {cs2tracker-2.1.16.dist-info → cs2tracker-2.1.17.dist-info}/entry_points.txt +0 -0
- {cs2tracker-2.1.16.dist-info → cs2tracker-2.1.17.dist-info}/licenses/LICENSE +0 -0
- {cs2tracker-2.1.16.dist-info → cs2tracker-2.1.17.dist-info}/top_level.txt +0 -0
cs2tracker/_version.py
CHANGED
cs2tracker/app/app.py
CHANGED
|
@@ -15,6 +15,7 @@ from cs2tracker.logs import PriceLogs
|
|
|
15
15
|
from cs2tracker.scraper.background_task import BackgroundTask
|
|
16
16
|
from cs2tracker.scraper.scraper import Scraper
|
|
17
17
|
from cs2tracker.util.currency_conversion import CURRENCY_SYMBOLS
|
|
18
|
+
from cs2tracker.util.padded_console import get_console
|
|
18
19
|
from cs2tracker.util.tkinter import centered, fix_sv_ttk, size_info
|
|
19
20
|
|
|
20
21
|
APPLICATION_NAME = "CS2Tracker"
|
|
@@ -31,6 +32,7 @@ PRICE_HISTORY_TITLE = "Price History"
|
|
|
31
32
|
PRICE_HISTORY_SIZE = "900x700"
|
|
32
33
|
|
|
33
34
|
config = get_config()
|
|
35
|
+
console = get_console()
|
|
34
36
|
|
|
35
37
|
|
|
36
38
|
class Application:
|
|
@@ -48,6 +50,7 @@ class Application:
|
|
|
48
50
|
|
|
49
51
|
fix_sv_ttk(ttk.Style())
|
|
50
52
|
|
|
53
|
+
window.focus_force()
|
|
51
54
|
window.mainloop()
|
|
52
55
|
|
|
53
56
|
def _configure_window(self):
|
|
@@ -76,6 +79,10 @@ class MainFrame(ttk.Frame):
|
|
|
76
79
|
super().__init__(parent, padding=15)
|
|
77
80
|
self.parent = parent
|
|
78
81
|
self.scraper = scraper
|
|
82
|
+
|
|
83
|
+
self.scraper_window = None
|
|
84
|
+
self.config_editor_window = None
|
|
85
|
+
self.price_history_window = None
|
|
79
86
|
self._add_widgets()
|
|
80
87
|
|
|
81
88
|
def _add_widgets(self):
|
|
@@ -181,13 +188,21 @@ class MainFrame(ttk.Frame):
|
|
|
181
188
|
"""Scrape prices from the configured sources, print the total, and save the
|
|
182
189
|
results to a file.
|
|
183
190
|
"""
|
|
184
|
-
scraper_window
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
191
|
+
if self.scraper_window is None or not self.scraper_window.winfo_exists():
|
|
192
|
+
self._open_scraper_window()
|
|
193
|
+
else:
|
|
194
|
+
self.scraper_window.lift()
|
|
195
|
+
self.scraper_window.focus_set()
|
|
196
|
+
|
|
197
|
+
def _open_scraper_window(self):
|
|
198
|
+
"""Open a new window with the scraper GUI."""
|
|
199
|
+
self.scraper_window = tk.Toplevel(self.parent)
|
|
200
|
+
self.scraper_window.geometry(centered(self.scraper_window, SCRAPER_WINDOW_SIZE))
|
|
201
|
+
self.scraper_window.minsize(*size_info(SCRAPER_WINDOW_SIZE))
|
|
202
|
+
self.scraper_window.title(SCRAPER_WINDOW_TITLE)
|
|
188
203
|
|
|
189
204
|
run_frame = ScraperFrame(
|
|
190
|
-
scraper_window,
|
|
205
|
+
self.scraper_window,
|
|
191
206
|
self.scraper,
|
|
192
207
|
sheet_size=SCRAPER_WINDOW_SIZE,
|
|
193
208
|
dark_theme=self.dark_theme_checkbox_value.get(),
|
|
@@ -196,26 +211,42 @@ class MainFrame(ttk.Frame):
|
|
|
196
211
|
run_frame.start()
|
|
197
212
|
|
|
198
213
|
def _edit_config(self):
|
|
214
|
+
"""Open a new window with a config editor GUI or lift the existing one."""
|
|
215
|
+
if self.config_editor_window is None or not self.config_editor_window.winfo_exists():
|
|
216
|
+
self._open_config_editor()
|
|
217
|
+
else:
|
|
218
|
+
self.config_editor_window.lift()
|
|
219
|
+
self.config_editor_window.focus_set()
|
|
220
|
+
|
|
221
|
+
def _open_config_editor(self):
|
|
199
222
|
"""Open a new window with a config editor GUI."""
|
|
200
|
-
config_editor_window = tk.Toplevel(self.parent)
|
|
201
|
-
config_editor_window.geometry(centered(config_editor_window, CONFIG_EDITOR_SIZE))
|
|
202
|
-
config_editor_window.minsize(*size_info(CONFIG_EDITOR_SIZE))
|
|
203
|
-
config_editor_window.title(CONFIG_EDITOR_TITLE)
|
|
223
|
+
self.config_editor_window = tk.Toplevel(self.parent)
|
|
224
|
+
self.config_editor_window.geometry(centered(self.config_editor_window, CONFIG_EDITOR_SIZE))
|
|
225
|
+
self.config_editor_window.minsize(*size_info(CONFIG_EDITOR_SIZE))
|
|
226
|
+
self.config_editor_window.title(CONFIG_EDITOR_TITLE)
|
|
204
227
|
|
|
205
|
-
editor_frame = ConfigEditorFrame(config_editor_window)
|
|
228
|
+
editor_frame = ConfigEditorFrame(self.config_editor_window)
|
|
206
229
|
editor_frame.pack(expand=True, fill="both")
|
|
207
230
|
|
|
208
231
|
def _show_history(self):
|
|
209
232
|
"""Show a chart consisting of past calculations."""
|
|
233
|
+
if self.price_history_window is None or not self.price_history_window.winfo_exists():
|
|
234
|
+
self._open_history_window()
|
|
235
|
+
else:
|
|
236
|
+
self.price_history_window.lift()
|
|
237
|
+
self.price_history_window.focus_set()
|
|
238
|
+
|
|
239
|
+
def _open_history_window(self):
|
|
240
|
+
"""Open a new window with a price history GUI."""
|
|
210
241
|
if PriceLogs.empty():
|
|
211
242
|
return
|
|
212
243
|
|
|
213
|
-
price_history_window = tk.Toplevel(self.parent)
|
|
214
|
-
price_history_window.geometry(centered(price_history_window, PRICE_HISTORY_SIZE))
|
|
215
|
-
price_history_window.minsize(*size_info(PRICE_HISTORY_SIZE))
|
|
216
|
-
price_history_window.title(PRICE_HISTORY_TITLE)
|
|
244
|
+
self.price_history_window = tk.Toplevel(self.parent)
|
|
245
|
+
self.price_history_window.geometry(centered(self.price_history_window, PRICE_HISTORY_SIZE))
|
|
246
|
+
self.price_history_window.minsize(*size_info(PRICE_HISTORY_SIZE))
|
|
247
|
+
self.price_history_window.title(PRICE_HISTORY_TITLE)
|
|
217
248
|
|
|
218
|
-
history_frame = PriceHistoryFrame(price_history_window)
|
|
249
|
+
history_frame = PriceHistoryFrame(self.price_history_window)
|
|
219
250
|
history_frame.pack(expand=True, fill="both")
|
|
220
251
|
|
|
221
252
|
def _export_log_file(self):
|
|
@@ -239,8 +270,10 @@ class MainFrame(ttk.Frame):
|
|
|
239
270
|
filetypes=[("CSV files", "*.csv")],
|
|
240
271
|
)
|
|
241
272
|
if not PriceLogs.validate_file(import_path):
|
|
273
|
+
console.error("Invalid log file format.")
|
|
242
274
|
return
|
|
243
275
|
copy(import_path, OUTPUT_FILE)
|
|
276
|
+
console.info("Log file imported successfully.")
|
|
244
277
|
|
|
245
278
|
def _toggle_background_task(self, enabled: bool):
|
|
246
279
|
"""Toggle whether a daily price calculation should run in the background."""
|
cs2tracker/app/editor_frame.py
CHANGED
|
@@ -253,6 +253,8 @@ class ConfigEditorButtonFrame(ttk.Frame):
|
|
|
253
253
|
self.editor_frame = editor_frame
|
|
254
254
|
self.custom_item_dialog = None
|
|
255
255
|
|
|
256
|
+
self.custom_item_window = None
|
|
257
|
+
self.steam_inventory_window = None
|
|
256
258
|
self._add_widgets()
|
|
257
259
|
|
|
258
260
|
def _add_widgets(self):
|
|
@@ -285,37 +287,59 @@ class ConfigEditorButtonFrame(ttk.Frame):
|
|
|
285
287
|
self.editor_frame.tree.focus_set()
|
|
286
288
|
|
|
287
289
|
def _add_custom_item(self):
|
|
290
|
+
"""Open a window to add a new custom item or lift the existing one if it is
|
|
291
|
+
already open.
|
|
292
|
+
"""
|
|
293
|
+
if self.custom_item_window is None or not self.custom_item_window.winfo_exists():
|
|
294
|
+
self._open_custom_item_window()
|
|
295
|
+
else:
|
|
296
|
+
self.custom_item_window.lift()
|
|
297
|
+
self.custom_item_window.focus_set()
|
|
298
|
+
|
|
299
|
+
def _open_custom_item_window(self):
|
|
288
300
|
"""Open a window to add a new custom item."""
|
|
289
|
-
custom_item_window = tk.Toplevel(self.editor_frame)
|
|
290
|
-
custom_item_window.title(ADD_CUSTOM_ITEM_TITLE)
|
|
291
|
-
custom_item_window.geometry(centered(custom_item_window, ADD_CUSTOM_ITEM_SIZE))
|
|
292
|
-
custom_item_window.minsize(*size_info(ADD_CUSTOM_ITEM_SIZE))
|
|
293
|
-
custom_item_window.focus_set()
|
|
301
|
+
self.custom_item_window = tk.Toplevel(self.editor_frame)
|
|
302
|
+
self.custom_item_window.title(ADD_CUSTOM_ITEM_TITLE)
|
|
303
|
+
self.custom_item_window.geometry(centered(self.custom_item_window, ADD_CUSTOM_ITEM_SIZE))
|
|
304
|
+
self.custom_item_window.minsize(*size_info(ADD_CUSTOM_ITEM_SIZE))
|
|
305
|
+
self.custom_item_window.focus_set()
|
|
294
306
|
|
|
295
307
|
def on_close():
|
|
296
|
-
custom_item_window.destroy()
|
|
308
|
+
self.custom_item_window.destroy() # type: ignore
|
|
297
309
|
self.editor_frame.tree.focus_set()
|
|
298
310
|
|
|
299
|
-
custom_item_window.protocol("WM_DELETE_WINDOW", on_close)
|
|
311
|
+
self.custom_item_window.protocol("WM_DELETE_WINDOW", on_close)
|
|
300
312
|
|
|
301
|
-
custom_item_frame = CustomItemFrame(custom_item_window, self.editor_frame)
|
|
313
|
+
custom_item_frame = CustomItemFrame(self.custom_item_window, self.editor_frame)
|
|
302
314
|
custom_item_frame.pack(expand=True, fill="both", padx=15, pady=15)
|
|
303
315
|
|
|
304
316
|
def _import_steam_inventory(self):
|
|
317
|
+
"""Open a window to import the user's Steam inventory or lift the existing one
|
|
318
|
+
if it is already open.
|
|
319
|
+
"""
|
|
320
|
+
if self.steam_inventory_window is None or not self.steam_inventory_window.winfo_exists():
|
|
321
|
+
self._open_steam_inventory_window()
|
|
322
|
+
else:
|
|
323
|
+
self.steam_inventory_window.lift()
|
|
324
|
+
self.steam_inventory_window.focus_set()
|
|
325
|
+
|
|
326
|
+
def _open_steam_inventory_window(self):
|
|
305
327
|
"""Open a window to import the user's Steam inventory."""
|
|
306
|
-
steam_inventory_window = tk.Toplevel(self.editor_frame)
|
|
307
|
-
steam_inventory_window.title(IMPORT_INVENTORY_TITLE)
|
|
308
|
-
steam_inventory_window.geometry(
|
|
309
|
-
|
|
310
|
-
|
|
328
|
+
self.steam_inventory_window = tk.Toplevel(self.editor_frame)
|
|
329
|
+
self.steam_inventory_window.title(IMPORT_INVENTORY_TITLE)
|
|
330
|
+
self.steam_inventory_window.geometry(
|
|
331
|
+
centered(self.steam_inventory_window, IMPORT_INVENTORY_SIZE)
|
|
332
|
+
)
|
|
333
|
+
self.steam_inventory_window.minsize(*size_info(IMPORT_INVENTORY_SIZE))
|
|
334
|
+
self.steam_inventory_window.focus_set()
|
|
311
335
|
|
|
312
336
|
def on_close():
|
|
313
|
-
steam_inventory_window.destroy()
|
|
337
|
+
self.steam_inventory_window.destroy() # type: ignore
|
|
314
338
|
self.editor_frame.tree.focus_set()
|
|
315
339
|
|
|
316
|
-
steam_inventory_window.protocol("WM_DELETE_WINDOW", on_close)
|
|
340
|
+
self.steam_inventory_window.protocol("WM_DELETE_WINDOW", on_close)
|
|
317
341
|
|
|
318
|
-
steam_inventory_frame = InventoryImportFrame(steam_inventory_window, self.editor_frame)
|
|
342
|
+
steam_inventory_frame = InventoryImportFrame(self.steam_inventory_window, self.editor_frame)
|
|
319
343
|
steam_inventory_frame.pack(expand=True, fill="both", padx=15, pady=15)
|
|
320
344
|
|
|
321
345
|
|
cs2tracker/constants.py
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
+
import ctypes
|
|
1
2
|
import enum
|
|
2
3
|
import os
|
|
3
4
|
import sys
|
|
5
|
+
import tkinter as tk
|
|
4
6
|
from datetime import datetime
|
|
5
|
-
from shutil import copy
|
|
7
|
+
from shutil import copy, copytree
|
|
6
8
|
from subprocess import DEVNULL
|
|
9
|
+
from tkinter import ttk
|
|
7
10
|
|
|
11
|
+
import sv_ttk
|
|
8
12
|
from nodejs import npm
|
|
9
13
|
|
|
14
|
+
from cs2tracker.util.tkinter import centered
|
|
15
|
+
|
|
10
16
|
try:
|
|
11
17
|
from cs2tracker._version import version # pylint: disable=E0611
|
|
12
18
|
|
|
@@ -48,33 +54,86 @@ if RUNNING_IN_EXE:
|
|
|
48
54
|
else:
|
|
49
55
|
raise NotImplementedError(f"Unsupported OS: {OS}")
|
|
50
56
|
|
|
51
|
-
DATA_DIR = os.path.join(APP_DATA_DIR, "cs2tracker", "data")
|
|
52
|
-
os.makedirs(DATA_DIR, exist_ok=True)
|
|
53
|
-
|
|
54
57
|
CONFIG_FILE_SOURCE = os.path.join(MODULE_DIR, "data", "config.ini")
|
|
55
58
|
OUTPUT_FILE_SOURCE = os.path.join(MODULE_DIR, "data", "output.csv")
|
|
56
|
-
|
|
59
|
+
INVENTORY_CONVERT_SCRIPT_SOURCE = os.path.join(MODULE_DIR, "data", "convert_inventory.js")
|
|
57
60
|
INVENTORY_IMPORT_SCRIPT_SOURCE = os.path.join(MODULE_DIR, "data", "get_inventory.js")
|
|
61
|
+
NODE_MODULES_SOURCE = os.path.join(MODULE_DIR, "data", "node_modules")
|
|
58
62
|
|
|
63
|
+
DATA_DIR = os.path.join(APP_DATA_DIR, "cs2tracker", "data")
|
|
59
64
|
CONFIG_FILE = os.path.join(DATA_DIR, "config.ini")
|
|
60
65
|
CONFIG_FILE_BACKUP = os.path.join(DATA_DIR, "config.ini.bak")
|
|
61
66
|
OUTPUT_FILE = os.path.join(DATA_DIR, "output.csv")
|
|
62
|
-
|
|
67
|
+
INVENTORY_CONVERT_SCRIPT = os.path.join(DATA_DIR, "convert_inventory.js")
|
|
63
68
|
INVENTORY_IMPORT_SCRIPT = os.path.join(DATA_DIR, "get_inventory.js")
|
|
69
|
+
NODE_MODULES = os.path.join(DATA_DIR, "node_modules")
|
|
70
|
+
|
|
71
|
+
ICON_FILE = os.path.join(PROJECT_DIR, "assets", "icon.png")
|
|
72
|
+
BATCH_FILE = os.path.join(DATA_DIR, "cs2tracker_scraper.bat")
|
|
73
|
+
INVENTORY_IMPORT_FILE = os.path.join(DATA_DIR, "inventory.json")
|
|
74
|
+
INVENTORY_IMPORT_SCRIPT_DEPENDENCIES = [
|
|
75
|
+
"steam-user",
|
|
76
|
+
"globaloffensive",
|
|
77
|
+
"@node-steam/vdf",
|
|
78
|
+
"axios",
|
|
79
|
+
]
|
|
80
|
+
|
|
81
|
+
def show_temp_popup():
|
|
82
|
+
"""Show a temporary popup window while copying initial files."""
|
|
83
|
+
popup = tk.Tk()
|
|
84
|
+
popup.title("Please wait")
|
|
85
|
+
popup.geometry(centered(popup, "300x80"))
|
|
86
|
+
popup.resizable(False, False)
|
|
87
|
+
if OS == OSType.WINDOWS:
|
|
88
|
+
app_id = "cs2tracker.unique.id"
|
|
89
|
+
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(app_id)
|
|
90
|
+
icon = tk.PhotoImage(file=ICON_FILE)
|
|
91
|
+
popup.wm_iconphoto(True, icon)
|
|
92
|
+
|
|
93
|
+
label = ttk.Label(popup, text="Setting up the application. Please wait...")
|
|
94
|
+
label.pack(pady=20)
|
|
95
|
+
|
|
96
|
+
sv_ttk.use_dark_theme()
|
|
97
|
+
|
|
98
|
+
popup.update()
|
|
99
|
+
return popup
|
|
100
|
+
|
|
101
|
+
def copy_initial_files_with_popup():
|
|
102
|
+
"""Copy initial files to the user data directory with a temporary popup."""
|
|
103
|
+
popup = show_temp_popup()
|
|
104
|
+
|
|
105
|
+
try:
|
|
106
|
+
if not os.path.exists(DATA_DIR):
|
|
107
|
+
os.makedirs(DATA_DIR)
|
|
108
|
+
if not os.path.exists(OUTPUT_FILE):
|
|
109
|
+
copy(OUTPUT_FILE_SOURCE, OUTPUT_FILE)
|
|
110
|
+
if not os.path.exists(CONFIG_FILE):
|
|
111
|
+
copy(CONFIG_FILE_SOURCE, CONFIG_FILE)
|
|
112
|
+
if not os.path.exists(INVENTORY_CONVERT_SCRIPT):
|
|
113
|
+
copy(INVENTORY_CONVERT_SCRIPT_SOURCE, INVENTORY_CONVERT_SCRIPT)
|
|
114
|
+
if not os.path.exists(INVENTORY_IMPORT_SCRIPT):
|
|
115
|
+
copy(INVENTORY_IMPORT_SCRIPT_SOURCE, INVENTORY_IMPORT_SCRIPT)
|
|
116
|
+
if not os.path.exists(NODE_MODULES):
|
|
117
|
+
copytree(NODE_MODULES_SOURCE, NODE_MODULES)
|
|
118
|
+
finally:
|
|
119
|
+
popup.destroy()
|
|
120
|
+
|
|
121
|
+
# pylint: disable=too-many-boolean-expressions
|
|
122
|
+
if (
|
|
123
|
+
not os.path.exists(DATA_DIR)
|
|
124
|
+
or not os.path.exists(OUTPUT_FILE)
|
|
125
|
+
or not os.path.exists(CONFIG_FILE)
|
|
126
|
+
or not os.path.exists(INVENTORY_CONVERT_SCRIPT)
|
|
127
|
+
or not os.path.exists(INVENTORY_IMPORT_SCRIPT)
|
|
128
|
+
or not os.path.exists(NODE_MODULES)
|
|
129
|
+
):
|
|
130
|
+
copy_initial_files_with_popup()
|
|
64
131
|
|
|
65
132
|
# Always copy the source config into the user data directory as a backup
|
|
66
133
|
# and overwrite the existing backup if it exists
|
|
67
134
|
# (This is to ensure that no outdated config backup remains in the user data directory)
|
|
68
135
|
copy(CONFIG_FILE_SOURCE, CONFIG_FILE_BACKUP)
|
|
69
136
|
|
|
70
|
-
if not os.path.exists(OUTPUT_FILE):
|
|
71
|
-
copy(OUTPUT_FILE_SOURCE, OUTPUT_FILE)
|
|
72
|
-
if not os.path.exists(CONFIG_FILE):
|
|
73
|
-
copy(CONFIG_FILE_SOURCE, CONFIG_FILE)
|
|
74
|
-
if not os.path.exists(IVENTORY_CONVERT_SCRIPT):
|
|
75
|
-
copy(IVENTORY_CONVERT_SCRIPT_SOURCE, IVENTORY_CONVERT_SCRIPT)
|
|
76
|
-
if not os.path.exists(INVENTORY_IMPORT_SCRIPT):
|
|
77
|
-
copy(INVENTORY_IMPORT_SCRIPT_SOURCE, INVENTORY_IMPORT_SCRIPT)
|
|
78
137
|
|
|
79
138
|
else:
|
|
80
139
|
MODULE_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
@@ -86,24 +145,25 @@ else:
|
|
|
86
145
|
OUTPUT_FILE = os.path.join(DATA_DIR, "output.csv")
|
|
87
146
|
INVENTORY_CONVERT_SCRIPT = os.path.join(DATA_DIR, "convert_inventory.js")
|
|
88
147
|
INVENTORY_IMPORT_SCRIPT = os.path.join(DATA_DIR, "get_inventory.js")
|
|
148
|
+
NODE_MODULES = os.path.join(DATA_DIR, "node_modules")
|
|
149
|
+
|
|
150
|
+
ICON_FILE = os.path.join(PROJECT_DIR, "assets", "icon.png")
|
|
151
|
+
BATCH_FILE = os.path.join(DATA_DIR, "cs2tracker_scraper.bat")
|
|
152
|
+
INVENTORY_IMPORT_FILE = os.path.join(DATA_DIR, "inventory.json")
|
|
153
|
+
INVENTORY_IMPORT_SCRIPT_DEPENDENCIES = [
|
|
154
|
+
"steam-user",
|
|
155
|
+
"globaloffensive",
|
|
156
|
+
"@node-steam/vdf",
|
|
157
|
+
"axios",
|
|
158
|
+
]
|
|
89
159
|
|
|
90
160
|
if not os.path.exists(CONFIG_FILE_BACKUP):
|
|
91
161
|
copy(CONFIG_FILE, CONFIG_FILE_BACKUP)
|
|
92
162
|
|
|
93
163
|
|
|
94
|
-
ICON_FILE = os.path.join(PROJECT_DIR, "assets", "icon.png")
|
|
95
|
-
BATCH_FILE = os.path.join(DATA_DIR, "cs2tracker_scraper.bat")
|
|
96
|
-
INVENTORY_IMPORT_FILE = os.path.join(DATA_DIR, "inventory.json")
|
|
97
|
-
INVENTORY_IMPORT_SCRIPT_DEPENDENCIES = [
|
|
98
|
-
"steam-user",
|
|
99
|
-
"globaloffensive",
|
|
100
|
-
"@node-steam/vdf",
|
|
101
|
-
"axios",
|
|
102
|
-
]
|
|
103
|
-
|
|
104
164
|
# Ensures that the necessary node modules are installed if a user wants
|
|
105
165
|
# to import their steam inventory via the cs2tracker/data/get_inventory.js Node.js script.
|
|
106
|
-
if not os.path.exists(
|
|
166
|
+
if not os.path.exists(NODE_MODULES):
|
|
107
167
|
npm.Popen(
|
|
108
168
|
["install", "-g", "--prefix", DATA_DIR] + INVENTORY_IMPORT_SCRIPT_DEPENDENCIES,
|
|
109
169
|
stdout=DEVNULL,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cs2tracker
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.17
|
|
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
|
|
@@ -54,6 +54,7 @@ Dynamic: license-file
|
|
|
54
54
|
- [Usage](#usage)
|
|
55
55
|
- [Configuration](#configuration)
|
|
56
56
|
- [Advanced Features](#advanced-features)
|
|
57
|
+
- [FAQ](#faq)
|
|
57
58
|
- [Contributing](#contributing)
|
|
58
59
|
- [License](#license)
|
|
59
60
|
|
|
@@ -74,8 +75,9 @@ Dynamic: license-file
|
|
|
74
75
|
#### Method 1: Executable
|
|
75
76
|
|
|
76
77
|
Simply download the program and run it:
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
|
|
79
|
+
- [Windows](https://github.com/ashiven/cs2tracker/releases/latest/download/cs2tracker-windows.zip)
|
|
80
|
+
- [Linux](https://github.com/ashiven/cs2tracker/releases/latest/download/cs2tracker-linux.zip)
|
|
79
81
|
|
|
80
82
|
#### Method 2: Install via Pip
|
|
81
83
|
|
|
@@ -90,6 +92,7 @@ Simply download the program and run it:
|
|
|
90
92
|
```bash
|
|
91
93
|
cs2tracker
|
|
92
94
|
```
|
|
95
|
+
|
|
93
96
|
### Additional Setup
|
|
94
97
|
|
|
95
98
|
- Register for the [Crawlbase Smart Proxy API](https://crawlbase.com/) and retrieve your API key. (Optional)
|
|
@@ -121,14 +124,31 @@ This will open the config editor where you can change any setting by double clic
|
|
|
121
124
|
- Enable **Proxy Requests** to prevent your requests from being rate limited by the steamcommunity server.
|
|
122
125
|
- You need to register for a free API key on [Crawlbase](crawlbase.com) and enter it into the `proxy_api_key` field in the config `User Settings`.
|
|
123
126
|
|
|
127
|
+
## FAQ
|
|
128
|
+
|
|
129
|
+
**Q: Is it safe to login with my Steam account?**
|
|
130
|
+
|
|
131
|
+
**A:** Yes, the program uses the [SteamUser](https://github.com/DoctorMcKay/node-steam-user?tab=readme-ov-file#methods-) and [Globaloffensive](https://github.com/DoctorMcKay/node-globaloffensive) libraries to sign in and import your Storage Units (the same method is used by [casemove](https://github.com/nombersDev/casemove)) and all of the login-related code is transparently available in [this file](cs2tracker/data/get_inventory.js).
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
**Q: Do I have to login with my Steam account?**
|
|
135
|
+
|
|
136
|
+
**A:** No, you can also manually specify the number of items you own in the config editor.
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
**Q: Can I get VAC-banned for using this program?**
|
|
140
|
+
|
|
141
|
+
**A:** No, this program does not interact with the game in any way and only reads your Storage Units.
|
|
142
|
+
|
|
124
143
|
## Contributing
|
|
125
144
|
|
|
126
145
|
Please feel free to submit a pull request or open an issue. See [issues](https://github.com/ashiven/cs2tracker/issues) and [pull requests](https://github.com/ashiven/cs2tracker/pulls) for current work.
|
|
127
146
|
|
|
128
147
|
1. Fork the repository
|
|
129
|
-
2. Create a new branch
|
|
148
|
+
2. Create a new branch: `git checkout -b feature-name`.
|
|
130
149
|
3. Make your changes
|
|
131
|
-
4.
|
|
150
|
+
4. Push your branch: `git push origin feature-name`.
|
|
151
|
+
5. Submit a PR
|
|
132
152
|
|
|
133
153
|
## License
|
|
134
154
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
cs2tracker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
cs2tracker/__main__.py,sha256=Ub--oSMv48YzfWF1CZqYlkn1-HvZ7Bhxoc7urn1oY6o,249
|
|
3
|
-
cs2tracker/_version.py,sha256=
|
|
3
|
+
cs2tracker/_version.py,sha256=6B1QsV14vku3b3mzQ60TgvM-e03ET7xDx-6ZZcUvbqI,513
|
|
4
4
|
cs2tracker/config.py,sha256=iab4WqKLl8-rfV7_MAd-96lfp_edMe6QQHW_m76FvD8,11011
|
|
5
|
-
cs2tracker/constants.py,sha256=
|
|
5
|
+
cs2tracker/constants.py,sha256=zN_8Zbn9P8m5WnRJsTD-etNyqTMCQmVqfrpDf3cx9xg,9468
|
|
6
6
|
cs2tracker/logs.py,sha256=K6uLoGjhHTlb6HLKIj6C5mz6R6bnZgltA6xwNVJ7Z8Y,6004
|
|
7
7
|
cs2tracker/main.py,sha256=9Jjn8-Hv9AzQLYjCjA6pwAmThE4HH1u3akF_c7atyl4,1046
|
|
8
8
|
cs2tracker/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
cs2tracker/app/app.py,sha256=
|
|
10
|
-
cs2tracker/app/editor_frame.py,sha256=
|
|
9
|
+
cs2tracker/app/app.py,sha256=yKe7CUgvDfiicE-4w-omMEwHvxqCQerQSFa_FtRtYWM,12012
|
|
10
|
+
cs2tracker/app/editor_frame.py,sha256=tKJnV3QwdRgEQoW9IJUuBjBoHbVp9tuR3USmgXfDqFI,27147
|
|
11
11
|
cs2tracker/app/history_frame.py,sha256=_QJdomghK10k0q0q4hyNm_RtzrbWa5jw3Rbq72smGT0,2001
|
|
12
12
|
cs2tracker/app/scraper_frame.py,sha256=GDRytrNe1gUMXA_ZcbTEcOVx2N81pQJGGYI-Fv-ww6o,4233
|
|
13
13
|
cs2tracker/data/config.ini,sha256=qTmBG8Qo6BYEBA9qEb_D8c_TW8Lf_0MuusmGjdP6S1Q,15093
|
|
@@ -23,9 +23,9 @@ cs2tracker/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
23
23
|
cs2tracker/util/currency_conversion.py,sha256=h_VdipCFPzcgybWZ2VYknOd1VjHiqsFbEVed95FOe7U,2199
|
|
24
24
|
cs2tracker/util/padded_console.py,sha256=ZEbU5MxDA7Xbd-_SXIyezwGvb349OgAtjNPjFT_wrZw,1774
|
|
25
25
|
cs2tracker/util/tkinter.py,sha256=yR6rog4P7t_rDgH6ctssfQeJYFbqFXboiRv1V9c1vk4,1518
|
|
26
|
-
cs2tracker-2.1.
|
|
27
|
-
cs2tracker-2.1.
|
|
28
|
-
cs2tracker-2.1.
|
|
29
|
-
cs2tracker-2.1.
|
|
30
|
-
cs2tracker-2.1.
|
|
31
|
-
cs2tracker-2.1.
|
|
26
|
+
cs2tracker-2.1.17.dist-info/licenses/LICENSE,sha256=doPNswWMPXbkhplb9cnZLwJoqqS72pJPhkSib8kIF08,19122
|
|
27
|
+
cs2tracker-2.1.17.dist-info/METADATA,sha256=Y10or3XP5W8w8CdMjdOxON0GY7zmmCpEeGx_jskuW-k,6515
|
|
28
|
+
cs2tracker-2.1.17.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
29
|
+
cs2tracker-2.1.17.dist-info/entry_points.txt,sha256=K8IwDIkg8QztSB9g9c89B9jR_2pG4QyJGrNs4z5RcZw,63
|
|
30
|
+
cs2tracker-2.1.17.dist-info/top_level.txt,sha256=2HB4xDDOxaU5BDc_yvdi9UlYLgL768n8aR-hRhFM6VQ,11
|
|
31
|
+
cs2tracker-2.1.17.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|