diff options
| author | vg <vgm+dev@devys.org> | 2026-11-22 00:38:36 +0100 |
|---|---|---|
| committer | vg <vgm+dev@devys.org> | 2026-11-22 00:38:36 +0100 |
| commit | da9c43e9bbc679db214e049676c6b29dfb78654b (patch) | |
| tree | abbcacebff30ba207841adfa49d172efaf7a345a /onhold/pygame/profiledb.py | |
| parent | facb0c19cd5a8742eefdbca71d72450a7a040904 (diff) | |
| download | gamechest-wip.tar.gz gamechest-wip.tar.bz2 gamechest-wip.zip | |
git-sync on ditawip
Diffstat (limited to 'onhold/pygame/profiledb.py')
| -rw-r--r-- | onhold/pygame/profiledb.py | 14 |
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'] |
