csvglow 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/csvglow.js +37 -0
- package/package.json +14 -0
package/bin/csvglow.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { execFileSync, execSync } = require("child_process");
|
|
4
|
+
const args = process.argv.slice(2);
|
|
5
|
+
|
|
6
|
+
function tryRun(cmd, cmdArgs) {
|
|
7
|
+
try {
|
|
8
|
+
execFileSync(cmd, cmdArgs, { stdio: "inherit" });
|
|
9
|
+
return true;
|
|
10
|
+
} catch {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Try running csvglow directly
|
|
16
|
+
if (tryRun("csvglow", args)) {
|
|
17
|
+
process.exit(0);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Not found — try pip install (with mcp dependency included)
|
|
21
|
+
console.log("csvglow not found. Installing via pip...");
|
|
22
|
+
try {
|
|
23
|
+
execSync("pip install csvglow", { stdio: "inherit" });
|
|
24
|
+
} catch {
|
|
25
|
+
try {
|
|
26
|
+
execSync("pip3 install csvglow", { stdio: "inherit" });
|
|
27
|
+
} catch {
|
|
28
|
+
console.error("Failed to install csvglow. Please install Python 3.9+ and pip.");
|
|
29
|
+
process.exit(1);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Retry
|
|
34
|
+
if (!tryRun("csvglow", args)) {
|
|
35
|
+
console.error("csvglow installed but could not be found on PATH.");
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "csvglow",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Generate beautiful HTML dashboards from CSV/Excel files",
|
|
5
|
+
"bin": {
|
|
6
|
+
"csvglow": "./bin/csvglow.js"
|
|
7
|
+
},
|
|
8
|
+
"keywords": ["csv", "dashboard", "visualization", "echarts", "excel", "mcp"],
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/ratnaditya-j/csvglow"
|
|
13
|
+
}
|
|
14
|
+
}
|