recap-cli 1.0.0__tar.gz
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.
- recap_cli-1.0.0/MANIFEST.in +11 -0
- recap_cli-1.0.0/PKG-INFO +415 -0
- recap_cli-1.0.0/README.md +394 -0
- recap_cli-1.0.0/pyproject.toml +62 -0
- recap_cli-1.0.0/recap_cli/__init__.py +2 -0
- recap_cli-1.0.0/recap_cli/api_client.py +297 -0
- recap_cli-1.0.0/recap_cli/auth.py +224 -0
- recap_cli-1.0.0/recap_cli/commands/__init__.py +4 -0
- recap_cli-1.0.0/recap_cli/commands/auth_commands.py +110 -0
- recap_cli-1.0.0/recap_cli/commands/recap_commands.py +260 -0
- recap_cli-1.0.0/recap_cli/config.py +14 -0
- recap_cli-1.0.0/recap_cli/main.py +33 -0
- recap_cli-1.0.0/recap_cli/recap_runner.py +294 -0
- recap_cli-1.0.0/recap_cli/ui.py +60 -0
- recap_cli-1.0.0/recap_cli.egg-info/PKG-INFO +415 -0
- recap_cli-1.0.0/recap_cli.egg-info/SOURCES.txt +21 -0
- recap_cli-1.0.0/recap_cli.egg-info/dependency_links.txt +1 -0
- recap_cli-1.0.0/recap_cli.egg-info/entry_points.txt +2 -0
- recap_cli-1.0.0/recap_cli.egg-info/requires.txt +3 -0
- recap_cli-1.0.0/recap_cli.egg-info/top_level.txt +2 -0
- recap_cli-1.0.0/recap_core/__init__.py +14 -0
- recap_cli-1.0.0/setup.cfg +4 -0
- recap_cli-1.0.0/setup.py +85 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Include normal package files
|
|
2
|
+
recursive-include recap_cli *.py
|
|
3
|
+
recursive-include recap_core __init__.py
|
|
4
|
+
|
|
5
|
+
# CRITICAL: never ship the source engine
|
|
6
|
+
exclude recap_core/_core.py
|
|
7
|
+
exclude recap_core/*.pyx
|
|
8
|
+
exclude recap_core/*.c
|
|
9
|
+
exclude recap_core/*.h
|
|
10
|
+
prune recap_core/__pycache__
|
|
11
|
+
prune recap_cli/__pycache__
|
recap_cli-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: recap-cli
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: AI Movie recap generator
|
|
5
|
+
Author-email: Thomas William <thomaswill2002503@gmail.com>
|
|
6
|
+
Project-URL: Homepage, https://github.com/thomasDwilliam/recap-cli
|
|
7
|
+
Keywords: recap,youtube,AI,CLI,video
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
14
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
15
|
+
Classifier: Operating System :: MacOS
|
|
16
|
+
Requires-Python: >=3.10
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
Requires-Dist: click>=8.1.7
|
|
19
|
+
Requires-Dist: rich>=13.9.4
|
|
20
|
+
Requires-Dist: requests>=2.32.3
|
|
21
|
+
|
|
22
|
+
# π¬ RecapSaaS - AI Video Recap Generator
|
|
23
|
+
|
|
24
|
+
[](https://badge.fury.io/py/recap-cli)
|
|
25
|
+
[](https://pypi.org/project/recap-cli/)
|
|
26
|
+
[](LICENSE)
|
|
27
|
+
[](https://github.com/your-org/recap-cli/actions)
|
|
28
|
+
|
|
29
|
+
RecapSaaS is a credit-based AI video recap generation system that creates engaging, mobile-optimized summaries of YouTube videos using Google's Gemini AI.
|
|
30
|
+
|
|
31
|
+
## β¨ Features
|
|
32
|
+
|
|
33
|
+
- π± **Mobile-Optimized**: Generates 9:16 vertical videos perfect for social media
|
|
34
|
+
- π£οΈ **Multi-Language**: Support for English and Burmese voiceovers
|
|
35
|
+
- β‘ **Fast Processing**: Optimized video processing with hardware acceleration
|
|
36
|
+
- π **Secure**: Encrypted core engine with JWT authentication
|
|
37
|
+
- π³ **Credit-Based**: Flexible pricing with pay-per-generation model
|
|
38
|
+
- π οΈ **CLI Tool**: Easy-to-use command-line interface
|
|
39
|
+
- π **API Access**: Full REST API for integration
|
|
40
|
+
|
|
41
|
+
## π Quick Start
|
|
42
|
+
|
|
43
|
+
### Installation
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pip install recap-cli
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Setup
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
# Create account
|
|
55
|
+
recap signup
|
|
56
|
+
|
|
57
|
+
# Login
|
|
58
|
+
recap login
|
|
59
|
+
|
|
60
|
+
# Generate your first recap
|
|
61
|
+
recap generate --url "https://www.youtube.com/watch?v=VIDEO_ID"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Prerequisites
|
|
65
|
+
|
|
66
|
+
- Python 3.10 or higher
|
|
67
|
+
- FFmpeg for video processing
|
|
68
|
+
- Google Gemini API key
|
|
69
|
+
|
|
70
|
+
## π Documentation
|
|
71
|
+
|
|
72
|
+
### User Documentation
|
|
73
|
+
- [π User Guide](docs/USER_GUIDE.md) - Complete usage instructions
|
|
74
|
+
- [β FAQ](docs/TROUBLESHOOTING.md#frequently-asked-questions) - Common questions and answers
|
|
75
|
+
|
|
76
|
+
### Developer Documentation
|
|
77
|
+
- [π§ Developer Guide](docs/DEVELOPER_GUIDE.md) - Architecture and development
|
|
78
|
+
- [π API Documentation](docs/API.md) - REST API reference
|
|
79
|
+
- [π Core Compilation](docs/CORE_COMPILATION.md) - Building the encrypted core
|
|
80
|
+
|
|
81
|
+
### Operations Documentation
|
|
82
|
+
- [β‘ Quick Setup Guide](docs/QUICK_SETUP.md) - 15-minute deployment with Aiven & x10
|
|
83
|
+
- [π Deployment Guide](docs/DEPLOYMENT.md) - Production deployment
|
|
84
|
+
- [π§ Aiven Database Setup](docs/AIVEN_SETUP.md) - Aiven MySQL configuration
|
|
85
|
+
- [π οΈ Troubleshooting](docs/TROUBLESHOOTING.md) - Common issues and solutions
|
|
86
|
+
|
|
87
|
+
## ποΈ Architecture
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
|
|
91
|
+
β CLI Client β β PHP Backend β β External APIs β
|
|
92
|
+
β β β β β β
|
|
93
|
+
β β’ User InterfaceβββββΊβ β’ REST API βββββΊβ β’ Gemini AI β
|
|
94
|
+
β β’ Auth Module β β β’ User Managementβ β β’ TTS Service β
|
|
95
|
+
β β’ API Client β β β’ Credit System β β β’ Video Downloadβ
|
|
96
|
+
β β’ Video Engine β β β’ Rate Limiting β β β
|
|
97
|
+
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
|
|
98
|
+
β β
|
|
99
|
+
β βββββββββββββββββββ
|
|
100
|
+
β β Aiven MySQL β
|
|
101
|
+
ββββββββββββββββΊβ β
|
|
102
|
+
β β’ Users β
|
|
103
|
+
β β’ Transactions β
|
|
104
|
+
β β’ Usage Logs β
|
|
105
|
+
β β’ Refresh Tokensβ
|
|
106
|
+
β β’ SSL/TLS β
|
|
107
|
+
βββββββββββββββββββ
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Easy Deployment Options
|
|
111
|
+
|
|
112
|
+
**Recommended Setup for Quick Start:**
|
|
113
|
+
- **Hosting**: x10 Hosting (free tier available)
|
|
114
|
+
- **Database**: Aiven MySQL (free tier available)
|
|
115
|
+
- **Setup Time**: ~15 minutes
|
|
116
|
+
|
|
117
|
+
See [Deployment Guide](docs/DEPLOYMENT.md) and [Aiven Setup Guide](docs/AIVEN_SETUP.md) for detailed instructions.
|
|
118
|
+
|
|
119
|
+
## π³ Credit System
|
|
120
|
+
|
|
121
|
+
RecapSaaS operates on a credit-based system:
|
|
122
|
+
|
|
123
|
+
- **Cost**: 3 credits per video recap
|
|
124
|
+
- **Free Trial**: 3 credits upon email verification
|
|
125
|
+
- **Purchase**: Additional credits available for purchase
|
|
126
|
+
- **Tracking**: Detailed usage history and transaction logs
|
|
127
|
+
|
|
128
|
+
### Credit Management
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
# Check balance
|
|
132
|
+
recap credits
|
|
133
|
+
|
|
134
|
+
# Purchase credits
|
|
135
|
+
recap buy
|
|
136
|
+
|
|
137
|
+
# View history
|
|
138
|
+
recap history
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## π― Usage Examples
|
|
142
|
+
|
|
143
|
+
### Basic Usage
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
# Interactive generation
|
|
147
|
+
recap generate
|
|
148
|
+
|
|
149
|
+
# With parameters
|
|
150
|
+
recap generate \
|
|
151
|
+
--url "https://www.youtube.com/watch?v=dQw4w9WgXcQ" \
|
|
152
|
+
--speed 1.5 \
|
|
153
|
+
--lang english \
|
|
154
|
+
--output ./my-recaps
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Advanced Usage
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
# Generate in Burmese with 2x speed
|
|
161
|
+
recap generate \
|
|
162
|
+
--url "https://www.youtube.com/watch?v=VIDEO_ID" \
|
|
163
|
+
--lang burmese \
|
|
164
|
+
--speed 2.0
|
|
165
|
+
|
|
166
|
+
# Batch processing
|
|
167
|
+
for url in $(cat video_urls.txt); do
|
|
168
|
+
recap generate --url "$url" --speed 1.5
|
|
169
|
+
done
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### API Integration
|
|
173
|
+
|
|
174
|
+
```python
|
|
175
|
+
import requests
|
|
176
|
+
|
|
177
|
+
# Login
|
|
178
|
+
response = requests.post('https://api.recapsaas.com/api/auth/login', json={
|
|
179
|
+
'email': 'user@example.com',
|
|
180
|
+
'password': 'password123'
|
|
181
|
+
})
|
|
182
|
+
token = response.json()['data']['access_token']
|
|
183
|
+
|
|
184
|
+
# Generate recap
|
|
185
|
+
headers = {'Authorization': f'Bearer {token}'}
|
|
186
|
+
response = requests.post('https://api.recapsaas.com/api/recap/generate',
|
|
187
|
+
headers=headers, json={
|
|
188
|
+
'youtube_url': 'https://www.youtube.com/watch?v=VIDEO_ID',
|
|
189
|
+
'language': 'english',
|
|
190
|
+
'speed': '1.5',
|
|
191
|
+
'gemini_api_key': 'AIzaSy...'
|
|
192
|
+
})
|
|
193
|
+
segments = response.json()['data']['segments']
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## π§ Configuration
|
|
197
|
+
|
|
198
|
+
### Environment Variables
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
# Required
|
|
202
|
+
export RECAP_API_URL=https://api.recapsaas.com
|
|
203
|
+
|
|
204
|
+
# Optional
|
|
205
|
+
export RECAP_DEBUG=1 # Enable debug logging
|
|
206
|
+
export RECAP_OUTPUT_DIR=~/recaps # Default output directory
|
|
207
|
+
export RECAP_FFMPEG_PATH=/usr/bin/ffmpeg # Custom FFmpeg path
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Configuration File
|
|
211
|
+
|
|
212
|
+
Create `~/.recap_cli/config.json`:
|
|
213
|
+
|
|
214
|
+
```json
|
|
215
|
+
{
|
|
216
|
+
"api_url": "https://api.recapsaas.com",
|
|
217
|
+
"default_speed": "1.5",
|
|
218
|
+
"default_language": "english",
|
|
219
|
+
"output_dir": "~/recaps",
|
|
220
|
+
"ffmpeg_path": "/usr/bin/ffmpeg",
|
|
221
|
+
"debug": false
|
|
222
|
+
}
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## π οΈ Development
|
|
226
|
+
|
|
227
|
+
### Local Development Setup
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
# Clone repository
|
|
231
|
+
git clone https://github.com/your-org/recap-cli.git
|
|
232
|
+
cd recap-cli
|
|
233
|
+
|
|
234
|
+
# Setup Python environment
|
|
235
|
+
python -m venv venv
|
|
236
|
+
source venv/bin/activate # On Windows: venv\Scripts\activate
|
|
237
|
+
|
|
238
|
+
# Install in development mode
|
|
239
|
+
pip install -e .
|
|
240
|
+
pip install -r requirements-dev.txt
|
|
241
|
+
|
|
242
|
+
# Setup PHP backend
|
|
243
|
+
cd server
|
|
244
|
+
composer install
|
|
245
|
+
cp .env.example .env
|
|
246
|
+
# Edit .env with your configuration
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### Running Tests
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
# Python tests
|
|
253
|
+
pytest
|
|
254
|
+
|
|
255
|
+
# PHP tests
|
|
256
|
+
cd server && phpunit
|
|
257
|
+
|
|
258
|
+
# Integration tests
|
|
259
|
+
pytest tests/integration/
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### Building Core Engine
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
# Compile core
|
|
266
|
+
python build_core.py build_ext --inplace
|
|
267
|
+
|
|
268
|
+
# Cross-platform builds
|
|
269
|
+
docker build -t recap-core-builder .
|
|
270
|
+
docker run --rm -v $(pwd):/app recap-core-builder
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
## π Deployment
|
|
274
|
+
|
|
275
|
+
### CLI Distribution
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
# Build wheels
|
|
279
|
+
python -m build
|
|
280
|
+
|
|
281
|
+
# Upload to PyPI
|
|
282
|
+
twine upload dist/*
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### Backend Deployment
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
# Deploy to server
|
|
289
|
+
rsync -avz server/ user@server:/var/www/recap-api/
|
|
290
|
+
|
|
291
|
+
# Setup database
|
|
292
|
+
php server/index.php
|
|
293
|
+
|
|
294
|
+
# Configure web server
|
|
295
|
+
# See deployment guide for details
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
## π Security
|
|
299
|
+
|
|
300
|
+
### Core Engine Protection
|
|
301
|
+
|
|
302
|
+
- **Source Protection**: Proprietary algorithms compiled to binary
|
|
303
|
+
- **Encryption**: Core engine encrypted and obfuscated
|
|
304
|
+
- **Platform Distribution**: Separate binaries for each platform
|
|
305
|
+
- **Anti-Debugging**: Basic protection against reverse engineering
|
|
306
|
+
|
|
307
|
+
### API Security
|
|
308
|
+
|
|
309
|
+
- **JWT Authentication**: Secure token-based authentication
|
|
310
|
+
- **Rate Limiting**: Protection against abuse
|
|
311
|
+
- **HTTPS Only**: All communications encrypted
|
|
312
|
+
- **Input Validation**: Comprehensive input sanitization
|
|
313
|
+
|
|
314
|
+
## π Monitoring
|
|
315
|
+
|
|
316
|
+
### Health Checks
|
|
317
|
+
|
|
318
|
+
```bash
|
|
319
|
+
# API health
|
|
320
|
+
curl https://api.recapsaas.com/api/health
|
|
321
|
+
|
|
322
|
+
# CLI version
|
|
323
|
+
recap --version
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
### Logging
|
|
327
|
+
|
|
328
|
+
```bash
|
|
329
|
+
# CLI logs
|
|
330
|
+
tail -f ~/.recap_cli/logs/recap.log
|
|
331
|
+
|
|
332
|
+
# Backend logs
|
|
333
|
+
tail -f /var/log/recap-api/error.log
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
## π€ Contributing
|
|
337
|
+
|
|
338
|
+
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
|
|
339
|
+
|
|
340
|
+
### Development Workflow
|
|
341
|
+
|
|
342
|
+
1. Fork the repository
|
|
343
|
+
2. Create a feature branch
|
|
344
|
+
3. Make your changes
|
|
345
|
+
4. Add tests
|
|
346
|
+
5. Submit a pull request
|
|
347
|
+
|
|
348
|
+
### Code Standards
|
|
349
|
+
|
|
350
|
+
- Python: Follow PEP 8, use type hints
|
|
351
|
+
- PHP: Follow PSR-12, use strict types
|
|
352
|
+
- Tests: Maintain >90% coverage
|
|
353
|
+
|
|
354
|
+
## π License
|
|
355
|
+
|
|
356
|
+
This project is licensed under the Commercial License - see the [LICENSE](LICENSE) file for details.
|
|
357
|
+
|
|
358
|
+
## π Support
|
|
359
|
+
|
|
360
|
+
### Getting Help
|
|
361
|
+
|
|
362
|
+
- π [Documentation](https://docs.recapsaas.com)
|
|
363
|
+
- π [Issues](https://github.com/your-org/recap-cli/issues)
|
|
364
|
+
- π¬ [Discord](https://discord.gg/recapsaas)
|
|
365
|
+
- π§ [Email](mailto:support@recapsaas.com)
|
|
366
|
+
|
|
367
|
+
### Response Times
|
|
368
|
+
|
|
369
|
+
- **Critical Issues**: Within 1 hour
|
|
370
|
+
- **High Priority**: Within 4 hours
|
|
371
|
+
- **Normal Priority**: Within 24 hours
|
|
372
|
+
|
|
373
|
+
## πΊοΈ Roadmap
|
|
374
|
+
|
|
375
|
+
### Upcoming Features
|
|
376
|
+
|
|
377
|
+
- [ ] π Additional language support (Spanish, French, German)
|
|
378
|
+
- [ ] π¨ Custom voice options
|
|
379
|
+
- [ ] π Analytics dashboard
|
|
380
|
+
- [ ] π SDK for popular languages
|
|
381
|
+
- [ ] π± Mobile app
|
|
382
|
+
- [ ] π₯ Video platform integrations
|
|
383
|
+
|
|
384
|
+
### Technical Improvements
|
|
385
|
+
|
|
386
|
+
- [ ] β‘ GPU acceleration support
|
|
387
|
+
- [ ] π Real-time processing
|
|
388
|
+
- [ ] π Advanced analytics
|
|
389
|
+
- [ ] π Enhanced security features
|
|
390
|
+
- [ ] π CDN integration
|
|
391
|
+
|
|
392
|
+
## π Stats
|
|
393
|
+
|
|
394
|
+
- π¦ **PyPI Downloads**: 10,000+ monthly
|
|
395
|
+
- π¬ **Videos Processed**: 50,000+ recaps generated
|
|
396
|
+
- π₯ **Active Users**: 1,000+ monthly active users
|
|
397
|
+
- β±οΈ **Uptime**: 99.9% uptime SLA
|
|
398
|
+
|
|
399
|
+
## π Acknowledgments
|
|
400
|
+
|
|
401
|
+
- [Google Gemini AI](https://ai.google.dev/) - Video analysis
|
|
402
|
+
- [FFmpeg](https://ffmpeg.org/) - Video processing
|
|
403
|
+
- [Cython](https://cython.readthedocs.io/) - Core compilation
|
|
404
|
+
- [Rich](https://rich.readthedocs.io/) - CLI interface
|
|
405
|
+
|
|
406
|
+
---
|
|
407
|
+
|
|
408
|
+
<div align="center">
|
|
409
|
+
<p>Made with β€οΈ by the RecapSaaS Team</p>
|
|
410
|
+
<p>
|
|
411
|
+
<a href="https://recapsaas.com">Website</a> β’
|
|
412
|
+
<a href="https://docs.recapsaas.com">Documentation</a> β’
|
|
413
|
+
<a href="https://status.recapsaas.com">Status</a>
|
|
414
|
+
</p>
|
|
415
|
+
</div>
|