appydave-tools 0.12.0 → 0.14.0
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/.DS_Store +0 -0
- data/.rubocop.yml +2 -2
- data/CHANGELOG.md +19 -0
- data/bin/gpt_context.rb +4 -0
- data/bin/{subtitle_master-old.rb → subtitle_manager-old.rb} +3 -3
- data/bin/{subtitle_master.rb → subtitle_manager.rb} +4 -4
- data/docs/dam/overview.md +28 -0
- data/lib/appydave/tools/gpt_context/file_collector.rb +17 -0
- data/lib/appydave/tools/gpt_context/options.rb +2 -0
- data/lib/appydave/tools/{subtitle_master → subtitle_manager}/_doc-clean.md +2 -2
- data/lib/appydave/tools/version.rb +1 -1
- data/lib/appydave/tools.rb +3 -3
- data/package.json +1 -1
- metadata +42 -27
- data/package-lock.json +0 -8790
- /data/lib/appydave/tools/{subtitle_master → subtitle_manager}/_doc-join.md +0 -0
- /data/lib/appydave/tools/{subtitle_master → subtitle_manager}/_doc-todo.md +0 -0
- /data/lib/appydave/tools/{subtitle_master → subtitle_manager}/clean.rb +0 -0
- /data/lib/appydave/tools/{subtitle_master → subtitle_manager}/join.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27653d19d02fd654b0419cd8663e5df8ba23dcb828f1e72cf78af006be9fe1eb
|
4
|
+
data.tar.gz: 5737213d8a550640adf592bc735550525c890a9000a5b599e5e1c243276dedfc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36bd14b54f904889546d1f9abcc7c302029d65b8249a34c7b1e631c19c4ce197302387642050e759bb2b3154b840ef1019d7e78d5e6752f29584ed5a20ae1111
|
7
|
+
data.tar.gz: 897a920af74cb16d47121eac164384bcf790316200effc5b8151ab96deafc03ea2e84d77f89b59600911504ba574cc2471e98375b167313b3231a8d3cc963dae
|
data/.DS_Store
ADDED
Binary file
|
data/.rubocop.yml
CHANGED
@@ -2,7 +2,7 @@ inherit_mode:
|
|
2
2
|
merge:
|
3
3
|
- Exclude # see: https://stackoverflow.com/a/70818366/473923
|
4
4
|
- AllowedNames
|
5
|
-
|
5
|
+
plugins:
|
6
6
|
- rubocop-rspec
|
7
7
|
- rubocop-rake
|
8
8
|
|
@@ -91,7 +91,7 @@ Metrics/ParameterLists:
|
|
91
91
|
Exclude:
|
92
92
|
- "**/spec/**/*"
|
93
93
|
- "**/models/**/*"
|
94
|
-
- "lib/appydave/tools/
|
94
|
+
- "lib/appydave/tools/subtitle_manager/join.rb"
|
95
95
|
Layout/EmptyLineBetweenDefs:
|
96
96
|
Exclude:
|
97
97
|
- "**/spec/**/*"
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,22 @@
|
|
1
|
+
# [0.13.0](https://github.com/appydave/appydave-tools/compare/v0.12.0...v0.13.0) (2024-12-03)
|
2
|
+
|
3
|
+
|
4
|
+
### Features
|
5
|
+
|
6
|
+
* move subtitle_master to subtitle_manager ([1c2d968](https://github.com/appydave/appydave-tools/commit/1c2d9680dce943bdfa65ec6ee079b40abdbd3890))
|
7
|
+
|
8
|
+
# [0.12.0](https://github.com/appydave/appydave-tools/compare/v0.11.11...v0.12.0) (2024-12-03)
|
9
|
+
|
10
|
+
|
11
|
+
### Bug Fixes
|
12
|
+
|
13
|
+
* update cops ([0efed07](https://github.com/appydave/appydave-tools/commit/0efed07376a7fa8d460a3ab03264a82764245ebe))
|
14
|
+
|
15
|
+
|
16
|
+
### Features
|
17
|
+
|
18
|
+
* add srt-join tool ([0576ed4](https://github.com/appydave/appydave-tools/commit/0576ed44f330869760832875126dd1f4c2bfcbd1))
|
19
|
+
|
1
20
|
## [0.11.11](https://github.com/appydave/appydave-tools/compare/v0.11.10...v0.11.11) (2024-11-26)
|
2
21
|
|
3
22
|
|
data/bin/gpt_context.rb
CHANGED
@@ -52,6 +52,10 @@ OptionParser.new do |opts|
|
|
52
52
|
options.output_target << target
|
53
53
|
end
|
54
54
|
|
55
|
+
opts.on('-p', '--prompt MESSAGE', 'Message/prompt to include in aider format output') do |message|
|
56
|
+
options.prompt = message
|
57
|
+
end
|
58
|
+
|
55
59
|
opts.on_tail('-h', '--help', 'Show this message') do
|
56
60
|
puts opts
|
57
61
|
puts "\nExamples:"
|
@@ -67,7 +67,7 @@ class SubtitleMasterCLI
|
|
67
67
|
def parse_options(args, command, extra_options = [])
|
68
68
|
options = { file: nil, output: nil }
|
69
69
|
OptionParser.new do |opts|
|
70
|
-
opts.banner = "Usage:
|
70
|
+
opts.banner = "Usage: subtitle_manager.rb #{command} [options]"
|
71
71
|
|
72
72
|
opts.on('-f', '--file FILE', 'SRT file to process') { |v| options[:file] = v }
|
73
73
|
opts.on('-o', '--output FILE', 'Output file') { |v| options[:output] = v }
|
@@ -99,14 +99,14 @@ class SubtitleMasterCLI
|
|
99
99
|
end
|
100
100
|
|
101
101
|
def print_help
|
102
|
-
puts 'Usage:
|
102
|
+
puts 'Usage: subtitle_manager.rb [command] [options]'
|
103
103
|
puts 'Commands:'
|
104
104
|
puts ' clean Clean and normalize SRT files'
|
105
105
|
puts ' correct Correct common typos and mistranslations in SRT files'
|
106
106
|
puts ' split Split subtitle groups based on word count'
|
107
107
|
puts ' highlight Highlight power words in subtitles'
|
108
108
|
puts ' image_prompts Generate image prompts from subtitle text'
|
109
|
-
puts "Run '
|
109
|
+
puts "Run 'subtitle_manager.rb [command] --help' for more information on a command."
|
110
110
|
end
|
111
111
|
end
|
112
112
|
|
@@ -39,7 +39,7 @@ class SubtitleMasterCLI
|
|
39
39
|
|
40
40
|
# Command-specific option parser
|
41
41
|
clean_parser = OptionParser.new do |opts|
|
42
|
-
opts.banner = 'Usage:
|
42
|
+
opts.banner = 'Usage: subtitle_manager.rb clean [options]'
|
43
43
|
|
44
44
|
opts.on('-f', '--file FILE', 'SRT file to process') do |v|
|
45
45
|
options[:file] = v
|
@@ -87,7 +87,7 @@ class SubtitleMasterCLI
|
|
87
87
|
}
|
88
88
|
|
89
89
|
join_parser = OptionParser.new do |opts|
|
90
|
-
opts.banner = 'Usage:
|
90
|
+
opts.banner = 'Usage: subtitle_manager.rb join [options]'
|
91
91
|
|
92
92
|
opts.on('-d', '--directory DIR', 'Directory containing SRT files (default: current directory)') do |v|
|
93
93
|
options[:folder] = v
|
@@ -141,11 +141,11 @@ class SubtitleMasterCLI
|
|
141
141
|
end
|
142
142
|
|
143
143
|
def print_help
|
144
|
-
puts 'Usage:
|
144
|
+
puts 'Usage: subtitle_manager.rb [command] [options]'
|
145
145
|
puts 'Commands:'
|
146
146
|
puts ' clean Clean and normalize SRT files'
|
147
147
|
puts ' join Join multiple SRT files'
|
148
|
-
puts "Run '
|
148
|
+
puts "Run 'subtitle_manager.rb [command] --help' for more information on a command."
|
149
149
|
end
|
150
150
|
end
|
151
151
|
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# DAM - Digital Asset Management
|
2
|
+
|
3
|
+
Digital Asset Management (DAM) is a system that stores, organizes, and retrieves digital assets such as images, videos, and other multimedia files.
|
4
|
+
|
5
|
+
DAM systems are used by organizations to manage their digital assets efficiently and effectively.
|
6
|
+
|
7
|
+
This document provides an overview of digital asset management (dam) from the point of view of AppyDave and FliVideo.
|
8
|
+
|
9
|
+
> This is a preliminary document that needs to be moved to the appropriate file and project location.
|
10
|
+
|
11
|
+
## Stories
|
12
|
+
|
13
|
+
As a content creator, I want to keep track of the different brands hat I'm running where a business unit represents brand
|
14
|
+
As a content creator, I want to manage the types of projects and extra configuration associated with each brand
|
15
|
+
As a content creator, I want to be able to find assets associated with a project and brand
|
16
|
+
As a contact creator, I may need to split specific projects across multiple drive locations For short and long-term storage and for team sharing
|
17
|
+
As a contact creator, I need to be able to easily create a new project for a brand and have it sequentially labelled in an appropriate location
|
18
|
+
As a content creator, I need a new project to be initialised based on the brand/project configuration
|
19
|
+
As a content creator, I need tools that will automatically transfer files to project folder locations based on source, file type, and naming convention
|
20
|
+
As a contact creator, I need to be able to create, remove, rename, update, list, project files
|
21
|
+
As a contact creator, I need to be able to archive or reverse archive project files
|
22
|
+
As a content creator, I need to be able to work with video transcriptions for use by various AI tools
|
23
|
+
As content creator, I need a well-defined project, naming convention.
|
24
|
+
As a content creator, I need configurable project structures and rules
|
25
|
+
As content creator, I need a well-defined asset, naming Convention
|
26
|
+
As a contact creator, I need assets to be stored in various locations within the project using smart rules
|
27
|
+
|
28
|
+
|
@@ -28,6 +28,8 @@ module Appydave
|
|
28
28
|
build_content
|
29
29
|
when 'json'
|
30
30
|
build_json
|
31
|
+
when 'aider'
|
32
|
+
build_aider
|
31
33
|
else
|
32
34
|
''
|
33
35
|
end
|
@@ -122,6 +124,21 @@ module Appydave
|
|
122
124
|
JSON.pretty_generate(json_output)
|
123
125
|
end
|
124
126
|
|
127
|
+
def build_aider
|
128
|
+
return '' unless @options.prompt
|
129
|
+
|
130
|
+
files = []
|
131
|
+
@include_patterns.each do |pattern|
|
132
|
+
Dir.glob(pattern).each do |file_path|
|
133
|
+
next if excluded?(file_path) || File.directory?(file_path)
|
134
|
+
|
135
|
+
files << file_path
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
"aider --message \"#{@options.prompt}\" #{files.join(' ')}"
|
140
|
+
end
|
141
|
+
|
125
142
|
def excluded?(file_path)
|
126
143
|
@exclude_patterns.any? { |pattern| File.fnmatch(pattern, file_path, File::FNM_PATHNAME | File::FNM_DOTMATCH) }
|
127
144
|
end
|
@@ -12,6 +12,7 @@ module Appydave
|
|
12
12
|
:debug,
|
13
13
|
:output_target,
|
14
14
|
:working_directory,
|
15
|
+
:prompt,
|
15
16
|
keyword_init: true
|
16
17
|
) do
|
17
18
|
def initialize(**args)
|
@@ -21,6 +22,7 @@ module Appydave
|
|
21
22
|
self.format ||= 'tree,content'
|
22
23
|
self.debug ||= 'none'
|
23
24
|
self.output_target ||= []
|
25
|
+
self.prompt ||= nil
|
24
26
|
end
|
25
27
|
end
|
26
28
|
end
|
@@ -31,10 +31,10 @@ cleaner = SubtitleMaster::Clean.new(srt_content: srt_content_string)
|
|
31
31
|
### Command Line Usage
|
32
32
|
|
33
33
|
```bash
|
34
|
-
./bin/
|
34
|
+
./bin/subtitle_manager.rb clean -f path/to/example.srt -o path/to/example_cleaned.srt
|
35
35
|
|
36
36
|
# Example using alias
|
37
|
-
|
37
|
+
ad_subtitle_manager clean -f transcript/a45-banned-from-midjourney-16-alternatives.srt -o a45-transcript.srt
|
38
38
|
```
|
39
39
|
|
40
40
|
This component reads the SRT file, processes the content to remove tags and normalize lines, and outputs a cleaned and formatted subtitle file that is easier to read and upload to platforms.
|
data/lib/appydave/tools.rb
CHANGED
@@ -50,8 +50,8 @@ require 'appydave/tools/name_manager/project_name'
|
|
50
50
|
|
51
51
|
require 'appydave/tools/prompt_tools/prompt_completion'
|
52
52
|
|
53
|
-
require 'appydave/tools/
|
54
|
-
require 'appydave/tools/
|
53
|
+
require 'appydave/tools/subtitle_manager/clean'
|
54
|
+
require 'appydave/tools/subtitle_manager/join'
|
55
55
|
|
56
56
|
require 'appydave/tools/youtube_automation/gpt_agent'
|
57
57
|
|
@@ -67,7 +67,7 @@ require 'appydave/tools/youtube_manager/reports/video_content_report'
|
|
67
67
|
Appydave::Tools::Configuration::Config.set_default do |config|
|
68
68
|
config.config_path = File.expand_path('~/.config/appydave')
|
69
69
|
config.register(:settings, Appydave::Tools::Configuration::Models::SettingsConfig)
|
70
|
-
config.register(:bank_reconciliation, Appydave::Tools::Configuration::Models::BankReconciliationConfig)
|
70
|
+
# config.register(:bank_reconciliation, Appydave::Tools::Configuration::Models::BankReconciliationConfig)
|
71
71
|
config.register(:channels, Appydave::Tools::Configuration::Models::ChannelsConfig)
|
72
72
|
config.register(:youtube_automation, Appydave::Tools::Configuration::Models::YoutubeAutomationConfig)
|
73
73
|
end
|
data/package.json
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appydave-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Cruwys
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '8'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '8'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: clipboard
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '2'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: csv
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,47 +81,61 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0.53'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: googleauth
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: i18n
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '1.14'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '1.14'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: k_log
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - "
|
115
|
+
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - "
|
122
|
+
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: ruby-openai
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '8'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '8'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: webrick
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -143,6 +157,7 @@ executables: []
|
|
143
157
|
extensions: []
|
144
158
|
extra_rdoc_files: []
|
145
159
|
files:
|
160
|
+
- ".DS_Store"
|
146
161
|
- ".builders/_.rb"
|
147
162
|
- ".builders/boot.rb"
|
148
163
|
- ".builders/generators/01-bootstrap.rb"
|
@@ -163,10 +178,11 @@ files:
|
|
163
178
|
- bin/move_images.rb
|
164
179
|
- bin/prompt_tools.rb
|
165
180
|
- bin/setup
|
166
|
-
- bin/
|
167
|
-
- bin/
|
181
|
+
- bin/subtitle_manager-old.rb
|
182
|
+
- bin/subtitle_manager.rb
|
168
183
|
- bin/youtube_automation.rb
|
169
184
|
- bin/youtube_manager.rb
|
185
|
+
- docs/dam/overview.md
|
170
186
|
- docs/usage/gpt-context.md
|
171
187
|
- images.log
|
172
188
|
- lib/appydave/tools.rb
|
@@ -195,11 +211,11 @@ files:
|
|
195
211
|
- lib/appydave/tools/name_manager/project_name.rb
|
196
212
|
- lib/appydave/tools/prompt_tools/_doc.md
|
197
213
|
- lib/appydave/tools/prompt_tools/prompt_completion.rb
|
198
|
-
- lib/appydave/tools/
|
199
|
-
- lib/appydave/tools/
|
200
|
-
- lib/appydave/tools/
|
201
|
-
- lib/appydave/tools/
|
202
|
-
- lib/appydave/tools/
|
214
|
+
- lib/appydave/tools/subtitle_manager/_doc-clean.md
|
215
|
+
- lib/appydave/tools/subtitle_manager/_doc-join.md
|
216
|
+
- lib/appydave/tools/subtitle_manager/_doc-todo.md
|
217
|
+
- lib/appydave/tools/subtitle_manager/clean.rb
|
218
|
+
- lib/appydave/tools/subtitle_manager/join.rb
|
203
219
|
- lib/appydave/tools/types/array_type.rb
|
204
220
|
- lib/appydave/tools/types/base_model.rb
|
205
221
|
- lib/appydave/tools/types/hash_type.rb
|
@@ -219,7 +235,6 @@ files:
|
|
219
235
|
- lib/mj-paste-test/main.rb
|
220
236
|
- lib/mj-paste-test/prompts.txt
|
221
237
|
- lib/mj-paste-test/readme-leonardo.md
|
222
|
-
- package-lock.json
|
223
238
|
- package.json
|
224
239
|
- sig/appydave/tools.rbs
|
225
240
|
homepage: http://appydave.com/gems/appydave-tools
|
@@ -230,7 +245,7 @@ metadata:
|
|
230
245
|
source_code_uri: https://github.com/appydave/appydave-tools
|
231
246
|
changelog_uri: https://github.com/appydave/appydave-tools/blob/main/CHANGELOG.md
|
232
247
|
rubygems_mfa_required: 'true'
|
233
|
-
post_install_message:
|
248
|
+
post_install_message:
|
234
249
|
rdoc_options: []
|
235
250
|
require_paths:
|
236
251
|
- lib
|
@@ -245,8 +260,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
245
260
|
- !ruby/object:Gem::Version
|
246
261
|
version: '0'
|
247
262
|
requirements: []
|
248
|
-
rubygems_version: 3.
|
249
|
-
signing_key:
|
263
|
+
rubygems_version: 3.4.20
|
264
|
+
signing_key:
|
250
265
|
specification_version: 4
|
251
266
|
summary: AppyDave YouTube Automation Tools
|
252
267
|
test_files: []
|