vidclaude 0.2.1 → 0.2.2
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/setup.js +44 -45
- package/bin/vidclaude.js +27 -27
- package/package.json +1 -1
package/bin/setup.js
CHANGED
|
@@ -1,45 +1,44 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const { execSync } = require("child_process");
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
console.log("
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { execSync } = require("child_process");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
|
|
6
|
+
const reqPath = path.join(__dirname, "..", "requirements.txt");
|
|
7
|
+
|
|
8
|
+
console.log("vidclaude: Installing Python dependencies...");
|
|
9
|
+
|
|
10
|
+
// Check Python exists
|
|
11
|
+
try {
|
|
12
|
+
execSync("python --version", { stdio: "pipe" });
|
|
13
|
+
} catch {
|
|
14
|
+
console.warn(
|
|
15
|
+
"\nPython not found. You need Python 3.10+ to use vidclaude.\n" +
|
|
16
|
+
" Install from: https://python.org\n" +
|
|
17
|
+
" Then run: pip install -r requirements.txt\n"
|
|
18
|
+
);
|
|
19
|
+
process.exit(0); // Don't fail npm install
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Check ffmpeg exists
|
|
23
|
+
try {
|
|
24
|
+
execSync("ffmpeg -version", { stdio: "pipe" });
|
|
25
|
+
} catch {
|
|
26
|
+
console.warn(
|
|
27
|
+
"\nffmpeg not found. You need ffmpeg to use vidclaude.\n" +
|
|
28
|
+
" Windows: winget install ffmpeg\n" +
|
|
29
|
+
" macOS: brew install ffmpeg\n" +
|
|
30
|
+
" Linux: sudo apt install ffmpeg\n"
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Install Python deps
|
|
35
|
+
try {
|
|
36
|
+
execSync(`pip install -r "${reqPath}"`, { stdio: "inherit" });
|
|
37
|
+
console.log("\nvidclaude: Setup complete!");
|
|
38
|
+
console.log(" Run: npx vidclaude video.mp4 --extract --mode standard --verbose\n");
|
|
39
|
+
} catch {
|
|
40
|
+
console.warn(
|
|
41
|
+
"\nFailed to install Python dependencies.\n" +
|
|
42
|
+
" Try manually: pip install -r requirements.txt\n"
|
|
43
|
+
);
|
|
44
|
+
}
|
package/bin/vidclaude.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const { spawn } = require("child_process");
|
|
4
|
-
const path = require("path");
|
|
5
|
-
|
|
6
|
-
const scriptPath = path.join(__dirname, "..", "video_understand.py");
|
|
7
|
-
const args = process.argv.slice(2);
|
|
8
|
-
|
|
9
|
-
// Pass all arguments through to the Python script
|
|
10
|
-
const proc = spawn("python", [scriptPath, ...args], {
|
|
11
|
-
stdio: "inherit",
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
proc.on("error", (err) => {
|
|
15
|
-
if (err.code === "ENOENT") {
|
|
16
|
-
console.error(
|
|
17
|
-
"Error: Python not found. Install Python 3.10+ from https://python.org"
|
|
18
|
-
);
|
|
19
|
-
process.exit(1);
|
|
20
|
-
}
|
|
21
|
-
console.error(`Error: ${err.message}`);
|
|
22
|
-
process.exit(1);
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
proc.on("close", (code) => {
|
|
26
|
-
process.exit(code || 0);
|
|
27
|
-
});
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { spawn } = require("child_process");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
|
|
6
|
+
const scriptPath = path.join(__dirname, "..", "video_understand.py");
|
|
7
|
+
const args = process.argv.slice(2);
|
|
8
|
+
|
|
9
|
+
// Pass all arguments through to the Python script
|
|
10
|
+
const proc = spawn("python", [scriptPath, ...args], {
|
|
11
|
+
stdio: "inherit",
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
proc.on("error", (err) => {
|
|
15
|
+
if (err.code === "ENOENT") {
|
|
16
|
+
console.error(
|
|
17
|
+
"Error: Python not found. Install Python 3.10+ from https://python.org"
|
|
18
|
+
);
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
console.error(`Error: ${err.message}`);
|
|
22
|
+
process.exit(1);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
proc.on("close", (code) => {
|
|
26
|
+
process.exit(code || 0);
|
|
27
|
+
});
|
package/package.json
CHANGED