screenkit 0.0.13 → 0.0.14
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/DOCUMENTATION.md +5 -6
- data/lib/screenkit/cli/episode.rb +20 -4
- data/lib/screenkit/exporter/episode.rb +3 -2
- data/lib/screenkit/image_magick.rb +2 -0
- data/lib/screenkit/parallel_processor.rb +5 -3
- data/lib/screenkit/redact_file.rb +1 -0
- data/lib/screenkit/tts/base.rb +4 -0
- data/lib/screenkit/tts/eleven_labs.rb +4 -0
- data/lib/screenkit/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e300f330550b46c23a90c6433c534bb473f65cc71c49c82a97a6d9dde1a35c61
|
|
4
|
+
data.tar.gz: 8030a806d8daab8ab3df20dfc93b4b315746e330e0c2f11d16ba70725f6f6e21
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ad8cdfd064da26fff6013df15e41562fb8b9463493dcc26510a5f48ddf4880c1b55bcf566c82c34ff1abd77b8102d93092283b4987ff8f62d19b33249e1e6e8b
|
|
7
|
+
data.tar.gz: 9b9302661f3b0c65a7b4c365a516b2833297d2fc683a2d6d75c84e051bfa70cc1daeeb0b22aa4f53be4aad8597604944100646a4a6d96935092b49f77a2a9b3e
|
data/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,12 @@ Prefix your message with one of the following:
|
|
|
11
11
|
- [Security] in case of vulnerabilities.
|
|
12
12
|
-->
|
|
13
13
|
|
|
14
|
+
## v0.0.14
|
|
15
|
+
|
|
16
|
+
- [Fixed] Fix file redacting when no API key is defined.
|
|
17
|
+
- [Fixed] Trim transparent pixels from rendered text.
|
|
18
|
+
- [Fixed] Allow concurrency to be specified when generating voiceover.
|
|
19
|
+
|
|
14
20
|
## v0.0.13
|
|
15
21
|
|
|
16
22
|
- [Fixed] Redact API key in config log.
|
data/DOCUMENTATION.md
CHANGED
|
@@ -114,8 +114,6 @@ $ docker run \
|
|
|
114
114
|
Notice that Chrome requires a lot of memory, so you need `--shm-size=2g` (or
|
|
115
115
|
more).
|
|
116
116
|
|
|
117
|
-
To create a new project:
|
|
118
|
-
|
|
119
117
|
---
|
|
120
118
|
|
|
121
119
|
## Quick Start
|
|
@@ -958,7 +956,7 @@ The engine name is camelized (e.g., `custom_engine` → `CustomEngine`,
|
|
|
958
956
|
|
|
959
957
|
> [!TIP]
|
|
960
958
|
>
|
|
961
|
-
> If you host your TTS engine on Github, use the topic `
|
|
959
|
+
> If you host your TTS engine on Github, use the topic `screenkit-tts`, so other
|
|
962
960
|
> people can find it.
|
|
963
961
|
|
|
964
962
|
---
|
|
@@ -1320,9 +1318,10 @@ bundle exec screenkit ...
|
|
|
1320
1318
|
|
|
1321
1319
|
#### TTS not working
|
|
1322
1320
|
|
|
1323
|
-
- For ElevenLabs:
|
|
1324
|
-
|
|
1325
|
-
- For `
|
|
1321
|
+
- For ElevenLabs: set `--tts-api-key` with valid prefixed key, like
|
|
1322
|
+
`eleven_labs:API_KEY`
|
|
1323
|
+
- For macOS `say`: verify voice name with `say -v ?`
|
|
1324
|
+
- For `espeak`: ensure `espeak` is installed and in PATH
|
|
1326
1325
|
|
|
1327
1326
|
#### Playwright scripts not working
|
|
1328
1327
|
|
|
@@ -69,15 +69,23 @@ module ScreenKit
|
|
|
69
69
|
def export
|
|
70
70
|
puts Banner.banner if options.banner
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
episode_config_path = File.join(options.dir, "config.yml")
|
|
73
|
+
has_project_config = File.file?(options.config)
|
|
74
|
+
has_episode_config = File.file?(episode_config_path)
|
|
75
|
+
|
|
76
|
+
if !has_project_config && !has_episode_config
|
|
77
|
+
shell.say "Error: No configuration file found.", :red
|
|
78
|
+
exit 1
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
project_config = if has_project_config
|
|
73
82
|
Config.load_yaml_file(options.config)
|
|
74
83
|
else
|
|
75
84
|
{}
|
|
76
85
|
end
|
|
77
86
|
|
|
78
|
-
episode_config =
|
|
79
|
-
|
|
80
|
-
Config.load_yaml_file(episode_config)
|
|
87
|
+
episode_config = if has_episode_config
|
|
88
|
+
Config.load_yaml_file(episode_config_path)
|
|
81
89
|
else
|
|
82
90
|
{}
|
|
83
91
|
end
|
|
@@ -95,6 +103,14 @@ module ScreenKit
|
|
|
95
103
|
)
|
|
96
104
|
|
|
97
105
|
exporter.export
|
|
106
|
+
ensure
|
|
107
|
+
exporter.output_dir.join("logs").glob("*.txt").each do |path|
|
|
108
|
+
redact_file(path, options.tts_api_key)
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
no_commands do
|
|
113
|
+
include RedactFile
|
|
98
114
|
end
|
|
99
115
|
end
|
|
100
116
|
end
|
|
@@ -149,7 +149,8 @@ module ScreenKit
|
|
|
149
149
|
spinner:,
|
|
150
150
|
list: filtered_segments,
|
|
151
151
|
message: "Exporting voiceovers (%{progress}/%{count})",
|
|
152
|
-
log_path: logfile.create("%{prefix}", :voiceover)
|
|
152
|
+
log_path: logfile.create("%{prefix}", :voiceover),
|
|
153
|
+
concurrency: tts_engine.concurrency
|
|
153
154
|
).run(&:export_voiceover)
|
|
154
155
|
|
|
155
156
|
log_elapsed("Generated voiceover in %{elapsed}", elapsed)
|
|
@@ -189,7 +190,7 @@ module ScreenKit
|
|
|
189
190
|
source.search(watermark.path)
|
|
190
191
|
else
|
|
191
192
|
ScreenKit.root_dir
|
|
192
|
-
.join("
|
|
193
|
+
.join("resources/transparent.png")
|
|
193
194
|
end
|
|
194
195
|
|
|
195
196
|
watermark_width, watermark_height = image_size(watermark_path)
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
module ScreenKit
|
|
4
4
|
class ParallelProcessor
|
|
5
|
-
attr_reader :spinner, :list, :message, :mutex, :count, :log_path
|
|
5
|
+
attr_reader :spinner, :list, :message, :mutex, :count, :log_path,
|
|
6
|
+
:concurrency
|
|
6
7
|
attr_accessor :progress
|
|
7
8
|
|
|
8
|
-
def initialize(spinner:, list:, message:, log_path: nil)
|
|
9
|
+
def initialize(spinner:, list:, message:, log_path: nil, concurrency: nil)
|
|
9
10
|
@list = list
|
|
10
11
|
@message = message
|
|
11
12
|
@spinner = spinner
|
|
@@ -13,6 +14,7 @@ module ScreenKit
|
|
|
13
14
|
@progress = 0
|
|
14
15
|
@count = list.size
|
|
15
16
|
@log_path = log_path
|
|
17
|
+
@concurrency = concurrency || Etc.nprocessors
|
|
16
18
|
end
|
|
17
19
|
|
|
18
20
|
def run(&block)
|
|
@@ -20,7 +22,7 @@ module ScreenKit
|
|
|
20
22
|
indexed_list = list.map.with_index {|item, index| [item, index] }
|
|
21
23
|
arity = block.arity
|
|
22
24
|
|
|
23
|
-
indexed_list.each_slice(
|
|
25
|
+
indexed_list.each_slice(concurrency) do |slice|
|
|
24
26
|
threads = slice.map do |args|
|
|
25
27
|
thread = Thread.new do
|
|
26
28
|
update_message
|
data/lib/screenkit/tts/base.rb
CHANGED
data/lib/screenkit/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: screenkit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.14
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nando Vieira
|
|
@@ -421,10 +421,10 @@ metadata:
|
|
|
421
421
|
rubygems_mfa_required: 'true'
|
|
422
422
|
homepage_uri: https://github.com/fnando/screenkit
|
|
423
423
|
bug_tracker_uri: https://github.com/fnando/screenkit/issues
|
|
424
|
-
source_code_uri: https://github.com/fnando/screenkit/tree/v0.0.
|
|
425
|
-
changelog_uri: https://github.com/fnando/screenkit/tree/v0.0.
|
|
426
|
-
documentation_uri: https://github.com/fnando/screenkit/tree/v0.0.
|
|
427
|
-
license_uri: https://github.com/fnando/screenkit/tree/v0.0.
|
|
424
|
+
source_code_uri: https://github.com/fnando/screenkit/tree/v0.0.14
|
|
425
|
+
changelog_uri: https://github.com/fnando/screenkit/tree/v0.0.14/CHANGELOG.md
|
|
426
|
+
documentation_uri: https://github.com/fnando/screenkit/tree/v0.0.14/README.md
|
|
427
|
+
license_uri: https://github.com/fnando/screenkit/tree/v0.0.14/LICENSE.md
|
|
428
428
|
rdoc_options: []
|
|
429
429
|
require_paths:
|
|
430
430
|
- lib
|