appydave-tools 0.15.0 → 0.16.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.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/CLAUDE.md +113 -29
  4. data/README.md +262 -86
  5. data/bin/subtitle_manager.rb +18 -12
  6. data/bin/subtitle_processor.rb +158 -0
  7. data/docs/archive/codebase-audit-2025-01.md +424 -0
  8. data/docs/archive/documentation-framework-proposal.md +808 -0
  9. data/docs/archive/purpose-and-philosophy.md +110 -0
  10. data/docs/archive/test-coverage-quick-wins.md +342 -0
  11. data/docs/archive/tool-discovery.md +199 -0
  12. data/docs/archive/tool-documentation-analysis.md +592 -0
  13. data/docs/tools/bank-reconciliation.md +269 -0
  14. data/docs/tools/cli-actions.md +444 -0
  15. data/docs/tools/configuration.md +329 -0
  16. data/docs/{usage → tools}/gpt-context.md +118 -7
  17. data/docs/tools/index.md +324 -0
  18. data/docs/tools/move-images.md +295 -0
  19. data/docs/tools/name-manager.md +322 -0
  20. data/docs/tools/prompt-tools.md +209 -0
  21. data/docs/tools/subtitle-processor.md +242 -0
  22. data/docs/tools/youtube-automation.md +258 -0
  23. data/docs/tools/youtube-manager.md +248 -0
  24. data/lib/appydave/tools/{subtitle_manager → subtitle_processor}/clean.rb +1 -1
  25. data/lib/appydave/tools/{subtitle_manager → subtitle_processor}/join.rb +5 -2
  26. data/lib/appydave/tools/version.rb +1 -1
  27. data/lib/appydave/tools.rb +2 -4
  28. data/package.json +1 -1
  29. metadata +29 -12
  30. data/lib/mj-paste-test/main.rb +0 -35
  31. data/lib/mj-paste-test/prompts.txt +0 -18
  32. data/lib/mj-paste-test/readme-leonardo.md +0 -0
  33. /data/lib/appydave/tools/{subtitle_manager → subtitle_processor}/_doc-clean.md +0 -0
  34. /data/lib/appydave/tools/{subtitle_manager → subtitle_processor}/_doc-join.md +0 -0
  35. /data/lib/appydave/tools/{subtitle_manager → subtitle_processor}/_doc-todo.md +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7f220893e70bf53b9a6da3b1a46857c3221f2672aba453616e4bab5b87528d65
4
- data.tar.gz: 1e5aef7918151c423393131dcfc8e2538cd6b95632b2a58dd8f23a1c864f1c06
3
+ metadata.gz: dfc47ae2c891b47ff973f7f5605c18f0d05f98f44045c7b40590d03d63fdf276
4
+ data.tar.gz: cd97470ff0937e41972b1777eabaaaf2da3321e2f0a8d1cd6845125b8a15d705
5
5
  SHA512:
