Browse Source

do not submit non-supported activities.

meyn 0.1.1
Gisle Aune 11 months ago
parent
commit
1bd6e0c905
  1. 7
      index.mjs

7
index.mjs

@ -30,6 +30,11 @@ async function main() {
continue; 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)) { if (!act.startTimeLocal.startsWith(todayDate)) {
console.error("Skipping", act.activityId, "(not today)"); console.error("Skipping", act.activityId, "(not today)");
blackList[id] = true; blackList[id] = true;
@ -46,6 +51,8 @@ async function main() {
continue; continue;
} }
console.log("Going ahead with", act.activityId, act.activityType.typeKey)
await garmin.downloadOriginalActivityData(act, "/tmp/", "tcx") await garmin.downloadOriginalActivityData(act, "/tmp/", "tcx")
const input = await generateTrimlogInput(`/tmp/${act.activityId}.tcx`, act.activityName) const input = await generateTrimlogInput(`/tmp/${act.activityId}.tcx`, act.activityName)

Loading…
Cancel
Save