Steering fonts for UX overhaul
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
---
|
||||
inclusion: always
|
||||
---
|
||||
<!------------------------------------------------------------------------------------
|
||||
Add rules to this file or a short description and have Kiro refine them for you.
|
||||
|
||||
Learn about inclusion modes: https://kiro.dev/docs/steering/#inclusion-modes
|
||||
------------------------------------------------------------------------------------->
|
||||
|
||||
This project has a GUI and a TUI when fixing or implmenting features access and make changes to both.
|
||||
@@ -0,0 +1,116 @@
|
||||
@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@ @@@@@@@@ @@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@ @@@@@@@@@@ @@@@@@@@@ @ @@@@@@@@@@
|
||||
@....................@@@ @....................%@@@ @@@...........*@@@ @@@+................@@ @....................@@@ @@......................@@ @@@...................@@ @@@..................@@@ @@.......@@ @@@@...........@@@ @..@@ @@.......@@
|
||||
@@.......................@@ @*......................@@@ @@..................@@@ @@@....................@@@@@@.......................@@ @@......................@@@@ @@%......................@@@ @@.......................@@@ @@.......@@@@ @@..................@@@ @....@@ @@.......@@@@
|
||||
@@.........................@@@ @@#........................@@@ @@......................@@@ @@.......................@@@@@@.........................@@@ @@@......................@@@@@@@.........................@@@@ @.........................%@@@@@@.......@@@@@ @@......................@@@ @=.....@@ @@.......@@@@@
|
||||
@@..........................@@@@@@*.........................@@@@ @@..........................@@@ @@........................@@@@@@..........................@@@@@@@......................@@@@@@..........................@@@@@@@..........................@@@@@@.......@@@@@@@..........................@@@@@@=......@@@ @@@.......@@@@@
|
||||
@@.......@@@@@@@@@@@........@@@@@@*.......@@@@@@@@@@@........@@@@@@.........#@@@@@@@@..........@@@ @@..........@@@@@@@@@@@@@@@@@@@@@.......@@@@@@@@@@@........@@@@@@@.......@@@@@@@@@@@@@@@@@@@@@.......@@@@@@@@@@@@@@@@@@@@@@@@@........@@@@@@@@@@@@@@@@@@@@@@@@@.......@@@@@@..........@@@@@@@@@.........@@@@@=........@@@@@@.......@@@@@
|
||||
@@.......@@@@@@@@@@@@.......@@@@@@#.......@@@@@@@@@@@........@@@@@........@@@@@@@@@@@@@.........@@@@@.........@@@@@@@@@@@@@@@@@@@@@@@.......@@@@@@@@@@@@.......@@@@@@@.......@@@@@@@@@@@@@@@@@@@@@.......@@@@@@@@@@@@@@@@@@@@@@@@@........@@@@@@@@@@@@@@@@@@@@@@@@@.......@@@@@@........@@@@@@@@@@@@@........@@@@=..........@@@@.......@@@@@
|
||||
@@.......@@@@@@@@@@@@.......@@@@@@#.......@@@@@@@@@@@........@@@@@.......@@@@@@@@@@@@@@@@.......@@@@@.......@@@@@@@@@@@@@@@@@@@@@@@@@.......@@@@@@@@@@@@.......@@@@@@@................@@@@@@@@@@@@..................@@@@@@@@@@@@@@#..................@@@@@@@@@@@@@@.......@@@@@........@@@@@@@@@@@@@@@........@@@+............@@.......@@@@@
|
||||
@@.......@.......:..........@@@@@@#.........................@@@@@........@@@@@@@@@@@@@@@@.......*@@@........@@@@@@@@@@@@@@@@@@.@@@@@@..........................@@@@@@@................@@@@@@@@@@@@@.....................@@@@@@@@@@@......................@@@@@@@@@@.......@@@@@.......@@@@@@@@@@@@@@@@@.......@@@+.....................@@@@@
|
||||
@@.........................@@@@@@@#........................:@@@@@........@@@@@@@ @@@@@........@@@........@@@@@@@@ @@@.....@@@@@@.........................@@@@@@@@................@@@@@ @@@@......................@@@@ @@@@@......................@@@ @@@.......@@@@@.......@@@@@@@@ @@@@@.......@@@+.....................@@@@@
|
||||
@@........................@@@@@@@@#.......................@@@@@@@@.......@@@@@@ @@@.......@@@@*.......@@@@@@ @........@@@@@@........................@@@@@@@@@................@@@@@ @@@@@@@....................@@@@ @@@@@@@.....................@@@@@@@.......@@@@@.......@@@@@@ @@@........@@@+.......@.............@@@@@
|
||||
@@......................@@@@@@@@@@#.....................@@@@@@@@@@........@@@@ @@........@@@@@........@@@@ @........@@@@@@.....................@@@@@@@@@@@@.......@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@........@@@@@@@@@@@@@@@@@@@@@@@@........@@@@@@@.......@@@@@........@@@@@ @@.......@@@@*.......@@............@@@@@
|
||||
@@.......@*********@@@@@@@@@@@@@@@#.......@****@........@@@@@@@@@@@........@@@@ @@@........@@@@@@.........@@@@ @@........@@@@@@.......@****%.........@@@@@@@@@@@.......@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@.......@@@@@ @@@@@@@@@@@@@@@@@@@........@@@@@@.......@@@@@@........@@@@ @@.........@@@@*.......@@@@..........@@@@@
|
||||
@@.......@@@@@@@@@@@@@@@@@@@@@@@@@%.......@@@@@@@........@@@@@@@@@@...........@@@@@@..........@@@@@@@@............@@@@@........@@@@@@.......@@@@@@@.........@@@@@@@@@@.......@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@........@@@@@@@@@@@@@@@@@@@@@@@@........@@@@@@@.......@@@@@@@..........@@@@@@...........@@@@@*.......@@@@@@........@@@@@
|
||||
@@.......@@@@@@@@@@@@@@@@@@@@ @@#.......@@@@@@@@........@@@@@@@@@@@........................@@@@@@@@@@@.......................@@@@@@.......@@@@@@@@=........@@@@ @@@......................@@@ @@.........................@@@@@@@..........................@@@@@@@.......@@@@@@@@........................@@@@@@@*.......@@@@@@@@......@@@@@
|
||||
@@.......@@@@@@@@@@@@@@@@@ @@@.......@@@@@@@@@........@@@@@@@@@@@@....................@@@@@@@@@@@@@@-.....................@@@@@@.......@@@@@@@@@@........@@@@ @@@......................@@@@@@........................@@@@@@@@.........................@@@@@@@@.......@@@@@@@@@@.....................@@@@@@@@@.......@@@@@@@@@@....@@@@@
|
||||
@@@......@@@@@@@@@@@@ @@@*......@@@@@@@@@@.........@@@@@@@@@@@@...............-@@@@@@@@@@@@@@@@@@@...................@@@@@@@......@@@@@@@@@@@........@@@@@@@@.....................@@@@@@@.....................@@@@@@@@@@@:.....................@@@@@@@@@@@......@@@@@@@@@@@@@...............@@@@@@@@@@@@@......@@@@@@@@@@@@..@@@@@
|
||||
@@@@@@@.+@@@@@@ @@@@@@@-.@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@#..@@@@@@@@@@@@@@@@ @@@@@@@@@@@@-...........-@@@@@@@@@@@.+@@@@@@@@@@@@@@@@@@@*@@@@@@@@@@#................*@@@@@@@@@@+............@@@@@@@@@@@@@@@@@@@@............%@@@@@@@@@@@@@@@@@@@*.@@@@@@@@@@@@@@@@@@@@:.*@@@@@@@@@@@@@@@@@@@@@@#.@@@@@@@@@@@@@@@@@@@@
|
||||
@@@@@@@@@@@@@ @@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@ @@@@@@@@@@@
|
||||
@@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@@@@@
|
||||
@@@@@@@@@@ @@@@@@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@ @@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@ @@@@@@@@@@@@@@@@@@ @@@@@@@@@ @@@@@
|
||||
|
||||
@@@@@@@@%@@@@@@@@
|
||||
@@@....@@@@.....@@@@@@
|
||||
%@@.....@@@@..........@@@@
|
||||
%@@......@@@@.............@@@%
|
||||
:@@.......@@@@...............@@@-
|
||||
@@@.......@@@@.................@@@
|
||||
@@@........@@@@..................@@@
|
||||
@@@.....@@@@@@@@@@@.................@@+
|
||||
@@@......@@-. .+@@@@:..............@@-
|
||||
@@@.......@@ @@@@.............@@
|
||||
+@@........@@@@@@@@@@@ @@@............@@%
|
||||
-@@.........@@-......@@@@ =@@............@@
|
||||
@@:.........@@.........=@@. @@@...........@@@
|
||||
@@@..........@@..........:@@ .@@...........#@@
|
||||
@@@...........@@...........@@ @@............@@
|
||||
@@@............@@...........@@ @@...........=@@
|
||||
#@@.............@@..........@@@ :@@...........@@@
|
||||
*@@..............@@.........@@@ @@:...........@@=
|
||||
:@@...............@@@@....@@@@: @@@............@@
|
||||
@@:...............@@#@@@@@@+ #@@%............@@*
|
||||
@@@................@@ .@@@@.............@@%
|
||||
@@@.............@@@@@@@@@@@@@@@@@@..............@@@
|
||||
@@@..............@@ @@.-@@@@...................@@@
|
||||
@@@...............@@ @@........................@@@
|
||||
=@@................@@ @@......................@@@.
|
||||
@@.................@@ @@....................@@@#
|
||||
@@@.................@@ @@..................@@@%
|
||||
@@-..................@@ @@..............@@@@@
|
||||
-@@@@@@@@@@@@@@@@@@@@@@@ @@.......*@@@@@@@*
|
||||
+@@@@@@@@@@@@@@@@@@@@@ %@@@@@@@@@@%=
|
||||
|
||||
█████████████████
|
||||
███░░░░████░░░░░██████
|
||||
███░░░░░████░░░░░░░░░░████
|
||||
███░░░░░░████░░░░░░░░░░░░░████
|
||||
▒██░░░░░░░████░░░░░░░░░░░░░░░███▒
|
||||
███░░░░░░░████░░░░░░░░░░░░░░░░░███
|
||||
███░░░░░░░░████░░░░░░░░░░░░░░░░░░███
|
||||
███░░░░░███████████░░░░░░░░░░░░░░░░░██▓
|
||||
███░░░░░░██▒░ ░▓████▒░░░░░░░░░░░░░░██▒
|
||||
███░░░░░░░██ ████░░░░░░░░░░░░░██
|
||||
▓██░░░░░░░░███████████ ███░░░░░░░░░░░░███
|
||||
▒██░░░░░░░░░██▒░░░░░░████ ▓██░░░░░░░░░░░░██
|
||||
██▒░░░░░░░░░██░░░░░░░░░▒██░ ███░░░░░░░░░░░███
|
||||
███░░░░░░░░░░██░░░░░░░░░░▒██ ░██░░░░░░░░░░░▓██
|
||||
███░░░░░░░░░░░██░░░░░░░░░░░██ ██░░░░░░░░░░░░██
|
||||
███░░░░░░░░░░░░██░░░░░░░░░░░██ ██░░░░░░░░░░░▓██
|
||||
███░░░░░░░░░░░░░██░░░░░░░░░░███ ▒██░░░░░░░░░░░███
|
||||
▓██░░░░░░░░░░░░░░██░░░░░░░░░███ ██▒░░░░░░░░░░░██▓
|
||||
▒██░░░░░░░░░░░░░░░████░░░░████▒ ███░░░░░░░░░░░░██
|
||||
██▒░░░░░░░░░░░░░░░█████████▓ ████░░░░░░░░░░░░██▓
|
||||
███░░░░░░░░░░░░░░░░██ ░████░░░░░░░░░░░░░███
|
||||
███░░░░░░░░░░░░░██████████████████░░░░░░░░░░░░░░███
|
||||
███░░░░░░░░░░░░░░██ ██░▒████░░░░░░░░░░░░░░░░░░░███
|
||||
███░░░░░░░░░░░░░░░██ ██░░░░░░░░░░░░░░░░░░░░░░░░███
|
||||
▒██░░░░░░░░░░░░░░░░██ ██░░░░░░░░░░░░░░░░░░░░░░███░
|
||||
██░░░░░░░░░░░░░░░░░██ ██░░░░░░░░░░░░░░░░░░░░████
|
||||
███░░░░░░░░░░░░░░░░░██ ██░░░░░░░░░░░░░░░░░░████
|
||||
██▒░░░░░░░░░░░░░░░░░░██ ██░░░░░░░░░░░░░░█████
|
||||
▒███████████████████████ ██░░░░░░░▓███████▓
|
||||
▓█████████████████████ ████████████▒
|
||||
|
||||
``````` ````````````````````````````````````````´
|
||||
``````` ``````````````````````````````````````````
|
||||
``````´ ´``````````````````````````````````````````
|
||||
``````` ``````````````````````````````````````````´
|
||||
``````` ````````
|
||||
``````` ``````
|
||||
``````` ´`````´
|
||||
``````` ´``````
|
||||
``````` ``````´
|
||||
``````` ´```````
|
||||
``````´````````````````````````` ```````````````````````````````
|
||||
`````````````````````````````````` ´```````````````````````````
|
||||
```````````````````````````````````` ´``````````````````````´
|
||||
`````````````````````````````````````` ```````````````````
|
||||
``````` `````` `````````´
|
||||
``````` `````` ``````````
|
||||
``````` `````` `````````
|
||||
``````` `````` ``````````
|
||||
``````` `````` ``````````
|
||||
``````` `````` ``````````
|
||||
``````` `````` ``````````
|
||||
``````` `````` `````````´
|
||||
``````` `````` `````````
|
||||
``````` `````` ´`````````
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1110
File diff suppressed because it is too large
Load Diff
@@ -4,3 +4,4 @@ pyglet>=1.5.0
|
||||
Pillow>=8.0.0
|
||||
packaging>=21.0
|
||||
customtkinter>=5.0.0
|
||||
rich>=13.0.0
|
||||
+121
-39
@@ -2389,19 +2389,49 @@ class SteamWorkshopGUI:
|
||||
self._safe_update_output(f"\nTotal unique workshop items: {len(unique_ids)}\n")
|
||||
self._safe_update_output("Extracting package names from About.xml files...\n\n")
|
||||
|
||||
# Extract package names from About.xml files
|
||||
# Extract package names from About.xml files and validate
|
||||
results = []
|
||||
failed_mods = []
|
||||
valid_mods = []
|
||||
|
||||
for workshop_id in sorted(unique_ids):
|
||||
package_name = self.get_package_name_from_about_xml(workshop_id)
|
||||
results.append((workshop_id, package_name))
|
||||
package_id, steam_app_id = self.get_package_info_from_about_xml(workshop_id)
|
||||
|
||||
if not self.is_package_id_valid(package_id):
|
||||
failed_mods.append((workshop_id, package_id))
|
||||
else:
|
||||
# Use steamAppId from XML if available, otherwise use workshop_id
|
||||
effective_steam_id = steam_app_id if steam_app_id else workshop_id
|
||||
# Store as (effective_steam_id, package_id, original_workshop_id)
|
||||
valid_mods.append((effective_steam_id, package_id, workshop_id))
|
||||
|
||||
# Check if there are any failed mods
|
||||
if failed_mods:
|
||||
self._safe_update_output("=== PACKAGE ID VALIDATION FAILED ===\n\n")
|
||||
self._safe_update_output("❌ The following mods have issues and cannot be loaded:\n\n")
|
||||
|
||||
for workshop_id, error in failed_mods:
|
||||
self._safe_update_output(f"Workshop ID {workshop_id}: {error}\n")
|
||||
|
||||
self._safe_update_output(f"\n📊 VALIDATION SUMMARY:\n")
|
||||
self._safe_update_output(f"✗ {len(failed_mods)} mods failed validation\n")
|
||||
self._safe_update_output(f"✓ {len(valid_mods)} mods passed validation\n\n")
|
||||
self._safe_update_output("⚠️ The mod pack cannot be loaded until all package ID issues are resolved.\n")
|
||||
self._safe_update_output("This usually means the mods are not properly downloaded or corrupted.\n")
|
||||
self._safe_update_output("Please check your Steam Workshop subscriptions and try redownloading the failed mods.\n\n")
|
||||
return
|
||||
|
||||
# All mods validated successfully
|
||||
results = valid_mods
|
||||
|
||||
# Display results
|
||||
self._safe_update_output("=== PROGRESSION PACK COMPLETE ===\n\n")
|
||||
self._safe_update_output(f"{'Workshop ID':<15} | Package Name\n")
|
||||
self._safe_update_output(f"✅ All {len(results)} mods validated successfully!\n\n")
|
||||
self._safe_update_output(f"{'Steam ID':<15} | Package Name\n")
|
||||
self._safe_update_output("-" * 80 + "\n")
|
||||
|
||||
for workshop_id, package_name in results:
|
||||
self._safe_update_output(f"{workshop_id:<15} | {package_name}\n")
|
||||
for steam_id, package_name, _ in results:
|
||||
self._safe_update_output(f"{steam_id:<15} | {package_name}\n")
|
||||
|
||||
self._safe_update_output(f"\nTotal mods processed: {len(results)}\n")
|
||||
|
||||
@@ -2444,11 +2474,40 @@ class SteamWorkshopGUI:
|
||||
self._safe_update_output(f"\nTotal unique workshop items: {len(unique_workshop_ids)}\n")
|
||||
self._safe_update_output("Extracting package names from About.xml files...\n\n")
|
||||
|
||||
# Extract package names from About.xml files for workshop mods
|
||||
# Extract package names from About.xml files for workshop mods and validate
|
||||
workshop_results = []
|
||||
failed_mods = []
|
||||
valid_mods = []
|
||||
|
||||
for workshop_id in sorted(unique_workshop_ids):
|
||||
package_name = self.get_package_name_from_about_xml(workshop_id)
|
||||
workshop_results.append((workshop_id, package_name))
|
||||
package_id, steam_app_id = self.get_package_info_from_about_xml(workshop_id)
|
||||
|
||||
if not self.is_package_id_valid(package_id):
|
||||
failed_mods.append((workshop_id, package_id))
|
||||
else:
|
||||
# Use steamAppId from XML if available, otherwise use workshop_id
|
||||
effective_steam_id = steam_app_id if steam_app_id else workshop_id
|
||||
# Store as (effective_steam_id, package_id, original_workshop_id)
|
||||
valid_mods.append((effective_steam_id, package_id, workshop_id))
|
||||
|
||||
# Check if there are any failed mods
|
||||
if failed_mods:
|
||||
self._safe_update_output("=== PACKAGE ID VALIDATION FAILED ===\n\n")
|
||||
self._safe_update_output("❌ The following mods have issues and cannot be merged:\n\n")
|
||||
|
||||
for workshop_id, error in failed_mods:
|
||||
self._safe_update_output(f"Workshop ID {workshop_id}: {error}\n")
|
||||
|
||||
self._safe_update_output(f"\n📊 VALIDATION SUMMARY:\n")
|
||||
self._safe_update_output(f"✗ {len(failed_mods)} mods failed validation\n")
|
||||
self._safe_update_output(f"✓ {len(valid_mods)} mods passed validation\n\n")
|
||||
self._safe_update_output("⚠️ The mod merge cannot be completed until all package ID issues are resolved.\n")
|
||||
self._safe_update_output("This usually means the mods are not properly downloaded or corrupted.\n")
|
||||
self._safe_update_output("Please check your Steam Workshop subscriptions and try redownloading the failed mods.\n\n")
|
||||
return
|
||||
|
||||
# All mods validated successfully
|
||||
workshop_results = valid_mods
|
||||
|
||||
# Step 3: Remove duplicates and merge the mod lists
|
||||
self._safe_update_output("=== MERGING CURRENT MODS WITH PROGRESSION PACK ===\n\n")
|
||||
@@ -2461,8 +2520,8 @@ class SteamWorkshopGUI:
|
||||
|
||||
self._safe_update_output(f"\nWorkshop Mods from Collections:\n")
|
||||
self._safe_update_output("-" * 50 + "\n")
|
||||
for workshop_id, package_name in workshop_results:
|
||||
self._safe_update_output(f"{workshop_id:<15} | {package_name}\n")
|
||||
for steam_id, package_name, _ in workshop_results:
|
||||
self._safe_update_output(f"{steam_id:<15} | {package_name}\n")
|
||||
|
||||
# Step 4: Remove duplicates based on package ID and workshop ID
|
||||
current_package_ids = {package_id for package_id, _ in current_mods}
|
||||
@@ -2471,15 +2530,15 @@ class SteamWorkshopGUI:
|
||||
filtered_workshop_results = []
|
||||
duplicates_found = []
|
||||
|
||||
for workshop_id, package_id in workshop_results:
|
||||
for steam_id, package_id, original_workshop_id in workshop_results:
|
||||
# Check for duplicate package ID
|
||||
if package_id in current_package_ids:
|
||||
duplicates_found.append((workshop_id, package_id, "Package ID already exists"))
|
||||
duplicates_found.append((steam_id, package_id, "Package ID already exists"))
|
||||
# Check for duplicate workshop ID (user might have same mod in current list)
|
||||
elif workshop_id in current_workshop_ids:
|
||||
duplicates_found.append((workshop_id, package_id, "Workshop ID already exists"))
|
||||
elif steam_id in current_workshop_ids:
|
||||
duplicates_found.append((steam_id, package_id, "Steam ID already exists"))
|
||||
else:
|
||||
filtered_workshop_results.append((workshop_id, package_id))
|
||||
filtered_workshop_results.append((steam_id, package_id, original_workshop_id))
|
||||
|
||||
# Report duplicates
|
||||
if duplicates_found:
|
||||
@@ -2600,7 +2659,7 @@ class SteamWorkshopGUI:
|
||||
xml_lines.append(f'\t\t\t<li>{package_id}</li>')
|
||||
|
||||
# Add workshop mod package IDs to meta section
|
||||
for workshop_id, package_id in workshop_results:
|
||||
for steam_id, package_id, original_workshop_id in workshop_results:
|
||||
xml_lines.append(f'\t\t\t<li>{package_id}</li>')
|
||||
|
||||
xml_lines.extend([
|
||||
@@ -2616,8 +2675,8 @@ class SteamWorkshopGUI:
|
||||
xml_lines.append(f'\t\t\t<li>0</li>')
|
||||
|
||||
# Add workshop IDs to meta section
|
||||
for workshop_id, package_id in workshop_results:
|
||||
xml_lines.append(f'\t\t\t<li>{workshop_id}</li>')
|
||||
for steam_id, package_id, original_workshop_id in workshop_results:
|
||||
xml_lines.append(f'\t\t\t<li>{steam_id}</li>')
|
||||
|
||||
xml_lines.extend([
|
||||
'\t\t</modSteamIds>',
|
||||
@@ -2630,8 +2689,8 @@ class SteamWorkshopGUI:
|
||||
xml_lines.append(f'\t\t\t<li>{escaped_name}</li>')
|
||||
|
||||
# Add workshop mod names to meta section
|
||||
for workshop_id, package_id in workshop_results:
|
||||
mod_name = self.get_mod_name_from_about_xml(workshop_id)
|
||||
for steam_id, package_id, original_workshop_id in workshop_results:
|
||||
mod_name = self.get_mod_name_from_about_xml(original_workshop_id)
|
||||
escaped_name = self.escape_xml_text(mod_name)
|
||||
xml_lines.append(f'\t\t\t<li>{escaped_name}</li>')
|
||||
|
||||
@@ -2647,7 +2706,7 @@ class SteamWorkshopGUI:
|
||||
xml_lines.append(f'\t\t\t<li>{package_id}</li>')
|
||||
|
||||
# Add workshop mod package IDs to modList section
|
||||
for workshop_id, package_id in workshop_results:
|
||||
for steam_id, package_id, original_workshop_id in workshop_results:
|
||||
xml_lines.append(f'\t\t\t<li>{package_id}</li>')
|
||||
|
||||
xml_lines.extend([
|
||||
@@ -2661,8 +2720,8 @@ class SteamWorkshopGUI:
|
||||
xml_lines.append(f'\t\t\t<li>{escaped_name}</li>')
|
||||
|
||||
# Add workshop mod names to modList section
|
||||
for workshop_id, package_id in workshop_results:
|
||||
mod_name = self.get_mod_name_from_about_xml(workshop_id)
|
||||
for steam_id, package_id, original_workshop_id in workshop_results:
|
||||
mod_name = self.get_mod_name_from_about_xml(original_workshop_id)
|
||||
escaped_name = self.escape_xml_text(mod_name)
|
||||
xml_lines.append(f'\t\t\t<li>{escaped_name}</li>')
|
||||
|
||||
@@ -2713,8 +2772,8 @@ class SteamWorkshopGUI:
|
||||
|
||||
# Extract mod names from About.xml files for workshop mods
|
||||
mod_names = []
|
||||
for workshop_id, package_id in mod_data:
|
||||
mod_name = self.get_mod_name_from_about_xml(workshop_id)
|
||||
for steam_id, package_id, original_workshop_id in mod_data:
|
||||
mod_name = self.get_mod_name_from_about_xml(original_workshop_id)
|
||||
mod_names.append(mod_name)
|
||||
|
||||
xml_lines = [
|
||||
@@ -2736,7 +2795,7 @@ class SteamWorkshopGUI:
|
||||
print(msg.strip())
|
||||
|
||||
# Add workshop mod package IDs to meta section
|
||||
for workshop_id, package_id in mod_data:
|
||||
for steam_id, package_id, original_workshop_id in mod_data:
|
||||
xml_lines.append(f'\t\t\t<li>{package_id}</li>')
|
||||
|
||||
xml_lines.extend([
|
||||
@@ -2749,8 +2808,8 @@ class SteamWorkshopGUI:
|
||||
xml_lines.append(f'\t\t\t<li>0</li>')
|
||||
|
||||
# Add workshop IDs to meta section
|
||||
for workshop_id, package_id in mod_data:
|
||||
xml_lines.append(f'\t\t\t<li>{workshop_id}</li>')
|
||||
for steam_id, package_id, original_workshop_id in mod_data:
|
||||
xml_lines.append(f'\t\t\t<li>{steam_id}</li>')
|
||||
|
||||
xml_lines.extend([
|
||||
'\t\t</modSteamIds>',
|
||||
@@ -2779,7 +2838,7 @@ class SteamWorkshopGUI:
|
||||
xml_lines.append(f'\t\t\t<li>{package_id}</li>')
|
||||
|
||||
# Add workshop mod package IDs to modList section
|
||||
for workshop_id, package_id in mod_data:
|
||||
for steam_id, package_id, original_workshop_id in mod_data:
|
||||
xml_lines.append(f'\t\t\t<li>{package_id}</li>')
|
||||
|
||||
xml_lines.extend([
|
||||
@@ -2982,13 +3041,23 @@ class SteamWorkshopGUI:
|
||||
except Exception as e:
|
||||
return f"Workshop ID {workshop_id}"
|
||||
|
||||
def get_package_name_from_about_xml(self, workshop_id):
|
||||
"""Extract package name from About/About.xml file"""
|
||||
def is_package_id_valid(self, package_id):
|
||||
"""Check if a package ID is valid (not an error condition)"""
|
||||
error_conditions = [
|
||||
"About.xml not found",
|
||||
"packageId not found",
|
||||
"XML parse error",
|
||||
"Workshop path not found"
|
||||
]
|
||||
return package_id not in error_conditions and not package_id.startswith("Error:")
|
||||
|
||||
def get_package_info_from_about_xml(self, workshop_id):
|
||||
"""Extract package name and steam app ID from About/About.xml file"""
|
||||
try:
|
||||
about_xml_path = os.path.join(self.workshop_folder, workshop_id, "About", "About.xml")
|
||||
|
||||
if not os.path.exists(about_xml_path):
|
||||
return "About.xml not found"
|
||||
return "About.xml not found", None
|
||||
|
||||
# Parse the XML file
|
||||
tree = ET.parse(about_xml_path)
|
||||
@@ -2996,15 +3065,28 @@ class SteamWorkshopGUI:
|
||||
|
||||
# Look for packageId element
|
||||
package_id_element = root.find('packageId')
|
||||
if package_id_element is not None and package_id_element.text:
|
||||
return package_id_element.text.strip()
|
||||
else:
|
||||
return "packageId not found"
|
||||
if package_id_element is None or not package_id_element.text:
|
||||
return "packageId not found", None
|
||||
|
||||
# Look for steamAppId element
|
||||
steam_app_id_element = root.find('steamAppId')
|
||||
steam_app_id = None
|
||||
if steam_app_id_element is not None and steam_app_id_element.text:
|
||||
steam_app_id = steam_app_id_element.text.strip()
|
||||
|
||||
# Return package ID in lowercase for consistency
|
||||
package_id = package_id_element.text.strip().lower()
|
||||
return package_id, steam_app_id
|
||||
|
||||
except ET.ParseError:
|
||||
return "XML parse error"
|
||||
return "XML parse error", None
|
||||
except Exception as e:
|
||||
return f"Error: {str(e)}"
|
||||
return f"Error: {str(e)}", None
|
||||
|
||||
def get_package_name_from_about_xml(self, workshop_id):
|
||||
"""Extract package name from About/About.xml file (backward compatibility)"""
|
||||
package_id, _ = self.get_package_info_from_about_xml(workshop_id)
|
||||
return package_id
|
||||
|
||||
def _safe_update_output(self, text):
|
||||
"""Safely update output text without recursion"""
|
||||
|
||||
Reference in New Issue
Block a user