appydave-tools 0.13.0 → 0.14.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 17dec612ce270c5ffa25c2173a96b437b85ccd6dfe1e1d2eb913060a4ebc54c1
4
- data.tar.gz: 6b280aebe5245dc5c619169aa75638c9be027048736c28f4f8f3baeb33dccc65
3
+ metadata.gz: 5600c6b83ba9bf32a0954deaf91167a157826b2de2232c21fe51736a2f2e8b29
4
+ data.tar.gz: 389ac6da8c18a561ff276ebb49d3ef063b9c1965b190333a813e5f620e846b3d
5
5
  SHA512:
6
- metadata.gz: 143d0c023e0ffd5dd86086e5f34f434216b7f3ed10c129e6971a9e0144eae3a36f631fc2ffbbd4a1b6ad290fdcb9e1ce5032810b65087bcfbc724799a7812c96
7
- data.tar.gz: 9a26010a6d0f7936b094e2f1e5b4391e96d0f8a7bb58f686d6e7ca03100f7eb67da342a92f046499240c127d718bfa08ca41e07c1c3909c3fdd83b47827ecdc2
6
+ metadata.gz: ee9e4ea0e3e8c03c87ad0bcc7cf2af971c11c4f8966fedfa57c1813ac8154546156d70f353c22f607f3d6f8c863932a645503f50d3be67184dff418f7e5f7573
7
+ data.tar.gz: '08ab2c3240d21b647b2a76d037069e0e79655c3e982da82a48240a2748cb2d7a6cd5f3e76fbfd2db003262437179d657b7073863f1f3b4b14acbc6734865b775'
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
- require:
5
+ plugins:
6
6
  - rubocop-rspec
7
7
  - rubocop-rake
8
8
 
