const db = require("../lib/db") const yargs = require("yargs") ///////////////////////////////////////////////////////////////////////// const argv = yargs .usage("$0 ", "get kurs learning progress using ",) .option("raw", { describe: "print raw learning progress of the sub-objects", type: "boolean", default: false, }) .strict() .parse() run(argv) .then(console.log) .catch(console.error) .finally(process.exit) async function run({ref_id, raw}) { const {obj_id} = await db.getObjIdFromRefId(ref_id) return await db.getKursLp(obj_id, raw) }