Browse Source

do not submit non-supported activities.

meyn 0.1.1
Gisle Aune 12 months ago
parent
commit
1bd6e0c905
  1. 9
      index.mjs

9
index.mjs

@ -29,7 +29,12 @@ async function main() {
if (blackList[id]) {
continue;
}
if (!["walking", "cycling"].includes(act.activityType?.typeKey)) {
console.error("Skipping", act.activityId, `(${act.activityType?.typeKey} activity not supported)`);
blackList[id] = true;
continue;
}
if (!act.startTimeLocal.startsWith(todayDate)) {
console.error("Skipping", act.activityId, "(not today)");
blackList[id] = true;
@ -45,6 +50,8 @@ async function main() {
blackList[id] = true;
continue;
}
console.log("Going ahead with", act.activityId, act.activityType.typeKey)
await garmin.downloadOriginalActivityData(act, "/tmp/", "tcx")
const input = await generateTrimlogInput(`/tmp/${act.activityId}.tcx`, act.activityName)

Loading…
Cancel
Save