From da9c43e9bbc679db214e049676c6b29dfb78654b Mon Sep 17 00:00:00 2001 From: vg Date: Sun, 22 Nov 2026 00:38:36 +0100 Subject: git-sync on dita --- onhold/pygame/profiledb.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 onhold/pygame/profiledb.py (limited to 'onhold/pygame/profiledb.py') 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'] -- cgit v1.2.3