This commit is contained in:
+2
-2
@@ -1,7 +1,7 @@
|
||||
import * as fs from "fs/promises";
|
||||
import { parseString } from "xml2js";
|
||||
|
||||
export function generateTrimlogInput(filename, name = "Walk") {
|
||||
export function generateTrimlogInput(filename, name = "Walk", type = "walk") {
|
||||
return new Promise(async(resolve, reject) => {
|
||||
parseString(await fs.readFile(filename, "utf-8"), (err, res) => {
|
||||
if (err != null) {
|
||||
@@ -45,7 +45,7 @@ export function generateTrimlogInput(filename, name = "Walk") {
|
||||
const out = {
|
||||
date: dateStr,
|
||||
contents: [{rawActivity: {
|
||||
kind: "Walking",
|
||||
kind: type === "cycling" ? "Biking" : "Walking",
|
||||
sets: [],
|
||||
effortScale: 1,
|
||||
weight: 0,
|
||||
|
||||
Reference in New Issue
Block a user