@spark-apps/quickpeek 1.0.0 → 1.0.1
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/README.md +101 -0
- package/package.json +3 -2
package/README.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# QuickPeek Core
|
|
4
|
+
|
|
5
|
+
**Core library for QuickPeek - AI-powered demo video generation**
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@spark-apps/quickpeek)
|
|
8
|
+
[](../../LICENSE)
|
|
9
|
+
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @spark-apps/quickpeek
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Overview
|
|
21
|
+
|
|
22
|
+
This is the core library used by [`@spark-apps/quickpeek-cli`](https://www.npmjs.com/package/@spark-apps/quickpeek-cli). It provides:
|
|
23
|
+
|
|
24
|
+
- **API Client** - Communication with QuickPeek backend for AI planning
|
|
25
|
+
- **TTS Engine** - Text-to-speech via Edge TTS (60+ languages)
|
|
26
|
+
- **FFmpeg Wrapper** - Video composition, watermarks, effects
|
|
27
|
+
- **Prompt Builder** - System and user prompts for AI planning
|
|
28
|
+
- **Web Crawler** - Page analysis for demo planning
|
|
29
|
+
- **Utilities** - Caption styling, ASS subtitle generation, config management
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
import {
|
|
35
|
+
callAI,
|
|
36
|
+
generateVoiceover,
|
|
37
|
+
composeVideo,
|
|
38
|
+
crawlPage,
|
|
39
|
+
buildSystemPrompt,
|
|
40
|
+
buildUserPrompt,
|
|
41
|
+
DEFAULT_CONFIG,
|
|
42
|
+
VERSION,
|
|
43
|
+
} from '@spark-apps/quickpeek';
|
|
44
|
+
|
|
45
|
+
// Crawl a page for interactive elements
|
|
46
|
+
const { title, elements } = await crawlPage('https://example.com');
|
|
47
|
+
|
|
48
|
+
// Generate AI demo plan
|
|
49
|
+
const systemPrompt = buildSystemPrompt(8);
|
|
50
|
+
const userPrompt = buildUserPrompt(url, title, elements, 'English', 'A todo app', 8);
|
|
51
|
+
const result = await callAI(systemPrompt, userPrompt, 'user@email.com');
|
|
52
|
+
|
|
53
|
+
// Generate voiceover
|
|
54
|
+
const { voiceoverPath, stepAudio } = await generateVoiceover(
|
|
55
|
+
steps,
|
|
56
|
+
config,
|
|
57
|
+
workDir,
|
|
58
|
+
outputDir,
|
|
59
|
+
logError,
|
|
60
|
+
task,
|
|
61
|
+
info
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
// Compose final video
|
|
65
|
+
await composeVideo({
|
|
66
|
+
videoPath,
|
|
67
|
+
assPath,
|
|
68
|
+
outputPath,
|
|
69
|
+
voiceoverPath,
|
|
70
|
+
musicPath,
|
|
71
|
+
// ... options
|
|
72
|
+
});
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Exports
|
|
76
|
+
|
|
77
|
+
| Module | Description |
|
|
78
|
+
|--------|-------------|
|
|
79
|
+
| `api-client` | Backend API communication |
|
|
80
|
+
| `tts` | Text-to-speech generation |
|
|
81
|
+
| `ffmpeg` | Video composition |
|
|
82
|
+
| `prompts` | AI prompt templates |
|
|
83
|
+
| `crawl` | Web page analysis |
|
|
84
|
+
| `config` | Default configuration |
|
|
85
|
+
| `utils` | ASS subtitles, color conversion |
|
|
86
|
+
| `voices` | Voice mappings for 60+ languages |
|
|
87
|
+
| `styles` | Caption styling |
|
|
88
|
+
| `cursor` | Custom cursor CSS/JS |
|
|
89
|
+
| `watermark` | Watermark generation |
|
|
90
|
+
|
|
91
|
+
## Related Packages
|
|
92
|
+
|
|
93
|
+
- [`@spark-apps/quickpeek-cli`](https://www.npmjs.com/package/@spark-apps/quickpeek-cli) - CLI tool
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
<div align="center">
|
|
98
|
+
|
|
99
|
+
MIT License - Made with ☕ by [Spark Apps](https://github.com/muammar-yacoob)
|
|
100
|
+
|
|
101
|
+
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spark-apps/quickpeek",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Core library for QuickPeek - AI-powered demo video generation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
|
-
"dist"
|
|
15
|
+
"dist",
|
|
16
|
+
"README.md"
|
|
16
17
|
],
|
|
17
18
|
"scripts": {
|
|
18
19
|
"build": "tsc",
|