data/CHANGELOG.md CHANGED
@@ -1,3 +1,25 @@
1
+ # [0.14.0](https://github.com/appydave/appydave-tools/compare/v0.13.0...v0.14.0) (2025-04-27)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * 'cops' ([51bc6f2](https://github.com/appydave/appydave-tools/commit/51bc6f2e7bd08a3aff165e6d488f3f99c4ab7f45))
7
+ * ci ([11e934b](https://github.com/appydave/appydave-tools/commit/11e934b2f4f6be2457dea65c46b37ae350480b91))
8
+ * cops ([94817c6](https://github.com/appydave/appydave-tools/commit/94817c6ecc930dcb79a59fa7d6d977ba2aa197b9))
9
+ * update gem file ([9b0d21d](https://github.com/appydave/appydave-tools/commit/9b0d21d278a3c2bd6669122f33e55f084c76997b))
10
+
11
+
12
+ ### Features
13
+
14
+ * update gem file ([b15dbcb](https://github.com/appydave/appydave-tools/commit/b15dbcbb13e0025f82ab54d8a87104d0d0fa4e14))
15
+
16
+ # [0.13.0](https://github.com/appydave/appydave-tools/compare/v0.12.0...v0.13.0) (2024-12-03)
17
+
18
+
19
+ ### Features
20
+
21
+ * move subtitle_master to subtitle_manager ([1c2d968](https://github.com/appydave/appydave-tools/commit/1c2d9680dce943bdfa65ec6ee079b40abdbd3890))
22
+
1
23
  # [0.12.0](https://github.com/appydave/appydave-tools/compare/v0.11.11...v0.12.0) (2024-12-03)
2
24
 
3
25
 
data/CLAUDE.md ADDED
@@ -0,0 +1,152 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Common Commands
6
+
7
+ ### Development Setup
8
+ ```bash
9
+ bin/setup # Install dependencies and setup development environment
10
+ bin/console # Interactive Ruby console for experimentation
11
+ ```
12
+
13
+ ### CLI Tools Usage
14
+
15
+ #### GPT Context Gatherer
16
+ Collect and organize project files for AI context:
17
+
18
+ ```bash
19
+ # Basic usage - gather files with debug output and file output
20
+ gpt_context -i '**/*.rb' -e 'spec/**/*' -d -o context.txt
21
+
22
+ # Multiple formats and patterns
23
+ gpt_context -i 'lib/**/*.rb' -i 'bin/**/*.rb' -f tree,content -d
24
+
25
+ # Advanced web project filtering
26
+ gpt_context -i 'apps/**/*.ts' -i 'apps/**/*.tsx' -e '**/node_modules/**/*' -e '**/_generated/**/*' -d -f tree -o typescript.txt
27
+
28
+ # Tree view only for project structure
29
+ gpt_context -i '**/*' -e '**/node_modules/**/*' -e '.git/**/*' -f tree -d
30
+
31
+ # Line-limited content gathering
32
+ gpt_context -i '**/*.rb' -l 20 -f content -d
33
+
34
+ # Multiple output targets
35
+ gpt_context -i 'docs/**/*' -f tree,content -o clipboard -o docs-context.txt
36
+ ```
37
+
38
+ #### Other CLI Tools
39
+ ```bash
40
+ # YouTube video management
41
+ bin/youtube_manager.rb get [options]
42
+ bin/youtube_manager.rb update [options]
43
+
44
+ # Subtitle processing
45
+ bin/subtitle_manager.rb clean [options]
46
+ bin/subtitle_manager.rb join [options]
47
+
48
+ # AI prompt tools
49
+ bin/prompt_tools.rb completion [options]
50
+
51
+ # YouTube automation workflows
52
+ bin/youtube_automation.rb [workflow-command]
53
+ ```
54
+
55
+ ### Testing & Quality
56
+ ```bash
57
+ rake spec # Run all RSpec tests
58
+ rake # Default task: compile, spec (clobber compile spec)
59
+ guard # Watch files and auto-run tests + rubocop on changes
60
+ bundle exec rspec -f doc # Run tests with detailed documentation format
61
+ ```
62
+
63
+ ### Linting & Style
64
+ ```bash
65
+ rubocop # Run RubyGem style checks
66
+ bundle exec rubocop --format clang # Run with clang format (as used in Guard)
67
+ ```
68
+
69
+ ### Build & Release
70
+ ```bash
71
+ rake build # Build the gem
72
+ rake publish # Build and publish gem to RubyGems.org
73
+ rake clean # Remove built *.gem files
74
+ gem build # Build gemspec into .gem file
75
+ ```
76
+
77
+ ## Architecture Overview
78
+
79
+ This is a Ruby gem called `appydave-tools` that provides YouTube automation and content creation tools.
80
+
81
+ ### Core Structure
82
+ - **CLI Tools**: Multiple executable scripts in `bin/` for different functionalities
83
+ - **Modular Design**: Organized into focused modules under `lib/appydave/tools/`
84
+ - **Configuration System**: Flexible config management with channel and project settings
85
+ - **Type System**: Custom type classes for data validation and transformation
86
+
87
+ ### Key Components
88
+
89
+ #### CLI Actions (`lib/appydave/tools/cli_actions/`)
90
+ - Base action pattern for command-line operations
91
+ - YouTube video management (get, update)
92
+ - AI prompt completion workflows
93
+
94
+ #### Configuration (`lib/appydave/tools/configuration/`)
95
+ - Multi-channel YouTube setup support
96
+ - Project folder management (content, video, published, abandoned)
97
+ - OpenAI integration configuration
98
+ - Channel-specific settings (code, name, youtube_handle)
99
+
100
+ #### GPT Context (`lib/appydave/tools/gpt_context/`)
101
+ - File collection for AI context gathering
102
+ - Content filtering and organization
103
+ - Output handling for various formats
104
+
105
+ #### YouTube Management (`lib/appydave/tools/youtube_manager/`)
106
+ - YouTube API authorization and authentication
107
+ - Video metadata retrieval and updates
108
+ - Caption/subtitle management
109
+ - Detailed reporting capabilities
110
+
111
+ #### Subtitle Management (`lib/appydave/tools/subtitle_manager/`)
112
+ - SRT file cleaning and normalization
113
+ - Multi-part subtitle joining
114
+ - Timeline synchronization
115
+
116
+ ### Type System (`lib/appydave/tools/types/`)
117
+ - `BaseModel`: Foundation for data models with validation
118
+ - `ArrayType` & `HashType`: Collection type wrappers
119
+ - `IndifferentAccessHash`: Symbol/string key flexibility
120
+
121
+ ## Development Conventions
122
+
123
+ ### Ruby Style
124
+ - All Ruby files must start with `# frozen_string_literal: true`
125
+ - Follow existing code patterns and naming conventions
126
+ - Use the Guard setup for continuous testing during development
127
+
128
+ ### Testing
129
+ - RSpec for all testing
130
+ - No `require` statements needed in spec files (handled by spec_helper)
131
+ - VCR for HTTP request mocking (YouTube API calls)
132
+ - SimpleCov for coverage reporting
133
+
134
+ ### File Organization
135
+ - CLI executables in `bin/`
136
+ - Core library code in `lib/appydave/tools/`
137
+ - Tests mirror lib structure in `spec/`
138
+ - Configuration examples and docs in respective `_doc.md` files
139
+
140
+ ## Key Dependencies
141
+ - `google-api-client`: YouTube API integration
142
+ - `ruby-openai`: OpenAI GPT integration
143
+ - `activemodel`: Data validation and modeling
144
+ - `clipboard`: System clipboard operations
145
+ - `dotenv`: Environment variable management
146
+
147
+ ## Configuration Files
148
+ The gem uses JSON configuration for:
149
+ - Channel definitions (code, name, youtube_handle)
150
+ - Project folder paths (content, video, published, abandoned)
151
+ - OpenAI API settings
152
+ - YouTube automation workflows
data/README.md CHANGED
@@ -33,7 +33,52 @@ See all [stories](./STORIES.md)
33
33
 
34
34
  ## Usage
35
35
 
36
- - [GPT Context Gatherer](./docs/usage/gpt-context.md)
36
+ ### CLI Tools
37
+
38
+ This gem provides several command-line tools for content creation and YouTube automation:
39
+
40
+ #### GPT Context Gatherer
41
+ Collect and organize project files for AI context analysis:
42
+
43
+ ```bash
44
+ # Basic usage - gather all Ruby files, exclude specs
45
+ gpt_context -i '**/*.rb' -e 'spec/**/*' -d -o context.txt
46
+
47
+ # Multiple patterns with tree and content output
48
+ gpt_context -i 'lib/**/*.rb' -i 'bin/**/*.rb' -f tree,content -d
49
+
50
+ # Advanced filtering for web projects
51
+ gpt_context -i 'apps/**/*.ts' -i 'apps/**/*.tsx' -e '**/node_modules/**/*' -e '**/_generated/**/*' -d -f tree -o typescript-files.txt
52
+
53
+ # Documentation and config files
54
+ gpt_context -i 'docs/**/*' -i '**/*.json' -i '**/*.config.*' -e '**/node_modules/**/*' -d -f tree
55
+ ```
56
+
57
+ See detailed usage guide: [GPT Context Gatherer](./docs/usage/gpt-context.md)
58
+
59
+ #### YouTube Manager
60
+ ```bash
61
+ # Get video details
62
+ bin/youtube_manager.rb get [options]
63
+
64
+ # Update video metadata
65
+ bin/youtube_manager.rb update [options]
66
+ ```
67
+
68
+ #### Subtitle Manager
69
+ ```bash
70
+ # Clean subtitle files
71
+ bin/subtitle_manager.rb clean [options]
72
+
73
+ # Join multiple subtitle parts
74
+ bin/subtitle_manager.rb join [options]
75
+ ```
76
+
77
+ #### Prompt Tools
78
+ ```bash
79
+ # Run AI prompt completion
80
+ bin/prompt_tools.rb completion [options]
81
+ ```
37
82
 
38
83
 
39
84
  ## Development
@@ -51,8 +96,12 @@ You can also run `bin/console` for an interactive prompt that will allow you to
51
96
  ```bash
52
97
  bin/console
53
98
 
54
- Aaa::Bbb::Program.execute()
55
- # => ""
99
+ Appydave::Tools::VERSION
100
+ # => "0.14.0"
101
+
102
+ # Access configuration
103
+ config = Appydave::Tools::Configuration::Config.new
104
+ # => #<Appydave::Tools::Configuration::Config:...>
56
105
  ```
57
106
 
58
107
  `appydave-tools` is setup with Guard, run `guard`, this will watch development file changes and run tests automatically, if successful, it will then run rubocop for style quality.
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:"
@@ -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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Appydave
4
4
  module Tools
5
- VERSION = '0.13.0'
5
+ VERSION = '0.14.1'
6
6
  end
7
7
  end
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appydave-tools",
3
- "version": "0.13.0",
3
+ "version": "0.14.1",
4
4
  "description": "AppyDave YouTube Automation Tools",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
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.13.0
4
+ version: 0.14.1
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: 2024-12-03 00:00:00.000000000 Z
11
+ date: 2025-08-06 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: '7'
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: '7'
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: '1'
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: '1'
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: k_log
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: ruby-openai
98
+ name: i18n
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '7'
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: '7'
110
+ version: '1.14'
111
111
  - !ruby/object:Gem::Dependency
112
- name: googleauth
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"
@@ -150,6 +165,7 @@ files:
150
165
  - ".rspec"
151
166
  - ".rubocop.yml"
152
167
  - CHANGELOG.md
168
+ - CLAUDE.md
153
169
  - CODE_OF_CONDUCT.md
154
170
  - Gemfile
155
171
  - Guardfile
@@ -167,6 +183,7 @@ files:
167
183
  - bin/subtitle_manager.rb
168
184
  - bin/youtube_automation.rb
169
185
  - bin/youtube_manager.rb
186
+ - docs/dam/overview.md
170
187
  - docs/usage/gpt-context.md
171
188
  - images.log
172
189
  - lib/appydave/tools.rb
@@ -219,7 +236,6 @@ files:
219
236
  - lib/mj-paste-test/main.rb
220
237
  - lib/mj-paste-test/prompts.txt
221
238
  - lib/mj-paste-test/readme-leonardo.md
222
- - package-lock.json
223
239
  - package.json
224
240
  - sig/appydave/tools.rbs
225
241
  homepage: http://appydave.com/gems/appydave-tools
@@ -230,7 +246,7 @@ metadata:
230
246
  source_code_uri: https://github.com/appydave/appydave-tools
231
247
  changelog_uri: https://github.com/appydave/appydave-tools/blob/main/CHANGELOG.md
232
248
  rubygems_mfa_required: 'true'
233
- post_install_message:
249
+ post_install_message:
234
250
  rdoc_options: []
235
251
  require_paths:
236
252
  - lib
@@ -245,8 +261,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
245
261
  - !ruby/object:Gem::Version
246
262
  version: '0'
247
263
  requirements: []
248
- rubygems_version: 3.3.5
249
- signing_key:
264
+ rubygems_version: 3.4.20
265
+ signing_key:
250
266
  specification_version: 4
251
267
  summary: AppyDave YouTube Automation Tools
252
268
  test_files: []