tphim 1.0.0 → 1.0.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/README.md CHANGED
@@ -1,12 +1,12 @@
1
- # 💎 TXA NEON CORE 2030
1
+ # 💎 TPHIM - Ultimate Video Pipeline
2
2
 
3
- **TXA Neon Core** là bộ công cụ tối thượng để xây dựng hệ thống VOD (Video on Demand) chuyên nghiệp. Hỗ trợ tự động hóa từ khâu tải video, transcode HLS đa chất lượng, tạo phụ đề AI và upload lên Cloud (S3/Tebi).
3
+ **TPHIM** là bộ công cụ tối thượng để xây dựng hệ thống VOD (Video on Demand) chuyên nghiệp. Hỗ trợ tự động hóa từ khâu tải video, transcode HLS đa chất lượng, tạo phụ đề AI và upload lên Cloud (S3/Tebi).
4
4
 
5
5
  ## 🚀 Tính năng vượt trội
6
6
  - **Batch Pipeline:** Xử lý hàng loạt phim chỉ với 1 dòng lệnh.
7
7
  - **AI Subtitles:** Tự động tạo phụ đề Tiếng Việt/Tiếng Anh bằng công cụ AI (Whisper) chạy offline.
8
- - **Neon Hybrid Player:** Trình phát V5 hỗ trợ tận răng cho cả Desktop và Mobile với cử chỉ vuốt cực xịn.
9
8
  - **Cloud Ready:** Upload trực tiếp lên Tebi.io hoặc bất kỳ S3-compatible storage nào.
9
+ - **Interactive CLI:** Giao diện terminal đẹp mắt với neon theme.
10
10
 
11
11
  ---
12
12
 
@@ -48,7 +48,7 @@ Bạn hoàn toàn có thể chạy Pipeline này ngay trên điện thoại:
48
48
  pkg update && pkg upgrade
49
49
  pkg install nodejs ffmpeg python python-pip wget
50
50
  ```
51
- 2. **Cài đặt yt-dlp:**
51
+ 2. **Cài đặt yt-dlp:**(không nhất thiết phải cài)
52
52
  ```bash
53
53
  pip install yt-dlp
54
54
  ```
@@ -61,14 +61,14 @@ Bạn hoàn toàn có thể chạy Pipeline này ngay trên điện thoại:
61
61
 
62
62
  Cài đặt vào dự án của bạn:
63
63
  ```bash
64
- npm install txa-neon-core
64
+ npm install tphim
65
65
  ```
66
66
 
67
67
  Trong code Node.js:
68
68
  ```javascript
69
- import { runPipeline } from 'txa-neon-core';
69
+ import { executePipeline } from 'tphim';
70
70
 