6
- metadata.gz: fe5e90a6677bcb82e0d1af5fde786eba72d2380f1dcbe291b4fe998b239f71c6381bd33b7dfa87755e2b9390d97241387422c84522d3763236e87688668ed861
7
- data.tar.gz: 70abc6727a6e318d329097b42a72fc8de4061965d60e7d33d013fa361b00a1c6e3b9eabe94a7a15a5e993523ea6ba96b69231c83bdae0f030f16ad0ec4a1e50d
6
+ metadata.gz: c2ce45fd490af1172db2e274e733fdb329d9ef143078ada86f90aadc1cc4860bdde91c4ca19cf781dffd128de909118271ce9087657edfd6a7ad98c38ba68b94
7
+ data.tar.gz: 931ca82db8f193bb2b6f581d1691893ac8912949d37384d1a7f2baea35cf7fc90343c2234a259f73f69489a9405bd07c984699c0dc7716416103c65b9e8406bf
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [0.15.0](https://github.com/appydave/appydave-tools/compare/v0.14.1...v0.15.0) (2025-11-08)
2
+
3
+
4
+ ### Features
5
+
6
+ * update claude and git leaks ([0b8212f](https://github.com/appydave/appydave-tools/commit/0b8212fa65a920c608876c4f4f37c166dc552039))
7
+
1
8
  ## [0.14.1](https://github.com/appydave/appydave-tools/compare/v0.14.0...v0.14.1) (2025-08-06)
2
9
 
3
10
 
data/CLAUDE.md CHANGED
@@ -2,9 +2,48 @@
2
2
 
3
3
  This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
4
 
5
+ ## Project Purpose
6
+
7
+ **AppyDave Tools** is a consolidated productivity toolkit built for AppyDave's YouTube content creation workflow. All utilities live in one repository for easier maintenance than managing separate codebases.
8
+
9
+ **📖 See [docs/purpose-and-philosophy.md](./docs/purpose-and-philosophy.md) for complete philosophy and design principles.**
10
+
11
+ **Key Points:**
12
+ - **Consolidated toolkit** - One codebase for easier maintenance
13
+ - **YouTube workflow** - Built specifically for content creator productivity
14
+ - **Single-purpose tools** - Each tool solves one problem independently
15
+ - **Shareable individually** - Tools can be featured in standalone videos
16
+ - **Language flexible** - Currently Ruby, could be rewritten if needed
17
+
5
18
  ## Common Commands
6
19
 
7
20
  ### Development Setup
21
+
22
+ **⚠️ IMPORTANT: Bundler Setup for Claude Code**
23
+
24
+ This project requires Bundler 2.6.2. If you encounter `Could not find 'bundler' (2.6.2)` errors during Claude Code execution:
25
+
26
+ **Automatic fix (recommended):**
27
+ ```bash
28
+ eval "$(rbenv init -)" && gem install bundler:2.6.2
29
+ ```
30
+
31
+ **Make permanent** - Add to your `.zshrc` or `.bashrc`:
32
+ ```bash
33
+ # Add rbenv to PATH and initialize
34
+ eval "$(rbenv init - zsh)"
35
+ ```
36
+
37
+ **For Claude Code:** The `eval "$(rbenv init -)"` command is automatically prepended to bash commands when needed.
38
+
39
+ **Manual verification:**
40
+ ```bash
41
+ which ruby # Should show: /Users/[user]/.rbenv/shims/ruby
42
+ ruby --version # Should show: ruby 3.4.2
43
+ bundler --version # Should show: Bundler version 2.6.2
44
+ ```
45
+
46
+ **Standard setup:**
8
47
  ```bash
9
48
  bin/setup # Install dependencies and setup development environment
10
49
  bin/console # Interactive Ruby console for experimentation
@@ -16,15 +55,15 @@ bin/console # Interactive Ruby console for experimentation
16
55
 
17
56
  #### Quick Reference Index
18
57
 
19
- | Command | Gem Command | Description |
20
- |---------|-------------|-------------|
21
- | **GPT Context** | `gpt_context` | Collect project files for AI context ⭐ |
22
- | **YouTube Manager** | `youtube_manager` | Manage YouTube video metadata via API |
23
- | **Subtitle Manager** | `subtitle_manager` | Process and join SRT subtitle files |
24
- | **Prompt Tools** | `prompt_tools` | AI prompt completion workflows |
25
- | **YouTube Automation** | `youtube_automation` | Automated YouTube workflows with GPT agents |
26
- | **Configuration** | `ad_config` | Manage appydave-tools configuration files |
27
- | **Move Images** | N/A (dev only) | Organize video project images (development tool) |
58
+ | Command | Gem Command | Description | Status |
59
+ |---------|-------------|-------------|--------|
60
+ | **GPT Context** | `gpt_context` | Collect project files for AI context | PRIMARY |
61
+ | **YouTube Manager** | `youtube_manager` | CRUD operations on YouTube video metadata | ACTIVE |
62
+ | **Subtitle Processor** | `subtitle_processor` | Transform SRT files (clean/merge) | ACTIVE |
63
+ | **Configuration** | `ad_config` | Manage JSON configs (channels, paths, sequences) | ✅ ACTIVE |
64
+ | **Move Images** | N/A (dev only) | Organize video asset images | ACTIVE |
65
+ | **Prompt Tools** | `prompt_tools` | OpenAI Completion API wrapper | ⚠️ DEPRECATED API |
66
+ | **YouTube Automation** | `youtube_automation` | Prompt sequence runner | ⚠️ INTERNAL USE |
28
67
 
29
68
  ---
30
69
 
@@ -73,21 +112,25 @@ bin/youtube_manager.rb update --video-id ID --category-id 28
73
112
  - Update video title, description, tags, and category
74
113
  - Generate detailed reports
75
114
 
76
- #### 3. Subtitle Manager (`bin/subtitle_manager.rb`)
115
+ #### 3. Subtitle Processor (`bin/subtitle_processor.rb`)
77
116
  Process and manage SRT subtitle files:
78
117
 
79
118
  ```bash
80
119
  # Clean and normalize SRT files
81
- bin/subtitle_manager.rb clean -f input.srt -o cleaned.srt
120
+ bin/subtitle_processor.rb clean -f input.srt -o cleaned.srt
82
121
 
83
122
  # Join multiple SRT files
84
- bin/subtitle_manager.rb join -d ./subtitles -f "*.srt" -o merged.srt
85
- bin/subtitle_manager.rb join -f "part1.srt,part2.srt" -s asc -b 100 -o final.srt
123
+ bin/subtitle_processor.rb join -d ./subtitles -f "*.srt" -o merged.srt
124
+ bin/subtitle_processor.rb join -f "part1.srt,part2.srt" -s asc -b 100 -o final.srt
86
125
 
87
126
  # Join with options
88
- bin/subtitle_manager.rb join -d ./subs -f "*.srt" -s inferred -b 200 -o output.srt -L detail
127
+ bin/subtitle_processor.rb join -d ./subs -f "*.srt" -s inferred -b 200 -o output.srt -L detail
89
128
  ```
90
129
 
130
+ **Operations:**
131
+ - **clean**: Removes HTML tags (`<u>`), merges duplicate entries, normalizes spacing
132
+ - **join**: Parses multiple SRT files, adjusts timestamps with buffer, merges timeline
133
+
91
134
  **Options:**
92
135
  - `-d, --directory` - Directory containing SRT files
93
136
  - `-f, --files` - File pattern or comma-separated list
@@ -95,22 +138,34 @@ bin/subtitle_manager.rb join -d ./subs -f "*.srt" -s inferred -b 200 -o output.s
95
138
  - `-b, --buffer` - Buffer between files in milliseconds (default: 100)
96
139
  - `-L, --log-level` - Log level: none, info, detail
97
140
 
98
- **Note:** Internal module is called `SubtitleMaster` but CLI tool is `subtitle_manager`
141
+ **Use cases:** Cleaning YouTube auto-captions, merging FliVideo multi-part recording subtitles
99
142
 
100
- #### 4. Prompt Tools (`bin/prompt_tools.rb`)
101
- AI prompt completion workflows:
143
+ **Note:** Renamed from `subtitle_manager` to `subtitle_processor` (accurate - processes files, doesn't manage state)
144
+
145
+ #### 4. Prompt Tools (`bin/prompt_tools.rb`) ⚠️ DEPRECATED API
146
+ OpenAI Completion API wrapper with template support:
102
147
 
103
148
  ```bash
104
- # Run AI prompt completion
105
- bin/prompt_tools.rb completion [options]
149
+ # Run prompt from text
150
+ bin/prompt_tools.rb completion -p "Your prompt" -o output.txt
151
+
152
+ # Run prompt from file with placeholders
153
+ bin/prompt_tools.rb completion -f template.md -k key1=value1,key2=value2 -c
106
154
  ```
107
155
 
108
- **Features:**
109
- - OpenAI GPT integration
110
- - Prompt execution and management
156
+ **What it does:**
157
+ - Sends prompts to OpenAI **Completion API** (older GPT-3 models like `davinci-codex`)
158
+ - Supports template files with `{placeholder}` substitution
159
+ - Outputs to file, clipboard, or stdout
160
+
161
+ **Status:** ⚠️ **Not in active use** - Uses **deprecated OpenAI Completion API**
162
+
163
+ **Modern alternative:** Use ChatGPT/Claude directly or migrate to OpenAI Chat API
164
+
165
+ **Potential use cases:** Template-based content generation (if migrated to Chat API)
111
166
 
112
- #### 5. YouTube Automation (`bin/youtube_automation.rb`)
113
- Automated YouTube workflows using GPT agents:
167
+ #### 5. YouTube Automation (`bin/youtube_automation.rb`) ⚠️ INTERNAL USE
168
+ Prompt sequence runner for content workflows:
114
169
 
115
170
  ```bash
116
171
  # Run automation sequence
@@ -118,6 +173,21 @@ bin/youtube_automation.rb -s 01-1
118
173
  bin/youtube_automation.rb -s 01-1 -d # with debug output
119
174
  ```
120
175
 
176
+ **What it does:**
177
+ - Loads sequence config from `~/.config/appydave/youtube_automation.json`
178
+ - Reads prompt templates from Dropbox path (`_common/raw_prompts/`)
179
+ - Executes OpenAI Completion API calls
180
+ - Saves responses to output files
181
+
182
+ **Requirements:**
183
+ - Sequence definitions in JSON config
184
+ - Prompt template files in configured Dropbox location
185
+ - `OPENAI_ACCESS_TOKEN` environment variable
186
+
187
+ **Status:** ⚠️ **Internal tool** - Hardcoded paths, deprecated API, not documented for external use
188
+
189
+ **Relationship to Move Images:** These are separate tools - Move Images organizes downloaded images into video asset folders
190
+
121
191
  **Options:**
122
192
  - `-s, --sequence` - Sequence number (required, e.g., 01-1)
123
193
  - `-d, --debug` - Enable debug mode
@@ -140,9 +210,15 @@ bin/configuration.rb -e
140
210
  ```
141
211
 
142
212
  **Configuration Types:**
143
- - **settings** - General settings and paths
213
+ - **settings** - General settings and paths (project folders: content, video, published, abandoned)
144
214
  - **channels** - YouTube channel definitions (code, name, youtube_handle)
145
- - **youtube_automation** - Automation workflow configurations
215
+ - **youtube_automation** - Automation workflow configurations (prompt sequences)
216
+
217
+ **Team Collaboration Features:**
218
+ - **Shareable configs**: JSON files can be version-controlled (no secrets included)
219
+ - **Per-developer paths**: Each team member customizes paths in their `~/.config/appydave/`
220
+ - **Consistent structure**: Same channel codes/names across team
221
+ - **Secrets separation**: API keys stored in `.env` files (gitignored), not in configs
146
222
 
147
223
  #### 7. Move Images (`bin/move_images.rb`)
148
224
  Organize and rename downloaded images into video project asset folders.
@@ -210,12 +286,20 @@ gem build # Build gemspec into .gem file
210
286
 
211
287
  ## Architecture Overview
212
288
 
213
- This is a Ruby gem called `appydave-tools` that provides YouTube automation and content creation tools.
289
+ `appydave-tools` is AppyDave's consolidated productivity toolkit for YouTube content creation. Single-purpose utilities in one repository for easier maintenance than separate codebases.
290
+
291
+ **Philosophy:** See [docs/purpose-and-philosophy.md](./docs/purpose-and-philosophy.md) for project philosophy and design principles.
292
+
293
+ **Tool Categories:**
294
+ - AI & Context Management (GPT Context, Prompt Tools)
295
+ - Content & Media (Subtitles, YouTube Manager, YouTube Automation, Move Images)
296
+ - Configuration (Multi-channel config management)
214
297
 
215
298
  ### Core Structure
216
299
  - **CLI Tools**: Multiple executable scripts in `bin/` for different functionalities
217
300
  - **Modular Design**: Organized into focused modules under `lib/appydave/tools/`
218
- - **Configuration System**: Flexible config management with channel and project settings
301
+ - **Independent Operation**: Each tool solves a specific problem standalone
302
+ - **Configuration System**: Flexible config management for multi-project workflows
219
303
  - **Type System**: Custom type classes for data validation and transformation
220
304
 
221
305
  ### Key Components
@@ -242,7 +326,7 @@ This is a Ruby gem called `appydave-tools` that provides YouTube automation and
242
326
  - Caption/subtitle management
243
327
  - Detailed reporting capabilities
244
328
 
245
- #### Subtitle Management (`lib/appydave/tools/subtitle_manager/`)
329
+ #### Subtitle Management (`lib/appydave/tools/subtitle_processor/`)
246
330
  - SRT file cleaning and normalization
247
331
  - Multi-part subtitle joining
248
332
  - Timeline synchronization
data/README.md CHANGED
@@ -1,157 +1,333 @@
1
- # Appydave Tools
1
+ # AppyDave Tools
2
2
 
3
- > AppyDave YouTube Automation Tools
3
+ > **AppyDave's YouTube productivity toolkit** - Command-line utilities that automate the boring stuff so you can focus on creating content.
4
+
5
+ ## Why This Exists
6
+
7
+ As a YouTuber, I got tired of repetitive tasks eating into my creative time. So I built tools to handle them.
8
+
9
+ Instead of managing dozens of separate repositories, everything lives here - one codebase, easier maintenance, and each tool can be featured in its own video tutorial.
10
+
11
+ **Quick wins:**
12
+ - 🤖 Feed entire codebases to AI assistants in seconds
13
+ - 📹 Batch update YouTube video metadata without clicking through the UI (update 50 videos in 5 minutes)
14
+ - 📝 Process subtitle files - clean formatting, merge multi-part recordings, synchronize timelines
15
+ - 🖼️ Organize downloaded images into project folders automatically (video asset workflow)
16
+ - ⚙️ Manage multi-channel configurations from the command line (team-shareable JSON configs)
4
17
 
5
18
  ## Installation
6
19
 
7
- Add this line to your application's Gemfile:
20
+ ```bash
21
+ gem install appydave-tools
22
+ ```
23
+
24
+ Or add to your Gemfile:
8
25
 
9
26
  ```ruby
10
27
  gem 'appydave-tools'
11
28
  ```
12
29
 
13
- And then execute:
30
+ ## The Tools
31
+
32
+ ### 🤖 GPT Context Gatherer
33
+
34
+ **The problem:** AI assistants need context about your code, but copying files is tedious.
35
+
36
+ **The solution:** Automatically collect and format project files for AI context.
14
37
 
15
38
  ```bash
16
- bundle install
39
+ # Gather all Ruby files, skip tests, save to clipboard
40
+ gpt_context -i '**/*.rb' -e 'spec/**/*' -d
41
+
42
+ # Get project structure as a tree
43
+ gpt_context -i '**/*' -f tree -d
44
+
45
+ # Multiple file types with custom output
46
+ gpt_context -i 'apps/**/*.ts' -i 'apps/**/*.tsx' -e '**/node_modules/**/*' -o context.txt
17
47
  ```
18
48
 
19
- Or install it yourself as:
49
+ **Use cases:** Working with ChatGPT, Claude, or any AI assistant on your codebase.
50
+
51
+ [Full documentation →](./docs/usage/gpt-context.md)
52
+
53
+ ---
54
+
55
+ ### 📹 YouTube Manager
56
+
57
+ **The problem:** Updating video metadata through YouTube Studio is slow and repetitive, especially for bulk operations.
58
+
59
+ **The solution:** Manage YouTube video metadata via API from your terminal - CRUD operations on videos.
20
60
 
21
61
  ```bash
22
- gem install appydave-tools
23
- ```
62
+ # Get video details (title, description, tags, category, captions)
63
+ youtube_manager get --video-id YOUR_VIDEO_ID
24
64
 
25
- ## Stories
65
+ # Update title and description
66
+ youtube_manager update --video-id YOUR_VIDEO_ID \
67
+ --title "New Title" \
68
+ --description "Updated description"
26
69
 
27
- ### Main Story
70
+ # Update tags (replaces existing tags)
71
+ youtube_manager update --video-id YOUR_VIDEO_ID --tags "tutorial,productivity,automation"
28
72
 
29
- As a Content Creator, I want accellerate my video creation, so that I can improve speed and quality of my content
73
+ # Update category
74
+ youtube_manager update --video-id YOUR_VIDEO_ID --category-id 28
75
+ ```
30
76
 
31
- See all [stories](./STORIES.md)
77
+ **Specific use cases:**
78
+ - **Post-rebrand updates**: Changed channel name? Update 50 video descriptions in minutes
79
+ - **Tag standardization**: Ensure consistent tagging across your entire catalog
80
+ - **Metadata retrieval**: Export video details for analysis or backup
81
+ - **Batch corrections**: Fix typos in titles across multiple videos
82
+ - **Category changes**: Recategorize videos when YouTube updates categories
83
+ - **Series updates**: Add series links to descriptions across episode batches
32
84
 
85
+ **What it does:**
86
+ - **Get**: Retrieves complete video metadata including captions
87
+ - **Update**: Modifies title, description, tags, or category via YouTube Data API v3
88
+ - **Authorization**: Handles OAuth2 flow with local callback server
89
+ - **Reporting**: Generates detailed reports of video metadata
33
90
 
34
- ## Usage
91
+ **Why use this vs YouTube Studio:**
92
+ - **Speed**: Update 20 videos in 5 minutes vs 30+ minutes clicking through UI
93
+ - **Scriptable**: Integrate into automation workflows
94
+ - **Bulk operations**: Loop through video IDs from a CSV
95
+ - **Version control**: Track metadata changes in Git
96
+ - **Backup**: Export all video metadata as JSON
35
97
 
36
- ### CLI Tools
98
+ ---
37
99
 
38
- This gem provides several command-line tools for content creation and YouTube automation:
100
+ ### 📝 Subtitle Processor
39
101
 
40
- #### GPT Context Gatherer
41
- Collect and organize project files for AI context analysis:
102
+ **The problem:** Raw subtitle files need cleanup, and multi-part recordings need merged subtitles.
42
103
 
43
- ```bash
44
- # Basic usage - gather all Ruby files, exclude specs
45
- gpt_context -i '**/*.rb' -e 'spec/**/*' -d -o context.txt
104
+ **The solution:** Process and transform SRT files - clean formatting, merge duplicates, synchronize timelines.
46
105
 
47
- # Multiple patterns with tree and content output
48
- gpt_context -i 'lib/**/*.rb' -i 'bin/**/*.rb' -f tree,content -d
106
+ ```bash
107
+ # Clean auto-generated subtitles (removes HTML tags, merges duplicates, normalizes spacing)
108
+ subtitle_processor clean -f input.srt -o cleaned.srt
49
109
 
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
110
+ # Merge multiple subtitle files with timeline synchronization
111
+ subtitle_processor join -d ./parts -f "*.srt" -o final.srt
52
112
 
53
- # Documentation and config files
54
- gpt_context -i 'docs/**/*' -i '**/*.json' -i '**/*.config.*' -e '**/node_modules/**/*' -d -f tree
113
+ # Custom time buffer between merged sections (in milliseconds)
114
+ subtitle_processor join -f "part1.srt,part2.srt" -b 200 -o merged.srt
55
115
  ```
56
116
 
57
- See detailed usage guide: [GPT Context Gatherer](./docs/usage/gpt-context.md)
117
+ **What it does:**
118
+ - **Clean**: Removes `<u>` tags, merges duplicate entries, normalizes line breaks and spacing
119
+ - **Join**: Parses multiple SRT files, adjusts timestamps with buffers, merges into single timeline
58
120
 
59
- #### YouTube Manager
60
- ```bash
61
- # Get video details
62
- bin/youtube_manager.rb get [options]
121
+ **Use cases:** Cleaning messy YouTube auto-captions, merging FliVideo multi-part recording subtitles.
122
+
123
+ **Note:** CLI command is `subtitle_processor` (renamed from `subtitle_manager` for accuracy - this tool *processes* files, not manages state).
124
+
125
+ ---
126
+
127
+ ### 🎯 Prompt Tools *(Experimental - Not actively used)*
128
+
129
+ **The problem:** Running OpenAI prompts with placeholder substitution and output management.
130
+
131
+ **The solution:** Execute OpenAI completion API calls with template support.
63
132
 
64
- # Update video metadata
65
- bin/youtube_manager.rb update [options]
133
+ ```bash
134
+ # Run prompt from text
135
+ prompt_tools completion -p "Your prompt here" -o output.txt
136
+
137
+ # Run prompt from file with placeholders
138
+ prompt_tools completion -f prompt_template.md -k topic=Ruby,style=tutorial -c
139
+
140
+ # Options:
141
+ # -p, --prompt Inline prompt text
142
+ # -f, --file Prompt template file
143
+ # -k, --placeholders Key-value pairs for {placeholder} substitution
144
+ # -o, --output Save to file
145
+ # -c, --clipboard Copy to clipboard
146
+ # -m, --model OpenAI model to use
66
147
  ```
67
148
 
68
- #### Subtitle Manager
149
+ **What it does:**
150
+ - Sends prompts to OpenAI Completion API (older GPT-3 models)
151
+ - Supports template files with `{placeholder}` substitution
152
+ - Outputs to file, clipboard, or stdout
153
+
154
+ **Current status:** ⚠️ **Not in active use** - Uses deprecated OpenAI Completion API (`davinci-codex`). Modern alternative: Use ChatGPT or Claude directly, or migrate to Chat API.
155
+
156
+ **Potential use cases:** Template-based content generation, automated prompt workflows (if migrated to Chat API).
157
+
158
+ ---
159
+
160
+ ### ⚡ YouTube Automation *(Internal/Experimental)*
161
+
162
+ **The problem:** Video content creation workflows involve multiple steps: research → scripting → production.
163
+
164
+ **The solution:** Run predefined prompt sequences against OpenAI API to automate research and content generation steps.
165
+
69
166
  ```bash
70
- # Clean subtitle files
71
- bin/subtitle_manager.rb clean [options]
167
+ # Run automation sequence (requires configuration)
168
+ youtube_automation -s 01-1
72
169
 
73
- # Join multiple subtitle parts
74
- bin/subtitle_manager.rb join [options]
170
+ # With debug output
171
+ youtube_automation -s 01-1 -d
75
172
  ```
76
173
 
77
- #### Prompt Tools
174
+ **What it does:**
175
+ - Loads sequence configuration from `~/.config/appydave/youtube_automation.json`
176
+ - Reads prompt templates from Dropbox (`_common/raw_prompts/`)
177
+ - Executes OpenAI API calls for each sequence step
178
+ - Saves responses to output files
179
+
180
+ **Configuration required:**
181
+ - Sequence definitions in `youtube_automation.json`
182
+ - Prompt template files in configured Dropbox path
183
+ - `OPENAI_ACCESS_TOKEN` environment variable
184
+
185
+ **Current status:** ⚠️ **Internal tool** - Hardcoded Dropbox paths, uses deprecated Completion API, not documented for external use.
186
+
187
+ **Relationship to other tools:** This is separate from **Move Images** tool (which organizes downloaded images into video project asset folders).
188
+
189
+ **Use cases:** Automated content research, script outline generation, multi-step prompt workflows.
190
+
191
+ ---
192
+
193
+ ### ⚙️ Configuration Manager
194
+
195
+ **The problem:** Managing settings for multiple YouTube channels, project paths, and automation sequences gets messy.
196
+
197
+ **The solution:** Centralized JSON-based configuration stored in `~/.config/appydave/`.
198
+
78
199
  ```bash
79
- # Run AI prompt completion
80
- bin/prompt_tools.rb completion [options]
200
+ # List all configurations
201
+ ad_config -l
202
+
203
+ # Create missing config files with templates
204
+ ad_config -c
205
+
206
+ # Edit configurations in VS Code
207
+ ad_config -e
208
+
209
+ # View specific configuration values
210
+ ad_config -p settings,channels
211
+
212
+ # View all configurations
213
+ ad_config -p
81
214
  ```
82
215
 
216
+ **What it manages:**
217
+ - **settings.json**: Project folder paths (content, video, published, abandoned)
218
+ - **channels.json**: YouTube channel definitions (code, name, youtube_handle)
219
+ - **youtube_automation.json**: Automation sequence configurations
83
220
 
84
- ## Development
221
+ **Use cases:**
222
+ - **Multi-channel management**: Switch between different YouTube channels
223
+ - **Team collaboration**: Share configuration files via Git/Dropbox (excluding secrets)
224
+ - **Workflow standardization**: Consistent paths across team members
225
+ - **Automation setup**: Define reusable prompt sequences
226
+
227
+ **Team collaboration notes:**
228
+ - Configuration files can be version-controlled (they contain no secrets)
229
+ - Each team member can maintain their own `~/.config/appydave/` directory
230
+ - Paths can be customized per developer machine
231
+ - Secrets (API keys) stored separately in `.env` files (gitignored)
232
+
233
+ ---
85
234
 
86
- Checkout the repo
235
+ ### 🖼️ Move Images *(Development tool)*
236
+
237
+ **The problem:** Downloaded images need organizing with proper naming.
238
+
239
+ **The solution:** Batch move and rename to project folders.
87
240
 
88
241
  ```bash
89
- git clone https://github.com/appydave/appydave-tools
242
+ # Organize intro images for video project
243
+ bin/move_images.rb -f b40 intro b40
244
+ # Result: b40-intro-1.jpg, b40-intro-2.jpg in assets/intro/
90
245
  ```
91
246
 
92
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests.
247
+ **Use cases:** B-roll organization, thumbnail preparation.
93
248
 
94
- You can also run `bin/console` for an interactive prompt that will allow you to experiment.
249
+ ---
95
250
 
96
- ```bash
97
- bin/console
251
+ ## Philosophy
98
252
 
99
- Appydave::Tools::VERSION
100
- # => "0.14.0"
253
+ **One codebase, multiple tools.** Easier to maintain than dozens of repos.
101
254
 
102
- # Access configuration
103
- config = Appydave::Tools::Configuration::Config.new
104
- # => #<Appydave::Tools::Configuration::Config:...>
105
- ```
255
+ **Single-purpose utilities.** Each tool does one thing well.
256
+
257
+ **YouTube workflow focus.** Built for content creators who code.
258
+
259
+ **Language-agnostic.** Currently Ruby, but could be rewritten if needed.
260
+
261
+ [Read the full philosophy →](./docs/purpose-and-philosophy.md)
106
262
 
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.
263
+ ---
108
264
 
109
- To release a new version, update the version number in `version.rb`, build the gem and push the `.gem` file to [rubygems.org](https://rubygems.org).
265
+ ## Development
110
266
 
111
267
  ```bash
112
- rake publish
113
- rake clean
268
+ # Clone the repo
269
+ git clone https://github.com/appydave/appydave-tools
270
+
271
+ # Setup
272
+ bin/setup
273
+
274
+ # Run tests
275
+ rake spec
276
+
277
+ # Auto-run tests on file changes
278
+ guard
279
+
280
+ # Interactive console
281
+ bin/console
114
282
  ```
115
283
 
116
- ## Git helpers used by this project
284
+ ### Semantic Versioning
117
285
 
118
- Add the follow helpers to your `alias` file
286
+ This project uses **automated versioning** via semantic-release. Don't manually edit version files.
119
287
 
288
+ **Commit message format:**
120
289
  ```bash
121
- function kcommit()
122
- {
123
- echo 'git add .'
124
- git add .
125
- echo "git commit -m "$1""
126
- git commit -m "$1"
127
- echo 'git pull'
128
- git pull
129
- echo 'git push'
130
- git push
131
- sleep 3
132
- run_id="$(gh run list --limit 1 | grep -Eo "[0-9]{9,11}")"
133
- gh run watch $run_id --exit-status && echo "run completed and successful" && git pull && git tag | sort -V | tail -1
134
- }
135
- function kchore () { kcommit "chore: $1" }
136
- function kdocs () { kcommit "docs: $1" }
137
- function kfix () { kcommit "fix: $1" }
138
- function kfeat () { kcommit "feat: $1" }
139
- function ktest () { kcommit "test: $1" }
140
- function krefactor () { kcommit "refactor: $1" }
290
+ feat: add new feature # Minor version bump
291
+ fix: bug fix # Patch version bump
292
+ chore: maintenance # No version bump
293
+
294
+ # Breaking changes
295
+ feat!: breaking change
141
296
  ```
142
297
 
298
+ CI/CD automatically handles versioning, changelog, and RubyGems publishing.
299
+
300
+ ---
301
+
143
302
  ## Contributing
144
303
 
145
- Bug reports and pull requests are welcome on GitHub at https://github.com/appydave/appydave-tools. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
304
+ **Welcome:**
305
+ - 🐛 Bug fixes
306
+ - 📝 Documentation improvements
307
+ - ⚡ Performance enhancements
308
+ - 🎯 New single-purpose tools that fit the workflow
309
+
310
+ **Not looking for:**
311
+ - ❌ Framework-style architectures
312
+ - ❌ Tools that create dependencies between utilities
313
+ - ❌ Enterprise complexity
314
+
315
+ [Code of Conduct →](./CODE_OF_CONDUCT.md)
316
+
317
+ ---
146
318
 
147
319
  ## License
148
320
 
149
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
321
+ MIT License - Copyright (c) David Cruwys
322
+
323
+ See [LICENSE.txt](LICENSE.txt) for details.
150
324
 
151
- ## Code of Conduct
325
+ ---
152
326
 
153
- Everyone interacting in the Appydave Tools project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/appydave/appydave-tools/blob/master/CODE_OF_CONDUCT.md).
327
+ ## Connect
154
328
 
155
- ## Copyright
329
+ - 🌐 Website: [appydave.com](http://appydave.com)
330
+ - 📺 YouTube: [@AppyDave](https://youtube.com/@appydave)
331
+ - 🐙 GitHub: [appydave](https://github.com/appydave)
156
332
 
157
- Copyright (c) David Cruwys. See [MIT License](LICENSE.txt) for further details.
333
+ Built with by [David Cruwys](https://davidcruwys.com)