aboutsummaryrefslogtreecommitdiffstats
path: root/onhold/pygame/profiledb.py
diff options
context:
space:
mode:
authorvg <vgm+dev@devys.org>2026-11-22 00:38:36 +0100
committervg <vgm+dev@devys.org>2026-11-22 00:38:36 +0100
commitda9c43e9bbc679db214e049676c6b29dfb78654b (patch)
treeabbcacebff30ba207841adfa49d172efaf7a345a /onhold/pygame/profiledb.py
parentfacb0c19cd5a8742eefdbca71d72450a7a040904 (diff)
downloadgamechest-da9c43e9bbc679db214e049676c6b29dfb78654b.tar.gz
gamechest-da9c43e9bbc679db214e049676c6b29dfb78654b.tar.bz2
gamechest-da9c43e9bbc679db214e049676c6b29dfb78654b.zip
git-sync on ditawip
Diffstat (limited to 'onhold/pygame/profiledb.py')
-rw-r--r--onhold/pygame/profiledb.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/onhold/pygame/profiledb.py b/onhold/pygame/profiledb.py
new file mode 100644
index 0000000..190d401
--- /dev/null
+++ b/onhold/pygame/profiledb.py
@@ -0,0 +1,14 @@
+from pathlib import Path
+
+import yaml
+
+
+class ProfileDB:
+
+ def __init__(self):
+ with Path('~/games/.saves/profiles.yaml').expanduser().open() as fp:
+ self.profiledb = yaml.safe_load(fp)
+
+ def get_profiles(self):
+ # currently contains {name, display}
+ return self.profiledb['profiles']