cs2tracker 2.1.12__py3-none-any.whl → 2.1.14__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/application.py +84 -88
- cs2tracker/app/editor_frame.py +451 -143
- cs2tracker/app/scraper_frame.py +43 -9
- cs2tracker/constants.py +66 -451
- cs2tracker/data/config.ini +153 -153
- cs2tracker/data/convert_inventory.js +187 -0
- cs2tracker/data/get_inventory.js +191 -0
- cs2tracker/main.py +2 -2
- cs2tracker/scraper/background_task.py +4 -4
- cs2tracker/scraper/discord_notifier.py +4 -4
- cs2tracker/scraper/parsers.py +192 -0
- cs2tracker/scraper/scraper.py +146 -224
- cs2tracker/util/__init__.py +2 -2
- cs2tracker/util/padded_console.py +32 -0
- cs2tracker/util/validated_config.py +117 -16
- cs2tracker-2.1.14.dist-info/METADATA +148 -0
- cs2tracker-2.1.14.dist-info/RECORD +28 -0
- cs2tracker-2.1.14.dist-info/licenses/LICENSE +402 -0
- cs2tracker-2.1.12.dist-info/METADATA +0 -82
- cs2tracker-2.1.12.dist-info/RECORD +0 -25
- cs2tracker-2.1.12.dist-info/licenses/LICENSE.md +0 -21
- {cs2tracker-2.1.12.dist-info → cs2tracker-2.1.14.dist-info}/WHEEL +0 -0
- {cs2tracker-2.1.12.dist-info → cs2tracker-2.1.14.dist-info}/entry_points.txt +0 -0
- {cs2tracker-2.1.12.dist-info → cs2tracker-2.1.14.dist-info}/top_level.txt +0 -0
cs2tracker/data/config.ini
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
[App Settings]
|
|
2
|
+
use_proxy ~ False
|
|
3
|
+
discord_notifications ~ False
|
|
4
|
+
|
|
1
5
|
[User Settings]
|
|
2
6
|
proxy_api_key ~
|
|
3
7
|
discord_webhook_url ~
|
|
@@ -5,200 +9,196 @@ discord_webhook_url ~
|
|
|
5
9
|
[Custom Items]
|
|
6
10
|
|
|
7
11
|
[Cases]
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
12
|
+
https://steamcommunity.com/market/listings/730/Revolution%20Case ~ 0
|
|
13
|
+
https://steamcommunity.com/market/listings/730/Recoil%20Case ~ 0
|
|
14
|
+
https://steamcommunity.com/market/listings/730/Dreams%20%26%20Nightmares%20Case ~ 0
|
|
15
|
+
https://steamcommunity.com/market/listings/730/Operation%20Riptide%20Case ~ 0
|
|
16
|
+
https://steamcommunity.com/market/listings/730/Snakebite%20Case ~ 0
|
|
17
|
+
https://steamcommunity.com/market/listings/730/Operation%20Broken%20Fang%20Case ~ 0
|
|
18
|
+
https://steamcommunity.com/market/listings/730/Fracture%20Case ~ 0
|
|
19
|
+
https://steamcommunity.com/market/listings/730/Chroma%20Case ~ 0
|
|
20
|
+
https://steamcommunity.com/market/listings/730/Chroma%202%20Case ~ 0
|
|
21
|
+
https://steamcommunity.com/market/listings/730/Chroma%203%20Case ~ 0
|
|
22
|
+
https://steamcommunity.com/market/listings/730/Clutch%20Case ~ 0
|
|
23
|
+
https://steamcommunity.com/market/listings/730/CS%3AGO%20Weapon%20Case ~ 0
|
|
24
|
+
https://steamcommunity.com/market/listings/730/CS%3AGO%20Weapon%20Case%202 ~ 0
|
|
25
|
+
https://steamcommunity.com/market/listings/730/CS%3AGO%20Weapon%20Case%203 ~ 0
|
|
26
|
+
https://steamcommunity.com/market/listings/730/CS20%20Case ~ 0
|
|
27
|
+
https://steamcommunity.com/market/listings/730/Danger%20Zone%20Case ~ 0
|
|
28
|
+
https://steamcommunity.com/market/listings/730/eSports%202013%20Case ~ 0
|
|
29
|
+
https://steamcommunity.com/market/listings/730/eSports%202013%20Winter%20Case ~ 0
|
|
30
|
+
https://steamcommunity.com/market/listings/730/eSports%202014%20Summer%20Case ~ 0
|
|
31
|
+
https://steamcommunity.com/market/listings/730/Falchion%20Case ~ 0
|
|
32
|
+
https://steamcommunity.com/market/listings/730/Gamma%20Case ~ 0
|
|
33
|
+
https://steamcommunity.com/market/listings/730/Gamma%202%20Case ~ 0
|
|
34
|
+
https://steamcommunity.com/market/listings/730/Glove%20Case ~ 0
|
|
35
|
+
https://steamcommunity.com/market/listings/730/Horizon%20Case ~ 0
|
|
36
|
+
https://steamcommunity.com/market/listings/730/Huntsman%20Weapon%20Case ~ 0
|
|
37
|
+
https://steamcommunity.com/market/listings/730/Operation%20Bravo%20Case ~ 0
|
|
38
|
+
https://steamcommunity.com/market/listings/730/Operation%20Breakout%20Weapon%20Case ~ 0
|
|
39
|
+
https://steamcommunity.com/market/listings/730/Operation%20Hydra%20Case ~ 0
|
|
40
|
+
https://steamcommunity.com/market/listings/730/Operation%20Phoenix%20Weapon%20Case ~ 0
|
|
41
|
+
https://steamcommunity.com/market/listings/730/Operation%20Vanguard%20Weapon%20Case ~ 0
|
|
42
|
+
https://steamcommunity.com/market/listings/730/Operation%20Wildfire%20Case ~ 0
|
|
43
|
+
https://steamcommunity.com/market/listings/730/Prisma%20Case ~ 0
|
|
44
|
+
https://steamcommunity.com/market/listings/730/Prisma%202%20Case ~ 0
|
|
45
|
+
https://steamcommunity.com/market/listings/730/Revolver%20Case ~ 0
|
|
46
|
+
https://steamcommunity.com/market/listings/730/Shadow%20Case ~ 0
|
|
47
|
+
https://steamcommunity.com/market/listings/730/Shattered%20Web%20Case ~ 0
|
|
48
|
+
https://steamcommunity.com/market/listings/730/Spectrum%20Case ~ 0
|
|
49
|
+
https://steamcommunity.com/market/listings/730/Spectrum%202%20Case ~ 0
|
|
50
|
+
https://steamcommunity.com/market/listings/730/Winter%20Offensive%20Weapon%20Case ~ 0
|
|
51
|
+
https://steamcommunity.com/market/listings/730/Kilowatt%20Case ~ 0
|
|
52
|
+
https://steamcommunity.com/market/listings/730/Gallery%20Case ~ 0
|
|
53
|
+
https://steamcommunity.com/market/listings/730/Fever%20Case ~ 0
|
|
50
54
|
|
|
51
55
|
[Katowice 2014 Sticker Capsule]
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
https://steamcommunity.com/market/listings/730/EMS%20Katowice%202014%20Legends ~ 0
|
|
57
|
+
https://steamcommunity.com/market/listings/730/EMS%20Katowice%202014%20Challengers ~ 0
|
|
54
58
|
|
|
55
59
|
[Cologne 2014 Sticker Capsule]
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
https://steamcommunity.com/market/listings/730/ESL%20One%20Cologne%202014%20Legends ~ 0
|
|
61
|
+
https://steamcommunity.com/market/listings/730/ESL%20One%20Cologne%202014%20Challengers ~ 0
|
|
58
62
|
|
|
59
63
|
[DreamHack 2014 Sticker Capsule]
|
|
60
|
-
|
|
64
|
+
https://steamcommunity.com/market/listings/730/DreamHack%202014%20Legends%20%28Holo-Foil%29 ~ 0
|
|
61
65
|
|
|
62
66
|
[Katowice 2015 Sticker Capsule]
|
|
63
|
-
|
|
64
|
-
|
|
67
|
+
https://steamcommunity.com/market/listings/730/ESL%20One%20Katowice%202015%20Legends%20%28Holo-Foil%29 ~ 0
|
|
68
|
+
https://steamcommunity.com/market/listings/730/ESL%20One%20Katowice%202015%20Challengers%20%28Holo-Foil%29 ~ 0
|
|
65
69
|
|
|
66
70
|
[Cologne 2015 Sticker Capsule]
|
|
67
|
-
|
|
68
|
-
|
|
71
|
+
https://steamcommunity.com/market/listings/730/ESL%20One%20Cologne%202015%20Legends%20%28Foil%29 ~ 0
|
|
72
|
+
https://steamcommunity.com/market/listings/730/ESL%20One%20Cologne%202015%20Challengers%20%28Foil%29 ~ 0
|
|
69
73
|
|
|
70
74
|
[Cluj-Napoca 2015 Sticker Capsule]
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
+
https://steamcommunity.com/market/listings/730/DreamHack%20Cluj-Napoca%202015%20Legends%20%28Foil%29 ~ 0
|
|
76
|
+
https://steamcommunity.com/market/listings/730/DreamHack%20Cluj-Napoca%202015%20Challengers%20%28Foil%29 ~ 0
|
|
77
|
+
https://steamcommunity.com/market/listings/730/Autograph%20Capsule%20%7C%20Legends%20%28Foil%29%20%7C%20Cluj-Napoca%202015 ~ 0
|
|
78
|
+
https://steamcommunity.com/market/listings/730/Autograph%20Capsule%20%7C%20Challengers%20%28Foil%29%20%7C%20Cluj-Napoca%202015 ~ 0
|
|
75
79
|
|
|
76
80
|
[Columbus 2016 Sticker Capsule]
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
https://steamcommunity.com/market/listings/730/MLG%20Columbus%202016%20Legends%20%28Holo-Foil%29 ~ 0
|
|
82
|
+
https://steamcommunity.com/market/listings/730/MLG%20Columbus%202016%20Challengers%20%28Holo-Foil%29 ~ 0
|
|
83
|
+
https://steamcommunity.com/market/listings/730/Autograph%20Capsule%20%7C%20Legends%20%28Foil%29%20%7C%20MLG%20Columbus%202016 ~ 0
|
|
84
|
+
https://steamcommunity.com/market/listings/730/Autograph%20Capsule%20%7C%20Challengers%20%28Foil%29%20%7C%20MLG%20Columbus%202016 ~ 0
|
|
81
85
|
|
|
82
86
|
[Cologne 2016 Sticker Capsule]
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
+
https://steamcommunity.com/market/listings/730/Cologne%202016%20Legends%20%28Holo-Foil%29 ~ 0
|
|
88
|
+
https://steamcommunity.com/market/listings/730/Cologne%202016%20Challengers%20%28Holo-Foil%29 ~ 0
|
|
89
|
+
https://steamcommunity.com/market/listings/730/Autograph%20Capsule%20%7C%20Legends%20%28Foil%29%20%7C%20Cologne%202016 ~ 0
|
|
90
|
+
https://steamcommunity.com/market/listings/730/Autograph%20Capsule%20%7C%20Challengers%20%28Foil%29%20%7C%20Cologne%202016 ~ 0
|
|
87
91
|
|
|
88
92
|
[Atlanta 2017 Sticker Capsule]
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
+
https://steamcommunity.com/market/listings/730/Atlanta%202017%20Legends%20%28Holo-Foil%29 ~ 0
|
|
94
|
+
https://steamcommunity.com/market/listings/730/Atlanta%202017%20Challengers%20%28Holo-Foil%29 ~ 0
|
|
95
|
+
https://steamcommunity.com/market/listings/730/Autograph%20Capsule%20%7C%20Legends%20%28Foil%29%20%7C%20Atlanta%202017 ~ 0
|
|
96
|
+
https://steamcommunity.com/market/listings/730/Autograph%20Capsule%20%7C%20Challengers%20%28Foil%29%20%7C%20Atlanta%202017 ~ 0
|
|
93
97
|
|
|
94
98
|
[Krakow 2017 Sticker Capsule]
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
+
https://steamcommunity.com/market/listings/730/Krakow%202017%20Legends%20%28Holo-Foil%29 ~ 0
|
|
100
|
+
https://steamcommunity.com/market/listings/730/Krakow%202017%20Challengers%20%28Holo-Foil%29 ~ 0
|
|
101
|
+
https://steamcommunity.com/market/listings/730/Krakow%202017%20Legends%20Autograph%20Capsule ~ 0
|
|
102
|
+
https://steamcommunity.com/market/listings/730/Krakow%202017%20Challengers%20Autograph%20Capsule ~ 0
|
|
99
103
|
|
|
100
104
|
[Boston 2018 Sticker Capsule]
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
105
|
+
https://steamcommunity.com/market/listings/730/Boston%202018%20Legends%20%28Holo-Foil%29 ~ 0
|
|
106
|
+
https://steamcommunity.com/market/listings/730/Boston%202018%20Minor%20Challengers%20%28Holo-Foil%29 ~ 0
|
|
107
|
+
https://steamcommunity.com/market/listings/730/Boston%202018%20Returning%20Challengers%20%28Holo-Foil%29 ~ 0
|
|
108
|
+
https://steamcommunity.com/market/listings/730/Boston%202018%20Attending%20Legends%20%28Holo-Foil%29 ~ 0
|
|
109
|
+
https://steamcommunity.com/market/listings/730/Boston%202018%20Minor%20Challengers%20with%20Flash%20Gaming%20%28Holo-Foil%29 ~ 0
|
|
110
|
+
https://steamcommunity.com/market/listings/730/Boston%202018%20Legends%20Autograph%20Capsule ~ 0
|
|
111
|
+
https://steamcommunity.com/market/listings/730/Boston%202018%20Minor%20Challengers%20Autograph%20Capsule ~ 0
|
|
112
|
+
https://steamcommunity.com/market/listings/730/Boston%202018%20Returning%20Challengers%20Autograph%20Capsule ~ 0
|
|
113
|
+
https://steamcommunity.com/market/listings/730/Boston%202018%20Attending%20Legends%20Autograph%20Capsule ~ 0
|
|
114
|
+
https://steamcommunity.com/market/listings/730/Boston%202018%20Minor%20Challengers%20with%20Flash%20Gaming%20Autograph%20Capsule ~ 0
|
|
111
115
|
|
|
112
116
|
[London 2018 Sticker Capsule]
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
https://steamcommunity.com/market/listings/730/London%202018%20Legends%20%28Holo-Foil%29 ~ 0
|
|
118
|
+
https://steamcommunity.com/market/listings/730/London%202018%20Minor%20Challengers%20%28Holo-Foil%29 ~ 0
|
|
119
|
+
https://steamcommunity.com/market/listings/730/London%202018%20Returning%20Challengers%20%28Holo-Foil%29 ~ 0
|
|
120
|
+
https://steamcommunity.com/market/listings/730/London%202018%20Legends%20Autograph%20Capsule ~ 0
|
|
121
|
+
https://steamcommunity.com/market/listings/730/London%202018%20Minor%20Challengers%20Autograph%20Capsule ~ 0
|
|
122
|
+
https://steamcommunity.com/market/listings/730/London%202018%20Returning%20Challengers%20Autograph%20Capsule ~ 0
|
|
119
123
|
|
|
120
124
|
[Katowice 2019 Sticker Capsule]
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
https://steamcommunity.com/market/listings/730/Katowice%202019%20Legends%20%28Holo-Foil%29 ~ 0
|
|
126
|
+
https://steamcommunity.com/market/listings/730/Katowice%202019%20Minor%20Challengers%20%28Holo-Foil%29 ~ 0
|
|
127
|
+
https://steamcommunity.com/market/listings/730/Katowice%202019%20Returning%20Challengers%20%28Holo-Foil%29 ~ 0
|
|
128
|
+
https://steamcommunity.com/market/listings/730/Katowice%202019%20Legends%20Autograph%20Capsule ~ 0
|
|
129
|
+
https://steamcommunity.com/market/listings/730/Katowice%202019%20Minor%20Challengers%20Autograph%20Capsule ~ 0
|
|
130
|
+
https://steamcommunity.com/market/listings/730/Katowice%202019%20Returning%20Challengers%20Autograph%20Capsule ~ 0
|
|
127
131
|
|
|
128
132
|
[Berlin 2019 Sticker Capsule]
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
https://steamcommunity.com/market/listings/730/Berlin%202019%20Legends%20%28Holo-Foil%29 ~ 0
|
|
134
|
+
https://steamcommunity.com/market/listings/730/Berlin%202019%20Minor%20Challengers%20%28Holo-Foil%29 ~ 0
|
|
135
|
+
https://steamcommunity.com/market/listings/730/Berlin%202019%20Returning%20Challengers%20%28Holo-Foil%29 ~ 0
|
|
136
|
+
https://steamcommunity.com/market/listings/730/Berlin%202019%20Legends%20Autograph%20Capsule ~ 0
|
|
137
|
+
https://steamcommunity.com/market/listings/730/Berlin%202019%20Minor%20Challengers%20Autograph%20Capsule ~ 0
|
|
138
|
+
https://steamcommunity.com/market/listings/730/Berlin%202019%20Returning%20Challengers%20Autograph%20Capsule ~ 0
|
|
135
139
|
|
|
136
140
|
[2020 RMR Sticker Capsule]
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
141
|
+
https://steamcommunity.com/market/listings/730/2020%20RMR%20Legends ~ 0
|
|
142
|
+
https://steamcommunity.com/market/listings/730/2020%20RMR%20Challengers ~ 0
|
|
143
|
+
https://steamcommunity.com/market/listings/730/2020%20RMR%20Contenders ~ 0
|
|
140
144
|
|
|
141
145
|
[Stockholm 2021 Sticker Capsule]
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
146
|
+
https://steamcommunity.com/market/listings/730/Stockholm%202021%20Legends%20Sticker%20Capsule ~ 0
|
|
147
|
+
https://steamcommunity.com/market/listings/730/Stockholm%202021%20Challengers%20Sticker%20Capsule ~ 0
|
|
148
|
+
https://steamcommunity.com/market/listings/730/Stockholm%202021%20Contenders%20Sticker%20Capsule ~ 0
|
|
149
|
+
https://steamcommunity.com/market/listings/730/Stockholm%202021%20Champions%20Autograph%20Capsule ~ 0
|
|
150
|
+
https://steamcommunity.com/market/listings/730/Stockholm%202021%20Finalists%20Autograph%20Capsule ~ 0
|
|
147
151
|
|
|
148
152
|
[Antwerp 2022 Sticker Capsule]
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
153
|
+
https://steamcommunity.com/market/listings/730/Antwerp%202022%20Legends%20Sticker%20Capsule ~ 0
|
|
154
|
+
https://steamcommunity.com/market/listings/730/Antwerp%202022%20Challengers%20Sticker%20Capsule ~ 0
|
|
155
|
+
https://steamcommunity.com/market/listings/730/Antwerp%202022%20Contenders%20Sticker%20Capsule ~ 0
|
|
156
|
+
https://steamcommunity.com/market/listings/730/Antwerp%202022%20Champions%20Autograph%20Capsule ~ 0
|
|
157
|
+
https://steamcommunity.com/market/listings/730/Antwerp%202022%20Challengers%20Autograph%20Capsule ~ 0
|
|
158
|
+
https://steamcommunity.com/market/listings/730/Antwerp%202022%20Legends%20Autograph%20Capsule ~ 0
|
|
159
|
+
https://steamcommunity.com/market/listings/730/Antwerp%202022%20Contenders%20Autograph%20Capsule ~ 0
|
|
156
160
|
|
|
157
161
|
[Rio 2022 Sticker Capsule]
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
162
|
+
https://steamcommunity.com/market/listings/730/Rio%202022%20Legends%20Sticker%20Capsule ~ 0
|
|
163
|
+
https://steamcommunity.com/market/listings/730/Rio%202022%20Challengers%20Sticker%20Capsule ~ 0
|
|
164
|
+
https://steamcommunity.com/market/listings/730/Rio%202022%20Contenders%20Sticker%20Capsule ~ 0
|
|
165
|
+
https://steamcommunity.com/market/listings/730/Rio%202022%20Champions%20Autograph%20Capsule ~ 0
|
|
166
|
+
https://steamcommunity.com/market/listings/730/Rio%202022%20Challengers%20Autograph%20Capsule ~ 0
|
|
167
|
+
https://steamcommunity.com/market/listings/730/Rio%202022%20Legends%20Autograph%20Capsule ~ 0
|
|
168
|
+
https://steamcommunity.com/market/listings/730/Rio%202022%20Contenders%20Autograph%20Capsule ~ 0
|
|
165
169
|
|
|
166
170
|
[Paris 2023 Sticker Capsule]
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
171
|
+
https://steamcommunity.com/market/listings/730/Paris%202023%20Legends%20Sticker%20Capsule ~ 0
|
|
172
|
+
https://steamcommunity.com/market/listings/730/Paris%202023%20Challengers%20Sticker%20Capsule ~ 0
|
|
173
|
+
https://steamcommunity.com/market/listings/730/Paris%202023%20Contenders%20Sticker%20Capsule ~ 0
|
|
174
|
+
https://steamcommunity.com/market/listings/730/Paris%202023%20Champions%20Autograph%20Capsule ~ 0
|
|
175
|
+
https://steamcommunity.com/market/listings/730/Paris%202023%20Challengers%20Autograph%20Capsule ~ 0
|
|
176
|
+
https://steamcommunity.com/market/listings/730/Paris%202023%20Legends%20Autograph%20Capsule ~ 0
|
|
177
|
+
https://steamcommunity.com/market/listings/730/Paris%202023%20Contenders%20Autograph%20Capsule ~ 0
|
|
174
178
|
|
|
175
179
|
[Copenhagen 2024 Sticker Capsule]
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
180
|
+
https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Legends%20Sticker%20Capsule ~ 0
|
|
181
|
+
https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Challengers%20Sticker%20Capsule ~ 0
|
|
182
|
+
https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Contenders%20Sticker%20Capsule ~ 0
|
|
183
|
+
https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Champions%20Autograph%20Capsule ~ 0
|
|
184
|
+
https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Challengers%20Autograph%20Capsule ~ 0
|
|
185
|
+
https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Legends%20Autograph%20Capsule ~ 0
|
|
186
|
+
https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Contenders%20Autograph%20Capsule ~ 0
|
|
183
187
|
|
|
184
188
|
[Shanghai 2024 Sticker Capsule]
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
189
|
+
https://steamcommunity.com/market/listings/730/Shanghai%202024%20Legends%20Sticker%20Capsule ~ 0
|
|
190
|
+
https://steamcommunity.com/market/listings/730/Shanghai%202024%20Challengers%20Sticker%20Capsule ~ 0
|
|
191
|
+
https://steamcommunity.com/market/listings/730/Shanghai%202024%20Contenders%20Sticker%20Capsule ~ 0
|
|
192
|
+
https://steamcommunity.com/market/listings/730/Shanghai%202024%20Champions%20Autograph%20Capsule ~ 0
|
|
193
|
+
https://steamcommunity.com/market/listings/730/Shanghai%202024%20Challengers%20Autograph%20Capsule ~ 0
|
|
194
|
+
https://steamcommunity.com/market/listings/730/Shanghai%202024%20Legends%20Autograph%20Capsule ~ 0
|
|
195
|
+
https://steamcommunity.com/market/listings/730/Shanghai%202024%20Contenders%20Autograph%20Capsule ~ 0
|
|
192
196
|
|
|
193
197
|
[Austin 2025 Sticker Capsule]
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
[App Settings]
|
|
203
|
-
use_proxy ~ False
|
|
204
|
-
discord_notifications ~ False
|
|
198
|
+
https://steamcommunity.com/market/listings/730/Austin%202025%20Legends%20Sticker%20Capsule ~ 0
|
|
199
|
+
https://steamcommunity.com/market/listings/730/Austin%202025%20Challengers%20Sticker%20Capsule ~ 0
|
|
200
|
+
https://steamcommunity.com/market/listings/730/Austin%202025%20Contenders%20Sticker%20Capsule ~ 0
|
|
201
|
+
https://steamcommunity.com/market/listings/730/Austin%202025%20Champions%20Autograph%20Capsule ~ 0
|
|
202
|
+
https://steamcommunity.com/market/listings/730/Austin%202025%20Challengers%20Autograph%20Capsule ~ 0
|
|
203
|
+
https://steamcommunity.com/market/listings/730/Austin%202025%20Legends%20Autograph%20Capsule ~ 0
|
|
204
|
+
https://steamcommunity.com/market/listings/730/Austin%202025%20Contenders%20Autograph%20Capsule ~ 0
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
const fs = require("fs");
|
|
2
|
+
const path = require("path");
|
|
3
|
+
const axios = require("axios");
|
|
4
|
+
const VDF = require("@node-steam/vdf");
|
|
5
|
+
|
|
6
|
+
const translationsLink =
|
|
7
|
+
"https://raw.githubusercontent.com/SteamDatabase/GameTracking-CS2/master/game/csgo/pak01_dir/resource/csgo_english.txt";
|
|
8
|
+
const itemsGameLink =
|
|
9
|
+
"https://raw.githubusercontent.com/SteamDatabase/GameTracking-CS2/master/game/csgo/pak01_dir/scripts/items/items_game.txt";
|
|
10
|
+
|
|
11
|
+
const translationsCacheFile = path.join(__dirname, "translations.json");
|
|
12
|
+
const itemsCacheFile = path.join(__dirname, "items.json");
|
|
13
|
+
|
|
14
|
+
class ItemNameConverter {
|
|
15
|
+
constructor() {
|
|
16
|
+
this.translations = {};
|
|
17
|
+
this.items = {};
|
|
18
|
+
this.prefabs = {};
|
|
19
|
+
this.paintKits = {};
|
|
20
|
+
this.stickerKits = {};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
async initialize() {
|
|
24
|
+
await Promise.all([this.loadTranslations(), this.loadItemsGame()]);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async loadTranslations() {
|
|
28
|
+
if (
|
|
29
|
+
fs.existsSync(translationsCacheFile) &&
|
|
30
|
+
fs.statSync(translationsCacheFile).mtime.getDate() ===
|
|
31
|
+
new Date().getDate()
|
|
32
|
+
) {
|
|
33
|
+
this.translations = require(translationsCacheFile);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const res = await axios.get(translationsLink);
|
|
38
|
+
const lines = res.data.split(/\n/);
|
|
39
|
+
for (const line of lines) {
|
|
40
|
+
const match = line.match(/"(.+?)"\s+"(.+?)"/);
|
|
41
|
+
if (match) {
|
|
42
|
+
this.translations[match[1].toLowerCase()] = match[2];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
fs.writeFileSync(
|
|
47
|
+
translationsCacheFile,
|
|
48
|
+
JSON.stringify(this.translations, null, 2),
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
async loadItemsGame() {
|
|
53
|
+
if (
|
|
54
|
+
fs.existsSync(itemsCacheFile) &&
|
|
55
|
+
fs.statSync(itemsCacheFile).mtime.getDate() === new Date().getDate()
|
|
56
|
+
) {
|
|
57
|
+
this.items = require(itemsCacheFile).items;
|
|
58
|
+
this.prefabs = require(itemsCacheFile).prefabs;
|
|
59
|
+
this.paintKits = require(itemsCacheFile).paint_kits;
|
|
60
|
+
this.stickerKits = require(itemsCacheFile).sticker_kits;
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const res = await axios.get(itemsGameLink);
|
|
65
|
+
const parsed = VDF.parse(res.data).items_game;
|
|
66
|
+
this.items = parsed.items;
|
|
67
|
+
this.prefabs = parsed.prefabs;
|
|
68
|
+
this.paintKits = parsed.paint_kits;
|
|
69
|
+
this.stickerKits = parsed.sticker_kits;
|
|
70
|
+
|
|
71
|
+
fs.writeFileSync(itemsCacheFile, JSON.stringify(parsed, null, 2));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
translate(key) {
|
|
75
|
+
if (!key) return "";
|
|
76
|
+
return this.translations[key.replace("#", "").toLowerCase()] || key;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
getItemName(item) {
|
|
80
|
+
const def = this.items[item.def_index];
|
|
81
|
+
if (!def) return "";
|
|
82
|
+
|
|
83
|
+
let baseName = "";
|
|
84
|
+
if (def.item_name) {
|
|
85
|
+
baseName = this.translate(def.item_name);
|
|
86
|
+
} else if (def.prefab && this.prefabs[def.prefab]) {
|
|
87
|
+
baseName = this.translate(this.prefabs[def.prefab].item_name);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
let stickerName = "";
|
|
91
|
+
if (baseName === "Sticker" && item.stickers && item.stickers.length === 1) {
|
|
92
|
+
stickerName = this.translate(
|
|
93
|
+
this.stickerKits[String(item.stickers[0].sticker_id)].item_name,
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
let skinName = "";
|
|
98
|
+
if (item.paint_index && this.paintKits[item.paint_index]) {
|
|
99
|
+
skinName = this.translate(
|
|
100
|
+
this.paintKits[item.paint_index].description_tag,
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
let wear = "";
|
|
105
|
+
if (item.paint_wear !== undefined) {
|
|
106
|
+
wear = this.getWearName(item.paint_wear);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// It is a knife / glove
|
|
110
|
+
if (item.quality === 3) {
|
|
111
|
+
baseName = "★ " + baseName;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// It is a stattrak or souvenir item
|
|
115
|
+
if (item.attribute && item.attribute.length > 0) {
|
|
116
|
+
for (let [_attributeName, attributeValue] of Object.entries(
|
|
117
|
+
item.attribute,
|
|
118
|
+
)) {
|
|
119
|
+
switch (attributeValue.def_index) {
|
|
120
|
+
case 80:
|
|
121
|
+
baseName = baseName.includes("StatTrak™")
|
|
122
|
+
? baseName
|
|
123
|
+
: "StatTrak™ " + baseName;
|
|
124
|
+
break;
|
|
125
|
+
case 140:
|
|
126
|
+
baseName = baseName.includes("Souvenir")
|
|
127
|
+
? baseName
|
|
128
|
+
: "Souvenir " + baseName;
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if (baseName && skinName) {
|
|
135
|
+
return `${baseName} | ${skinName}${wear ? ` (${wear})` : ""}`;
|
|
136
|
+
} else if (baseName && stickerName) {
|
|
137
|
+
return `${baseName} | ${stickerName}`;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return baseName;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
getWearName(paintWear) {
|
|
144
|
+
const wearLevels = [
|
|
145
|
+
{ max: 0.07, name: "Factory New" },
|
|
146
|
+
{ max: 0.15, name: "Minimal Wear" },
|
|
147
|
+
{ max: 0.38, name: "Field-Tested" },
|
|
148
|
+
{ max: 0.45, name: "Well-Worn" },
|
|
149
|
+
{ max: 1, name: "Battle-Scarred" },
|
|
150
|
+
];
|
|
151
|
+
return wearLevels.find((w) => paintWear <= w.max)?.name || "";
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
getItemType(item) {
|
|
155
|
+
const def = this.items[item.def_index];
|
|
156
|
+
if (!def) return "unknown";
|
|
157
|
+
|
|
158
|
+
if (def.item_name) {
|
|
159
|
+
let translatedName =
|
|
160
|
+
def.item_name.replace("#", "").toLowerCase() || def.item_name;
|
|
161
|
+
if (
|
|
162
|
+
translatedName.includes("crate_sticker_pack") ||
|
|
163
|
+
translatedName.includes("crate_signature_pack")
|
|
164
|
+
) {
|
|
165
|
+
return "sticker capsule";
|
|
166
|
+
} else if (translatedName.includes("crate_community")) {
|
|
167
|
+
return "case";
|
|
168
|
+
} else if (translatedName.includes("csgo_tool_spray")) {
|
|
169
|
+
return "graffiti kit";
|
|
170
|
+
} else if (translatedName.includes("csgo_tool_sticker")) {
|
|
171
|
+
return "sticker";
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
return "other";
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
convertInventory(inventoryList) {
|
|
179
|
+
return inventoryList.map((item) => ({
|
|
180
|
+
...item,
|
|
181
|
+
item_name: this.getItemName(item),
|
|
182
|
+
item_type: this.getItemType(item),
|
|
183
|
+
}));
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
module.exports = ItemNameConverter;
|