From 0316b8949b75f68a3d3f3e88f3b8512a913f9190 Mon Sep 17 00:00:00 2001
From: alex <alex@alexloehr.net>
Date: Mon, 02 Jun 2025 13:32:38 +0000
Subject: [PATCH] adding cli prog getRefId.js
---
bin/getRefId.js | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/bin/getRefId.js b/bin/getRefId.js
new file mode 100644
index 0000000..7be6744
--- /dev/null
+++ b/bin/getRefId.js
@@ -0,0 +1,21 @@
+const db = require("../lib/db")
+const yargs = require("yargs")
+
+/////////////////////////////////////////////////////////////////////////
+
+const argv = yargs
+ .usage("$0 <obj_id>", "get ref_id using <obj_id>",)
+ .strict()
+ .parse()
+
+console.log(`argv.obj_id=${argv.obj_id}`)
+
+run(argv)
+ .then(console.log)
+ .catch(console.error)
+ .finally(process.exit)
+
+async function run({obj_id}) {
+ return await db.getRefIdFromObjId(obj_id)
+}
+
--
Gitblit v1.8.0