71
- await runPipeline({
71
+ await executePipeline({
72
72
  input: "https://link-phim.com/phim.m3u8",
73
73
  slug: "phim-hay-2030",
74
74
  title: "Phim Hay 2030",
@@ -78,32 +78,56 @@ await runPipeline({
78
78
 
79
79
  ---
80
80
 
81
- ## 🎬 Tích hợp TXAPlayer vào Website
81
+ ## ⌨️ Sử dụng CLI (Terminal)
82
82
 
83
- Link trực tiếp mã nguồn trình phát:
84
- `node_modules/txa-neon-core/TXAPlayer.js`
83
+ ### Cài đặt globally:
84
+ ```bash
85
+ npm install -g tphim
86
+ ```
85
87
 
86
- ```html
87
- <script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
88
- <script src="path/to/TXAPlayer.js"></script>
88
+ ### Các lệnh CLI:
89
+ ```bash
90
+ # Xem hướng dẫn
91
+ ntxa help
89
92
 
90
- <div id="player-container"></div>
93
+ # Chạy interactive mode
94
+ ntxa
95
+
96
+ # Chạy với tên phim mặc định
97
+ ntxa "Tên Phim Của Bạn"
91
98
 
92
- <script>
93
- new TXAPlayer("player-container", "https://s3.tebi.io/.../master.m3u8");
94
- </script>
99
+ # Xử lý batch nhiều link
100
+ ntxa
101
+ # (sẽ hỏi nhập nhiều link cách nhau bằng dấu phẩy)
102
+ ```
103
+
104
+ ### Cấu hình bắt buộc:
105
+ Tạo file `.env` với các biến sau:
106
+ ```env
107
+ TEBI_ENDPOINT=https://s3.tebi.io
108
+ TEBI_ACCESS_KEY_ID=your_access_key
109
+ TEBI_SECRET_ACCESS_KEY=your_secret_key
110
+ TEBI_BUCKET=your_bucket_name
111
+ TEBI_PUBLIC_URL=https://your-bucket.tebi.io
95
112
  ```
96
113
 
97
114
  ---
98
115
 
99
- ## ⌨️ Sử dụng CLI (Terminal)
116
+ ## 🔧 Tính năng CLI
100
117
 
101
- Sau khi cài đặt gói globally (`npm install -g`), bạn có thể dùng lệnh:
118
+ **Interactive Mode:**
119
+ - Nhập multiple links (cách nhau bằng dấu phẩy)
120
+ - Tự động fetch metadata từ video
121
+ - Chọn ngôn ngữ phụ đề (VI/EN/Both)
122
+ - Batch processing với progress bar
102
123
 
124
+ **Help System:**
103
125
  ```bash
104
- ntxa "titile phim"
105
- # Hoặc chạy batch mode
106
- ntxa
126
+ ntxa help # Hiển thị toàn bộ hướng dẫn
127
+ ntxa --help # Tương tự
128
+ ntxa -h # Tương tự
107
129
  ```
108
130
 
109
- *Sản phẩm được phát triển bởi Antigravity AI Engine v2030.* 🍿🎬
131
+ ---
132
+
133
+ *Phát triển bởi TXA - Ultimate Video Pipeline 2030* 🍿🎬
package/index.js CHANGED
@@ -1,16 +1,25 @@
1
1
  // index.js
2
2
  /**
3
- * TXA NEON CORE 2030
3
+ * TPHIM - Ultimate Video Pipeline
4
4
  * The ultimate video processing pipeline and player library
5
5
  */
6
6
 
7
7
  import { executePipeline } from './pipeline.mjs';
8
- import { readFileSync } from 'fs';
8
+ import { readFileSync, copyFileSync, existsSync } from 'fs';
9
9
  import { join, dirname } from 'path';
10
10
  import { fileURLToPath } from 'url';
11
11
 
12
12
  const __dirname = dirname(fileURLToPath(import.meta.url));
13
13
 
14
+ // Auto-copy .env.example to .env if .env doesn't exist
15
+ const envPath = join(__dirname, '.env');
16
+ const envExamplePath = join(__dirname, '.env.example');
17
+
18
+ if (!existsSync(envPath) && existsSync(envExamplePath)) {
19
+ copyFileSync(envExamplePath, envPath);
20
+ console.log('📄 Auto-copied .env.example to .env');
21
+ }
22
+
14
23
  /**
15
24
  * Node-side API: Run the full VOD pipeline.
16
25
  * @param {Object} options - pipeline options { input, slug, title, langArg }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tphim",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "TPHIM - Ultimate Video Pipeline: Download, Transcode HLS, AI Subtitles, and Cloud Upload.",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -27,7 +27,7 @@
27
27
  "author": {
28
28
  "name": "TXA",
29
29
  "email": "txafile@gmail.com",
30
- "url": "https://nrotxa.online"
30
+ "url": "https://film.nrotxa.online"
31
31
  },
32
32
  "license": "SEE LICENSE IN LICENSE.md",
33
33
  "repository": {
@@ -48,5 +48,12 @@
48
48
  "log-symbols": "^7.0.1",
49
49
  "mime-types": "^3.0.2",
50
50
  "ora": "^9.3.0"
51
+ },
52
+ "funding": {
53
+ "type": "individual",
54
+ "url": "https://film.nrotxa.online"
55
+ },
56
+ "engines": {
57
+ "node": ">=18.0.0"
51
58
  }
52
- }
59
+ }
package/pro-terminal.mjs CHANGED
@@ -10,8 +10,22 @@ import figlet from 'figlet';
10
10
  import ora from 'ora';
11
11
  import { spawn } from 'child_process';
12
12
  import { executePipeline } from './pipeline.mjs';
13
+ import { copyFileSync, existsSync } from 'fs';
14
+ import { join, dirname } from 'path';
15
+ import { fileURLToPath } from 'url';
13
16
  import 'dotenv/config';
14
17
 
18
+ const __dirname = dirname(fileURLToPath(import.meta.url));
19
+
20
+ // Auto-copy .env.example to .env if .env doesn't exist
21
+ const envPath = join(__dirname, '.env');
22
+ const envExamplePath = join(__dirname, '.env.example');
23
+
24
+ if (!existsSync(envPath) && existsSync(envExamplePath)) {
25
+ copyFileSync(envExamplePath, envPath);
26
+ console.log(chalk.cyan('📄 Auto-copied .env.example to .env'));
27
+ }
28
+
15
29
  // Color palette
16
30
  const neonCyan = chalk.hex('#00f2ff');
17
31
  const neonPurple = chalk.hex('#bc13fe');