Repository: aome510/spotify-player (language: rust)

Issue:
theme_parse script no longer works
**Describe the bug**
The iterm2-Color-Scheme repository is using toml rather than yml for themes now. So the script is broken. 

**Environment**
- OS: MacOS
- Application version: Python 3.12.5




Discussion / hints:

Fix patch:
diff --git a/docs/config.md b/docs/config.md
index b85024fe..4bf2e58b 100644
--- a/docs/config.md
+++ b/docs/config.md
@@ -171,7 +171,7 @@ A theme has three main components: `name` (the theme's name), `palette` (the the
 
 ### Use script to add theme
 
-[a `theme_parse` python script](../scripts/theme_parse) (require `pyaml` and `requests` libraries) can be used to parse [Iterm2 alacritty's color schemes](https://github.com/mbadolato/iTerm2-Color-Schemes/tree/master/alacritty) into a `spotify_player` compatible theme format.
+[a `theme_parse` python script](../scripts/theme_parse) (require `toml` and `requests` libraries) can be used to parse [Iterm2 alacritty's color schemes](https://github.com/mbadolato/iTerm2-Color-Schemes/tree/master/alacritty) into a `spotify_player` compatible theme format.
 
 For example, you can run
 
diff --git a/scripts/theme_parse b/scripts/theme_parse
index cd70537e..70e56f19 100755
--- a/scripts/theme_parse
+++ b/scripts/theme_parse
@@ -2,7 +2,7 @@
 
 import sys
 import requests
-import yaml
+import toml
 
 if len(sys.argv) > 1:
     name = sys.argv[1]
@@ -15,7 +15,7 @@ else:
     print("Usage: theme_parse `theme_name` `theme_saved_name`", file=sys.stderr)
     exit(1)
 
-url = f"https://raw.githubusercontent.com/mbadolato/iTerm2-Color-Schemes/master/alacritty/{name}.yml"
+url = f"https://raw.githubusercontent.com/mbadolato/iTerm2-Color-Schemes/master/alacritty/{name}.toml"
 
 req = requests.get(url)
 
@@ -25,7 +25,7 @@ if req.status_code != 200:
     )
     exit(1)
 
-data = yaml.safe_load(req.content)
+data = toml.loads(req.text)
 
 print(
     f"""[[themes]]


Test patch: