# steam-shame.j - the games you play, and the pile of shame you bought.# STEAM_API_KEY=PLACEHOLDER-STEAM-KEY ./run-offline.sh jennifer run steam-shame.juse io;
import"@skiffyard/steam/"as steam;
def c assteam.Client initsteam.clientFromEnv();
def me asstringinitsteam.resolveAccount($c, "jen");
def games aslistofsteam.OwnedGame initsteam.ownedGames($c, $me, true, false);
io.printf("%s owns %d games, %f|prec=1 hours in total\n", steam.toSteamId2($me),
len($games), steam.playtimeHours(steam.totalPlaytime($games)));
for (def g insteam.mostPlayed($games, 2)) {
io.printf(" played: %s|pad=28 %f|prec=1 h\n", $g.name,
steam.playtimeHours($g.playtimeForever));
}
for (def g insteam.unplayed($games)) {
io.printf(" never started: %s\n", $g.name);
}
def d assteam.AppDetails initsteam.appDetails($c, steam.unplayed($games)[0].appId);
io.printf("%s: %s (%s)\n", $d.name, $d.shortDescription, $d.releaseDate);