dict


Logs | Files | README | LICENSE | GitLab


1
commit 8a23a97bcaeddea30150b113c39af0d690331ec5
2
Author: Connor Etherington <[email protected]>
3
Date:   Sun Jan 28 01:52:12 2024 +0200
4
5
    Auto-Commit Update - 20240128
6
---
7
 usr/bin/dict                      | 10 +++++++++-
8
 usr/lib/node_modules/dict/dict.js |  2 +-
9
 2 files changed, 10 insertions(+), 2 deletions(-)
10
11
diff --git a/usr/bin/dict b/usr/bin/dict
12
index 9207c2f..5397c16 100755
13
--- a/usr/bin/dict
14
+++ b/usr/bin/dict
15
@@ -1,2 +1,10 @@
16
 #!/usr/bin/env node
17
-require('/usr/lib/node_modules/dict');
18
+
19
+const { search, printBoxedText } = require('/usr/lib/node_modules/dict');
20
+
21
+if (require.main === module) {
22
+  search(process.argv[2], process.argv[3] || 1).then(res => {
23
+    printBoxedText(res);
24
+  });
25
+}
26
+
27
diff --git a/usr/lib/node_modules/dict/dict.js b/usr/lib/node_modules/dict/dict.js
28
index 0940008..3e7fa1d 100755
29
--- a/usr/lib/node_modules/dict/dict.js
30
+++ b/usr/lib/node_modules/dict/dict.js
31
@@ -82,4 +82,4 @@ if (require.main === module) {
32
   });
33
 }
34
 
35
-module.exports = search;
36
+module.exports = { search, printBoxedText };