appydave-tools 0.11.9 → 0.11.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/appydave/tools/subtitle_master/_doc-todo.md +120 -0
- data/lib/appydave/tools/version.rb +1 -1
- data/package-lock.json +2 -2
- data/package.json +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e7b8ce2de26afecd3f37579dc6b1a414de7f28812ad4399a01f3d3adf2e23b8
|
4
|
+
data.tar.gz: 3156df843020c573448b8360f498b7c82510fba18a226339d07328f1cca6057c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15790b46559390d9a4e0816bc78c30d8204032daa156be756679762e27e48b4999b4ca5e35b23144dd986a6ce98ccd4bbc6ae1352a20c818527582e9b9a72475
|
7
|
+
data.tar.gz: 5afd2d9429afa607c4f79134a4dceee6f1afb0b852bc4125ecfa2b5cd2fb084402d1c64ad79d5e39237db829dab424446bfb1ea3fb4e4df993dc71725295a922
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## [0.11.9](https://github.com/appydave/appydave-tools/compare/v0.11.8...v0.11.9) (2024-11-26)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* SRT cleaner can work with string or file ([ddd3bdc](https://github.com/appydave/appydave-tools/commit/ddd3bdc7d70606bba91d81a7cdd5a9d3e8e7b409))
|
7
|
+
|
1
8
|
## [0.11.8](https://github.com/appydave/appydave-tools/compare/v0.11.7...v0.11.8) (2024-11-26)
|
2
9
|
|
3
10
|
|
@@ -0,0 +1,120 @@
|
|
1
|
+
**Use Cases for Subtitle Management Tool (SRT-manage)**
|
2
|
+
|
3
|
+
### Table of Contents
|
4
|
+
1. [Join Multiple SRT Files](#1-join-multiple-srt-files)
|
5
|
+
2. [Insert SRT at the Beginning of a Video](#2-insert-srt-at-the-beginning-of-a-video)
|
6
|
+
3. [Insert SRT in the Middle of a Video](#3-insert-srt-in-the-middle-of-a-video)
|
7
|
+
4. [Shift Timestamps](#4-shift-timestamps)
|
8
|
+
5. [Find Timestamp by Text](#5-find-timestamp-by-text)
|
9
|
+
6. [Find Timestamp by Approximate Time](#6-find-timestamp-by-approximate-time)
|
10
|
+
7. [Extract Video Length](#7-extract-video-length)
|
11
|
+
8. [Dry-Run (Optional)](#8-dry-run-optional)
|
12
|
+
|
13
|
+
---
|
14
|
+
|
15
|
+
### 1. Join Multiple SRT Files
|
16
|
+
**Use case:** This action joins multiple subtitle files (SRT files), where each subsequent file is appended to the end of the previous one. The timestamps of each additional file are adjusted to start after the previous files finish.
|
17
|
+
|
18
|
+
**Command:**
|
19
|
+
```
|
20
|
+
SRT-manage join -srt movie_part1.srt movie_part2.srt movie_part3.srt -output combined.srt -source-folder ./
|
21
|
+
```
|
22
|
+
**Arguments:**
|
23
|
+
- **-srt** `<file1> <file2> ... <fileN>`: List of SRT files to join, provided in sequence.
|
24
|
+
- **-output** `<file>`: Path for the output combined SRT file.
|
25
|
+
- **-source-folder** `<folder>`: (Optional) Path to the folder containing SRT files. Defaults to `./` (current directory).
|
26
|
+
|
27
|
+
### 2. Insert SRT at the Beginning of a Video
|
28
|
+
**Use case:** Insert an SRT file at the very beginning of another video’s subtitle timeline. For example, if you want to add an intro/teaser subtitles before the main video.
|
29
|
+
|
30
|
+
**Command:**
|
31
|
+
```
|
32
|
+
SRT-manage insert-beginning -srt main_video.srt -insert intro.srt -output final.srt
|
33
|
+
```
|
34
|
+
**Arguments:**
|
35
|
+
- **-srt** `<file>`: Path to the main video SRT file.
|
36
|
+
- **-insert** `<file>`: Path to the SRT file to be inserted at the beginning.
|
37
|
+
- **-output** `<file>`: Path for the final output file.
|
38
|
+
|
39
|
+
### 3. Insert SRT in the Middle of a Video
|
40
|
+
**Use case:** Insert one SRT file at a specific point in another video’s timeline. For example, adding a call-to-action or an advertisement’s subtitles in the middle of a main video.
|
41
|
+
|
42
|
+
**Command:**
|
43
|
+
```
|
44
|
+
SRT-manage insert-middle -srt main_video.srt -insert ad.srt -timecode 00:10:00 -output final.srt
|
45
|
+
```
|
46
|
+
**Arguments:**
|
47
|
+
- **-srt** `<file>`: Path to the main video SRT file.
|
48
|
+
- **-insert** `<file>`: Path to the SRT file to be inserted in the middle.
|
49
|
+
- **-timecode** `<HH:MM:SS>`: The time in the video where the insertion should happen.
|
50
|
+
- **-output** `<file>`: Path for the final output file.
|
51
|
+
|
52
|
+
### 4. Shift Timestamps
|
53
|
+
**Use case:** Adjust the timestamps of all subtitles in an SRT file by a certain offset, useful when a video has been edited or when subtitles need to be delayed or advanced.
|
54
|
+
|
55
|
+
**Command:**
|
56
|
+
```
|
57
|
+
SRT-manage shift -srt main_video.srt -offset 30 -output shifted_video.srt
|
58
|
+
```
|
59
|
+
**Arguments:**
|
60
|
+
- **-srt** `<file>`: Path to the SRT file.
|
61
|
+
- **-offset** `<time_in_sec>`: Time in seconds to shift (positive or negative).
|
62
|
+
- **-output** `<file>`: Path for the adjusted output file.
|
63
|
+
|
64
|
+
### 5. Find Timestamp by Text
|
65
|
+
**Use case:** Search the subtitle file for a specific phrase and return the closest matching timestamp. Useful when trying to locate where a certain line is spoken in the video.
|
66
|
+
|
67
|
+
**Command:**
|
68
|
+
```
|
69
|
+
SRT-manage find-text -srt movie.srt -text "the quick brown fox"
|
70
|
+
```
|
71
|
+
**Arguments:**
|
72
|
+
- **-srt** `<file>`: Path to the SRT file.
|
73
|
+
- **-text** `"<phrase>"`: The phrase to search for in the subtitle text.
|
74
|
+
|
75
|
+
### 6. Find Timestamp by Approximate Time
|
76
|
+
**Use case:** Given a rough timecode, the system returns the closest matching subtitle timestamp. This helps find where subtitles start or stop near the provided time.
|
77
|
+
|
78
|
+
**Command:**
|
79
|
+
```
|
80
|
+
SRT-manage find-time -srt movie.srt -timecode 00:10:00
|
81
|
+
```
|
82
|
+
**Arguments:**
|
83
|
+
- **-srt** `<file>`: Path to the SRT file.
|
84
|
+
- **-timecode** `<HH:MM:SS>`: The approximate time to search for.
|
85
|
+
|
86
|
+
### 7. Extract Video Length
|
87
|
+
**Use case:** Extract the total duration of a video file, which can then be used for timing calculations when adjusting or syncing SRT files.
|
88
|
+
|
89
|
+
**Command:**
|
90
|
+
```
|
91
|
+
SRT-manage video-length -video movie.mov
|
92
|
+
```
|
93
|
+
**Arguments:**
|
94
|
+
- **-video** `<file>`: Path to the video file.
|
95
|
+
|
96
|
+
### 8. Dry-Run (Optional)
|
97
|
+
**Use case:** Preview changes without actually writing the file. This can be used with any of the above actions to test changes before committing them.
|
98
|
+
|
99
|
+
**Example (with shift action):**
|
100
|
+
```
|
101
|
+
SRT-manage shift -srt movie.srt -offset 15 -dry-run
|
102
|
+
```
|
103
|
+
**Argument:**
|
104
|
+
- **-dry-run**: Show changes without applying them.
|
105
|
+
|
106
|
+
---
|
107
|
+
|
108
|
+
### **Summary of Example Use Cases:**
|
109
|
+
1. **Join multiple SRT files:** Joining multiple parts of a movie's subtitles into one file.
|
110
|
+
2. **Insert SRT at the beginning:** Adding intro subtitles before a movie starts.
|
111
|
+
3. **Insert SRT in the middle:** Inserting an ad’s subtitles at a specific time in the video.
|
112
|
+
4. **Shift timestamps:** Delaying subtitles by 30 seconds after a video has been edited.
|
113
|
+
5. **Find timestamp by text:** Finding where the phrase “the quick brown fox” is spoken.
|
114
|
+
6. **Find timestamp by timecode:** Locating the subtitle closest to 00:10:00.
|
115
|
+
7. **Extract video length:** Getting the duration of a video for further calculations.
|
116
|
+
|
117
|
+
---
|
118
|
+
|
119
|
+
Does this structure work better for you? Each use case now has a clear description followed by a realistic command example and an explanation of the arguments. Let me know if any tweaks are needed!
|
120
|
+
|
data/package-lock.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "appydave-tools",
|
3
|
-
"version": "0.11.
|
3
|
+
"version": "0.11.10",
|
4
4
|
"lockfileVersion": 3,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
8
|
"name": "appydave-tools",
|
9
|
-
"version": "0.11.
|
9
|
+
"version": "0.11.10",
|
10
10
|
"devDependencies": {
|
11
11
|
"@klueless-js/semantic-release-rubygem": "github:klueless-js/semantic-release-rubygem",
|
12
12
|
"@semantic-release/changelog": "^6.0.3",
|
data/package.json
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appydave-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Cruwys
|
@@ -193,6 +193,7 @@ files:
|
|
193
193
|
- lib/appydave/tools/name_manager/project_name.rb
|
194
194
|
- lib/appydave/tools/prompt_tools/_doc.md
|
195
195
|
- lib/appydave/tools/prompt_tools/prompt_completion.rb
|
196
|
+
- lib/appydave/tools/subtitle_master/_doc-todo.md
|
196
197
|
- lib/appydave/tools/subtitle_master/_doc.md
|
197
198
|
- lib/appydave/tools/subtitle_master/clean.rb
|
198
199
|
- lib/appydave/tools/types/array_type.rb
|