Skip to content

Commit b42373c

Browse files
✨ Add CLI command for summary
1 parent fbc3685 commit b42373c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/cli.ts

+12
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ const cli = async () => {
2828
}
2929
}
3030
);
31+
} else if (command === "summary") {
32+
const integration = process.argv[3];
33+
if (!integration) throw new Error("Provide an integration");
34+
35+
[Spotify, Rescuetime, LastFm, PocketCasts, Wakatime, Clockify, GoogleFit, OuraRing, Goodreads, Twitter].forEach(
36+
(ClassName) => {
37+
const integrationObject = new ClassName();
38+
if (integration === integrationObject.name) {
39+
integrationObject.summary();
40+
}
41+
}
42+
);
3143
} else {
3244
throw new Error(`CLI command '${command}' not recognized`);
3345
}

0 commit comments

Comments
 (0)