appydave-tools 0.15.0 → 0.17.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/.rubocop.yml +6 -0
- data/AGENTS.md +22 -0
- data/CHANGELOG.md +19 -0
- data/CLAUDE.md +318 -79
- data/README.md +390 -81
- data/bin/archive_project.rb +249 -0
- data/bin/configuration.rb +21 -1
- data/bin/generate_manifest.rb +357 -0
- data/bin/subtitle_manager.rb +18 -12
- data/bin/subtitle_processor.rb +158 -0
- data/bin/sync_from_ssd.rb +236 -0
- data/bin/vat +623 -0
- data/docs/README.md +169 -0
- data/docs/archive/codebase-audit-2025-01.md +424 -0
- data/docs/archive/documentation-framework-proposal.md +808 -0
- data/docs/archive/purpose-and-philosophy.md +110 -0
- data/docs/archive/test-coverage-quick-wins.md +342 -0
- data/docs/archive/tool-discovery.md +199 -0
- data/docs/archive/tool-documentation-analysis.md +592 -0
- data/docs/configuration/.env.example +19 -0
- data/docs/configuration/README.md +394 -0
- data/docs/configuration/channels.example.json +26 -0
- data/docs/configuration/settings.example.json +6 -0
- data/docs/development/CODEX-recommendations.md +123 -0
- data/docs/development/README.md +100 -0
- data/docs/development/cli-architecture-patterns.md +1604 -0
- data/docs/development/pattern-comparison.md +284 -0
- data/docs/prd-unified-brands-configuration.md +792 -0
- data/docs/project-brand-systems-analysis.md +934 -0
- data/docs/tools/bank-reconciliation.md +269 -0
- data/docs/tools/cli-actions.md +444 -0
- data/docs/tools/configuration.md +329 -0
- data/docs/{usage → tools}/gpt-context.md +118 -7
- data/docs/tools/index.md +324 -0
- data/docs/tools/move-images.md +295 -0
- data/docs/tools/name-manager.md +322 -0
- data/docs/tools/prompt-tools.md +209 -0
- data/docs/tools/subtitle-processor.md +242 -0
- data/docs/tools/youtube-automation.md +258 -0
- data/docs/tools/youtube-manager.md +248 -0
- data/docs/vat/dam-vision.md +123 -0
- data/docs/vat/session-summary-2025-11-09.md +297 -0
- data/docs/vat/usage.md +508 -0
- data/docs/vat/vat-testing-plan.md +801 -0
- data/lib/appydave/tools/configuration/models/brands_config.rb +238 -0
- data/lib/appydave/tools/configuration/models/config_base.rb +7 -0
- data/lib/appydave/tools/configuration/models/settings_config.rb +4 -0
- data/lib/appydave/tools/{subtitle_manager → subtitle_processor}/clean.rb +1 -1
- data/lib/appydave/tools/{subtitle_manager → subtitle_processor}/join.rb +5 -2
- data/lib/appydave/tools/vat/config.rb +153 -0
- data/lib/appydave/tools/vat/config_loader.rb +91 -0
- data/lib/appydave/tools/vat/manifest_generator.rb +239 -0
- data/lib/appydave/tools/vat/project_listing.rb +198 -0
- data/lib/appydave/tools/vat/project_resolver.rb +132 -0
- data/lib/appydave/tools/vat/s3_operations.rb +560 -0
- data/lib/appydave/tools/version.rb +1 -1
- data/lib/appydave/tools.rb +11 -5
- data/package.json +1 -1
- metadata +85 -14
- data/docs/dam/overview.md +0 -28
- data/lib/mj-paste-test/main.rb +0 -35
- data/lib/mj-paste-test/prompts.txt +0 -18
- data/lib/mj-paste-test/readme-leonardo.md +0 -0
- /data/lib/appydave/tools/{subtitle_manager → subtitle_processor}/_doc-clean.md +0 -0
- /data/lib/appydave/tools/{subtitle_manager → subtitle_processor}/_doc-join.md +0 -0
- /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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '0819e2db66666e4729144ba1a8dac0032a5b323f4475f9cdc84459aa9309cd49'
|
|
4
|
+
data.tar.gz: ce1185ecbf19793175fa91f4a5c3e401df36394349ec454c7c47fa38e2193727
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d1c6e936fa7d41f160152cf3e037485c9c0e509377f81970df9295cb38bdcc33bfea489da5ab666baa87042d645d609f35048b96826241bc636097c192525015
|
|
7
|
+
data.tar.gz: b4accc9229eda2cd3777f6828e2a3b6988208033a1a5df55f5c487519321a76845cf908fac1056598231973c26d8a9866ab311307157b30dcac472534d42465f
|
data/.rubocop.yml
CHANGED
data/AGENTS.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Repository Guidelines
|
|
2
|
+
|
|
3
|
+
## Project Structure & Module Organization
|
|
4
|
+
Core Ruby code lives in `lib/appydave/tools/` with one folder per CLI (gpt_context, youtube_manager, subtitle_processor, etc.). Executables in `bin/` are for development helpers, while packaged entrypoints reside in `exe/`. Specs mirror the library layout under `spec/`, supported by sample data in `spec/samples/`. Shared docs and walkthroughs are collected under `docs/`. Temporary or generated artifacts (`coverage/`, `tmp/`, `transient/`) should stay out of commits.
|
|
5
|
+
|
|
6
|
+
## Build, Test, and Development Commands
|
|
7
|
+
`bin/setup` installs gem dependencies and any Node helpers declared in `package.json`. Run `bundle exec rake spec` (aliased as `rake spec`) for the full test suite, and keep `guard` running during feature work to auto-rerun specs. Use `bundle exec rubocop` to enforce lint rules, and `bin/console` for an interactive Pry session preloaded with the gem. CLI binaries can be invoked directly, e.g., `bin/gpt_context.rb -i '**/*.rb' -d`.
|
|
8
|
+
|
|
9
|
+
## Coding Style & Naming Conventions
|
|
10
|
+
The codebase targets Ruby 2.7 with two-space indentation and descriptive method names. Follow `.rubocop.yml`: 200-character line limit, relaxed metrics inside `spec/`, and RuboCop RSpec/Rake plugins enabled. Namespaces follow `AppyDave::Tools::<Feature>` inside `lib/`, and CLI filenames stay snake_case (`bin/move_images.rb`). Prefer keyword args, early returns, and guard clauses over deeply nested conditionals.
|
|
11
|
+
|
|
12
|
+
## Testing Guidelines
|
|
13
|
+
RSpec is the canonical framework. Name files `*_spec.rb` that mirror lib paths (e.g., `spec/gpt_context/collector_spec.rb`). Isolate behavior with `describe '#method'` blocks, keep helpers in `spec/support`, and favor `let`/`let!` over global state. Run focused tests via `bundle exec rspec spec/path/to/file_spec.rb` when iterating, then finish with `rake spec`. Add regression tests for every bug fix to keep CLI behavior stable.
|
|
14
|
+
|
|
15
|
+
## Commit & Pull Request Guidelines
|
|
16
|
+
Commits follow conventional commits consumed by semantic-release (`feat:`, `fix:`, `chore:`, `feat!:`, etc.). Scope messages to a single tool when possible (`fix(subtitle_processor): correct offset buffer`). Before opening a PR, ensure `rake spec` and `rubocop` pass, summarize the change, link issues or YouTube scripts, and include CLI output or screenshots if user-facing behavior shifts. Leave follow-up tasks in checklists so reviewers can track outstanding work.
|
|
17
|
+
|
|
18
|
+
## Agent Coordination
|
|
19
|
+
Claude is the primary automation agent; align with the collaboration notes in `CLAUDE.md` before introducing new flows or prompt templates. When scripting repeatable tasks (gpt_context runs, metadata syncs), document the expected Claude inputs/outputs so the agent can reproduce them. Flag breaking CLI changes in PR descriptions with a dedicated **Claude Impact** subsection to keep downstream automations in sync.
|
|
20
|
+
|
|
21
|
+
## Security & Configuration Tips
|
|
22
|
+
Keep API keys and OAuth secrets in `.env` or `~/.config/appydave/` (managed via `ad_config`). Never commit those files; `.gitignore` already excludes them. Validate YouTube API changes against a test channel before touching production content, and rotate credentials when machines change owners.
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
# [0.16.0](https://github.com/appydave/appydave-tools/compare/v0.15.0...v0.16.0) (2025-11-08)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* fix cops ([6c1d59b](https://github.com/appydave/appydave-tools/commit/6c1d59bd870af519825556f7304d6ca1677d8649))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* update documentation and general purpose rename and fixes via claude ([027c3df](https://github.com/appydave/appydave-tools/commit/027c3dff11e572359e6f2d1ebc17010dc3b8d7ee))
|
|
12
|
+
|
|
13
|
+
# [0.15.0](https://github.com/appydave/appydave-tools/compare/v0.14.1...v0.15.0) (2025-11-08)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* update claude and git leaks ([0b8212f](https://github.com/appydave/appydave-tools/commit/0b8212fa65a920c608876c4f4f37c166dc552039))
|
|
19
|
+
|
|
1
20
|
## [0.14.1](https://github.com/appydave/appydave-tools/compare/v0.14.0...v0.14.1) (2025-08-06)
|
|
2
21
|
|
|
3
22
|
|
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,16 @@ 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` |
|
|
23
|
-
| **Subtitle
|
|
24
|
-
| **
|
|
25
|
-
| **
|
|
26
|
-
| **
|
|
27
|
-
| **
|
|
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
|
+
| **VAT (Video Asset Tools)** | `vat` | Multi-tenant video project storage orchestration | ✅ ACTIVE |
|
|
64
|
+
| **Configuration** | `ad_config` | Manage JSON configs (channels, paths, sequences) | ✅ ACTIVE |
|
|
65
|
+
| **Move Images** | N/A (dev only) | Organize video asset images | ✅ ACTIVE |
|
|
66
|
+
| **Prompt Tools** | `prompt_tools` | OpenAI Completion API wrapper | ⚠️ DEPRECATED API |
|
|
67
|
+
| **YouTube Automation** | `youtube_automation` | Prompt sequence runner | ⚠️ INTERNAL USE |
|
|
28
68
|
|
|
29
69
|
---
|
|
30
70
|
|
|
@@ -73,21 +113,25 @@ bin/youtube_manager.rb update --video-id ID --category-id 28
|
|
|
73
113
|
- Update video title, description, tags, and category
|
|
74
114
|
- Generate detailed reports
|
|
75
115
|
|
|
76
|
-
#### 3. Subtitle
|
|
116
|
+
#### 3. Subtitle Processor (`bin/subtitle_processor.rb`)
|
|
77
117
|
Process and manage SRT subtitle files:
|
|
78
118
|
|
|
79
119
|
```bash
|
|
80
120
|
# Clean and normalize SRT files
|
|
81
|
-
bin/
|
|
121
|
+
bin/subtitle_processor.rb clean -f input.srt -o cleaned.srt
|
|
82
122
|
|
|
83
123
|
# Join multiple SRT files
|
|
84
|
-
bin/
|
|
85
|
-
bin/
|
|
124
|
+
bin/subtitle_processor.rb join -d ./subtitles -f "*.srt" -o merged.srt
|
|
125
|
+
bin/subtitle_processor.rb join -f "part1.srt,part2.srt" -s asc -b 100 -o final.srt
|
|
86
126
|
|
|
87
127
|
# Join with options
|
|
88
|
-
bin/
|
|
128
|
+
bin/subtitle_processor.rb join -d ./subs -f "*.srt" -s inferred -b 200 -o output.srt -L detail
|
|
89
129
|
```
|
|
90
130
|
|
|
131
|
+
**Operations:**
|
|
132
|
+
- **clean**: Removes HTML tags (`<u>`), merges duplicate entries, normalizes spacing
|
|
133
|
+
- **join**: Parses multiple SRT files, adjusts timestamps with buffer, merges timeline
|
|
134
|
+
|
|
91
135
|
**Options:**
|
|
92
136
|
- `-d, --directory` - Directory containing SRT files
|
|
93
137
|
- `-f, --files` - File pattern or comma-separated list
|
|
@@ -95,22 +139,100 @@ bin/subtitle_manager.rb join -d ./subs -f "*.srt" -s inferred -b 200 -o output.s
|
|
|
95
139
|
- `-b, --buffer` - Buffer between files in milliseconds (default: 100)
|
|
96
140
|
- `-L, --log-level` - Log level: none, info, detail
|
|
97
141
|
|
|
98
|
-
**
|
|
142
|
+
**Use cases:** Cleaning YouTube auto-captions, merging FliVideo multi-part recording subtitles
|
|
143
|
+
|
|
144
|
+
**Note:** Renamed from `subtitle_manager` to `subtitle_processor` (accurate - processes files, doesn't manage state)
|
|
145
|
+
|
|
146
|
+
#### 4. VAT - Video Asset Tools (`bin/vat`)
|
|
147
|
+
Multi-tenant video project storage orchestration:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# List all brands
|
|
151
|
+
vat list
|
|
152
|
+
|
|
153
|
+
# List projects for a brand
|
|
154
|
+
vat list appydave
|
|
155
|
+
vat list appydave 'b6*' # Pattern matching
|
|
156
|
+
|
|
157
|
+
# Upload to S3 (collaboration)
|
|
158
|
+
vat s3-up appydave b65
|
|
159
|
+
vat s3-up voz boy-baker --dry-run
|
|
160
|
+
|
|
161
|
+
# Download from S3
|
|
162
|
+
vat s3-down appydave b65
|
|
163
|
+
vat s3-down --dry-run # Auto-detect from PWD
|
|
164
|
+
|
|
165
|
+
# Check sync status
|
|
166
|
+
vat s3-status appydave b65
|
|
167
|
+
|
|
168
|
+
# Clean up S3
|
|
169
|
+
vat s3-cleanup appydave b65 --force
|
|
99
170
|
|
|
100
|
-
|
|
101
|
-
|
|
171
|
+
# Archive to SSD
|
|
172
|
+
vat archive appydave b63
|
|
173
|
+
|
|
174
|
+
# Sync from SSD
|
|
175
|
+
vat sync-ssd appydave
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**Core Features:**
|
|
179
|
+
- **Multi-tenant**: Manages 6 brands (appydave, voz, aitldr, kiros, joy, ss)
|
|
180
|
+
- **Smart sync**: MD5-based file comparison (skips unchanged files)
|
|
181
|
+
- **Pattern matching**: `'b6*'` expands to b60-b69 projects
|
|
182
|
+
- **Short names**: `b65` → `b65-guy-monroe-marketing-plan` (FliVideo pattern)
|
|
183
|
+
- **Auto-detection**: Detects brand/project from current directory
|
|
184
|
+
- **Hybrid storage**: Local → S3 (90-day collaboration) → SSD (archive)
|
|
185
|
+
|
|
186
|
+
**Brand Shortcuts:**
|
|
187
|
+
- `appydave` → `v-appydave`
|
|
188
|
+
- `voz` → `v-voz`
|
|
189
|
+
- `aitldr` → `v-aitldr`
|
|
190
|
+
- `kiros` → `v-kiros`
|
|
191
|
+
- `joy` → `v-beauty-and-joy`
|
|
192
|
+
- `ss` → `v-supportsignal`
|
|
193
|
+
|
|
194
|
+
**Workflows:**
|
|
195
|
+
- **FliVideo** (AppyDave): Sequential chapter recording, short name support (`b65`)
|
|
196
|
+
- **Storyline** (VOZ, AITLDR): Script-first content, full project names (`boy-baker`)
|
|
197
|
+
|
|
198
|
+
**Use cases:**
|
|
199
|
+
- Collaborate on video edits with team (upload → edit → download)
|
|
200
|
+
- Archive completed projects to external SSD
|
|
201
|
+
- Quick project discovery across multiple brands
|
|
202
|
+
- Manage 50GB+ video files with smart sync
|
|
203
|
+
|
|
204
|
+
**Configuration:**
|
|
205
|
+
- System: `video-projects-root` in `~/.config/appydave/settings.json` (**required**)
|
|
206
|
+
- Per-brand: `.video-tools.env` (AWS credentials, S3 bucket, SSD path)
|
|
207
|
+
|
|
208
|
+
**Migration note:** The old `~/.vat-config` file is deprecated. VAT now uses `settings.json`. See [Configuration Management](#configuration-management) section below.
|
|
209
|
+
|
|
210
|
+
See detailed usage guide: [docs/usage/vat.md](./docs/usage/vat.md)
|
|
211
|
+
|
|
212
|
+
#### 5. Prompt Tools (`bin/prompt_tools.rb`) ⚠️ DEPRECATED API
|
|
213
|
+
OpenAI Completion API wrapper with template support:
|
|
102
214
|
|
|
103
215
|
```bash
|
|
104
|
-
# Run
|
|
105
|
-
bin/prompt_tools.rb completion
|
|
216
|
+
# Run prompt from text
|
|
217
|
+
bin/prompt_tools.rb completion -p "Your prompt" -o output.txt
|
|
218
|
+
|
|
219
|
+
# Run prompt from file with placeholders
|
|
220
|
+
bin/prompt_tools.rb completion -f template.md -k key1=value1,key2=value2 -c
|
|
106
221
|
```
|
|
107
222
|
|
|
108
|
-
**
|
|
109
|
-
- OpenAI GPT
|
|
110
|
-
-
|
|
223
|
+
**What it does:**
|
|
224
|
+
- Sends prompts to OpenAI **Completion API** (older GPT-3 models like `davinci-codex`)
|
|
225
|
+
- Supports template files with `{placeholder}` substitution
|
|
226
|
+
- Outputs to file, clipboard, or stdout
|
|
111
227
|
|
|
112
|
-
|
|
113
|
-
|
|
228
|
+
**Status:** ⚠️ **Not in active use** - Uses **deprecated OpenAI Completion API**
|
|
229
|
+
|
|
230
|
+
**Modern alternative:** Use ChatGPT/Claude directly or migrate to OpenAI Chat API
|
|
231
|
+
|
|
232
|
+
**Potential use cases:** Template-based content generation (if migrated to Chat API)
|
|
233
|
+
|
|
234
|
+
#### 5. YouTube Automation (`bin/youtube_automation.rb`) ⚠️ INTERNAL USE
|
|
235
|
+
Prompt sequence runner for content workflows:
|
|
114
236
|
|
|
115
237
|
```bash
|
|
116
238
|
# Run automation sequence
|
|
@@ -118,6 +240,21 @@ bin/youtube_automation.rb -s 01-1
|
|
|
118
240
|
bin/youtube_automation.rb -s 01-1 -d # with debug output
|
|
119
241
|
```
|
|
120
242
|
|
|
243
|
+
**What it does:**
|
|
244
|
+
- Loads sequence config from `~/.config/appydave/youtube_automation.json`
|
|
245
|
+
- Reads prompt templates from Dropbox path (`_common/raw_prompts/`)
|
|
246
|
+
- Executes OpenAI Completion API calls
|
|
247
|
+
- Saves responses to output files
|
|
248
|
+
|
|
249
|
+
**Requirements:**
|
|
250
|
+
- Sequence definitions in JSON config
|
|
251
|
+
- Prompt template files in configured Dropbox location
|
|
252
|
+
- `OPENAI_ACCESS_TOKEN` environment variable
|
|
253
|
+
|
|
254
|
+
**Status:** ⚠️ **Internal tool** - Hardcoded paths, deprecated API, not documented for external use
|
|
255
|
+
|
|
256
|
+
**Relationship to Move Images:** These are separate tools - Move Images organizes downloaded images into video asset folders
|
|
257
|
+
|
|
121
258
|
**Options:**
|
|
122
259
|
- `-s, --sequence` - Sequence number (required, e.g., 01-1)
|
|
123
260
|
- `-d, --debug` - Enable debug mode
|
|
@@ -140,9 +277,15 @@ bin/configuration.rb -e
|
|
|
140
277
|
```
|
|
141
278
|
|
|
142
279
|
**Configuration Types:**
|
|
143
|
-
- **settings** - General settings and paths
|
|
280
|
+
- **settings** - General settings and paths (project folders: content, video, published, abandoned)
|
|
144
281
|
- **channels** - YouTube channel definitions (code, name, youtube_handle)
|
|
145
|
-
- **youtube_automation** - Automation workflow configurations
|
|
282
|
+
- **youtube_automation** - Automation workflow configurations (prompt sequences)
|
|
283
|
+
|
|
284
|
+
**Team Collaboration Features:**
|
|
285
|
+
- **Shareable configs**: JSON files can be version-controlled (no secrets included)
|
|
286
|
+
- **Per-developer paths**: Each team member customizes paths in their `~/.config/appydave/`
|
|
287
|
+
- **Consistent structure**: Same channel codes/names across team
|
|
288
|
+
- **Secrets separation**: API keys stored in `.env` files (gitignored), not in configs
|
|
146
289
|
|
|
147
290
|
#### 7. Move Images (`bin/move_images.rb`)
|
|
148
291
|
Organize and rename downloaded images into video project asset folders.
|
|
@@ -190,10 +333,12 @@ Bank transaction reconciliation tool - **DEPRECATED, DO NOT USE**
|
|
|
190
333
|
```bash
|
|
191
334
|
rake spec # Run all RSpec tests
|
|
192
335
|
rake # Default task: compile, spec (clobber compile spec)
|
|
193
|
-
guard
|
|
336
|
+
RUBYOPT="-W0" guard # Watch files and auto-run tests + rubocop (suppress Ruby 3.4 warnings)
|
|
194
337
|
bundle exec rspec -f doc # Run tests with detailed documentation format
|
|
195
338
|
```
|
|
196
339
|
|
|
340
|
+
**Note:** Ruby 3.4.2 shows platform constant warnings from Bundler. Use `RUBYOPT="-W0"` to suppress them.
|
|
341
|
+
|
|
197
342
|
### Linting & Style
|
|
198
343
|
```bash
|
|
199
344
|
rubocop # Run RubyGem style checks
|
|
@@ -210,12 +355,20 @@ gem build # Build gemspec into .gem file
|
|
|
210
355
|
|
|
211
356
|
## Architecture Overview
|
|
212
357
|
|
|
213
|
-
|
|
358
|
+
`appydave-tools` is AppyDave's consolidated productivity toolkit for YouTube content creation. Single-purpose utilities in one repository for easier maintenance than separate codebases.
|
|
359
|
+
|
|
360
|
+
**Philosophy:** See [docs/purpose-and-philosophy.md](./docs/purpose-and-philosophy.md) for project philosophy and design principles.
|
|
361
|
+
|
|
362
|
+
**Tool Categories:**
|
|
363
|
+
- AI & Context Management (GPT Context, Prompt Tools)
|
|
364
|
+
- Content & Media (Subtitles, YouTube Manager, YouTube Automation, Move Images)
|
|
365
|
+
- Configuration (Multi-channel config management)
|
|
214
366
|
|
|
215
367
|
### Core Structure
|
|
216
368
|
- **CLI Tools**: Multiple executable scripts in `bin/` for different functionalities
|
|
217
369
|
- **Modular Design**: Organized into focused modules under `lib/appydave/tools/`
|
|
218
|
-
- **
|
|
370
|
+
- **Independent Operation**: Each tool solves a specific problem standalone
|
|
371
|
+
- **Configuration System**: Flexible config management for multi-project workflows
|
|
219
372
|
- **Type System**: Custom type classes for data validation and transformation
|
|
220
373
|
|
|
221
374
|
### Key Components
|
|
@@ -242,7 +395,7 @@ This is a Ruby gem called `appydave-tools` that provides YouTube automation and
|
|
|
242
395
|
- Caption/subtitle management
|
|
243
396
|
- Detailed reporting capabilities
|
|
244
397
|
|
|
245
|
-
#### Subtitle Management (`lib/appydave/tools/
|
|
398
|
+
#### Subtitle Management (`lib/appydave/tools/subtitle_processor/`)
|
|
246
399
|
- SRT file cleaning and normalization
|
|
247
400
|
- Multi-part subtitle joining
|
|
248
401
|
- Timeline synchronization
|
|
@@ -281,94 +434,180 @@ This is a Ruby gem called `appydave-tools` that provides YouTube automation and
|
|
|
281
434
|
## Configuration Management
|
|
282
435
|
|
|
283
436
|
### Configuration Overview
|
|
284
|
-
The gem uses JSON configuration files for managing YouTube channels,
|
|
437
|
+
The gem uses JSON configuration files for managing YouTube channels, settings, and automation workflows. All configuration files are stored in `~/.config/appydave/`.
|
|
285
438
|
|
|
286
|
-
**Configuration Tool:** `bin/configuration.rb`
|
|
439
|
+
**Configuration Tool:** `bin/configuration.rb` (installed as `ad_config`)
|
|
287
440
|
|
|
288
|
-
|
|
441
|
+
**Complete configuration guide:** [docs/configuration/README.md](./docs/configuration/README.md)
|
|
289
442
|
|
|
290
|
-
|
|
291
|
-
```bash
|
|
292
|
-
bin/configuration.rb -l
|
|
293
|
-
```
|
|
443
|
+
### Quick Start
|
|
294
444
|
|
|
295
|
-
|
|
445
|
+
**First-time setup:**
|
|
296
446
|
```bash
|
|
447
|
+
# Create empty configuration files (safe - won't overwrite existing files)
|
|
297
448
|
bin/configuration.rb -c
|
|
449
|
+
|
|
450
|
+
# Copy example files
|
|
451
|
+
cp docs/configuration/settings.example.json ~/.config/appydave/settings.json
|
|
452
|
+
cp docs/configuration/channels.example.json ~/.config/appydave/channels.json
|
|
453
|
+
cp docs/configuration/.env.example .env
|
|
454
|
+
|
|
455
|
+
# Edit your values
|
|
456
|
+
bin/configuration.rb -e
|
|
298
457
|
```
|
|
299
458
|
|
|
300
|
-
|
|
459
|
+
### Configuration Commands
|
|
460
|
+
|
|
301
461
|
```bash
|
|
462
|
+
# List all configurations
|
|
463
|
+
bin/configuration.rb -l
|
|
464
|
+
|
|
465
|
+
# Create missing configuration files (safe - won't overwrite)
|
|
466
|
+
bin/configuration.rb -c
|
|
467
|
+
|
|
468
|
+
# View configuration values
|
|
302
469
|
bin/configuration.rb -p settings,channels,youtube_automation
|
|
303
|
-
```
|
|
304
470
|
|
|
305
|
-
|
|
306
|
-
```bash
|
|
471
|
+
# Edit configurations in VS Code
|
|
307
472
|
bin/configuration.rb -e
|
|
308
473
|
```
|
|
309
474
|
|
|
310
475
|
### Configuration Types
|
|
311
476
|
|
|
312
|
-
#### 1. Settings Config
|
|
313
|
-
General application settings and paths.
|
|
477
|
+
#### 1. Settings Config (`~/.config/appydave/settings.json`)
|
|
478
|
+
General application settings and paths (non-secret configuration).
|
|
314
479
|
|
|
315
|
-
**
|
|
480
|
+
**Structure:**
|
|
316
481
|
```json
|
|
317
482
|
{
|
|
318
|
-
"
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
"abandoned": "/path/to/abandoned"
|
|
323
|
-
}
|
|
483
|
+
"video-projects-root": "/Users/yourname/dev/video-projects",
|
|
484
|
+
"ecamm-recording-folder": "/Users/yourname/ecamm",
|
|
485
|
+
"download-folder": "/Users/yourname/Downloads",
|
|
486
|
+
"download-image-folder": "/Users/yourname/Downloads/images"
|
|
324
487
|
}
|
|
325
488
|
```
|
|
326
489
|
|
|
327
|
-
|
|
490
|
+
**Key Settings:**
|
|
491
|
+
|
|
492
|
+
| Key | Purpose | Used By | Required |
|
|
493
|
+
|-----|---------|---------|----------|
|
|
494
|
+
| `video-projects-root` | Root directory for all video projects | VAT commands | ✅ For VAT |
|
|
495
|
+
| `ecamm-recording-folder` | Where Ecamm Live saves recordings | Move Images | Optional |
|
|
496
|
+
| `download-folder` | General downloads directory | Move Images | Optional |
|
|
497
|
+
| `download-image-folder` | Image downloads (defaults to `download-folder`) | Move Images | Optional |
|
|
498
|
+
|
|
499
|
+
**Safe to:**
|
|
500
|
+
- ✅ Version control (after removing personal paths)
|
|
501
|
+
- ✅ Share with team (as template)
|
|
502
|
+
- ✅ Commit to git (as `.example` file)
|
|
503
|
+
|
|
504
|
+
#### 2. Channels Config (`~/.config/appydave/channels.json`)
|
|
328
505
|
YouTube channel definitions for multi-channel management.
|
|
329
506
|
|
|
330
|
-
**
|
|
507
|
+
**Structure:**
|
|
331
508
|
```json
|
|
332
509
|
{
|
|
333
|
-
"channels":
|
|
334
|
-
{
|
|
335
|
-
"code": "
|
|
336
|
-
"name": "
|
|
337
|
-
"youtube_handle": "@
|
|
510
|
+
"channels": {
|
|
511
|
+
"appydave": {
|
|
512
|
+
"code": "ad",
|
|
513
|
+
"name": "AppyDave",
|
|
514
|
+
"youtube_handle": "@appydave",
|
|
515
|
+
"locations": {
|
|
516
|
+
"content_projects": "/path/to/content",
|
|
517
|
+
"video_projects": "/Users/yourname/dev/video-projects/v-appydave",
|
|
518
|
+
"published_projects": "/path/to/published",
|
|
519
|
+
"abandoned_projects": "/path/to/abandoned"
|
|
520
|
+
}
|
|
338
521
|
}
|
|
339
|
-
|
|
522
|
+
}
|
|
340
523
|
}
|
|
341
524
|
```
|
|
342
525
|
|
|
343
|
-
|
|
344
|
-
Automation workflow configurations and sequences.
|
|
526
|
+
**Channel Properties:**
|
|
345
527
|
|
|
346
|
-
|
|
347
|
-
|
|
528
|
+
| Property | Description | Example |
|
|
529
|
+
|----------|-------------|---------|
|
|
530
|
+
| `key` | Internal identifier (object key) | `"appydave"` |
|
|
531
|
+
| `code` | Short code for project naming | `"ad"` |
|
|
532
|
+
| `name` | Display name | `"AppyDave"` |
|
|
533
|
+
| `youtube_handle` | YouTube @ handle | `"@appydave"` |
|
|
348
534
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
535
|
+
**Location Properties:**
|
|
536
|
+
|
|
537
|
+
| Location | Purpose | Can Use "NOT-SET" |
|
|
538
|
+
|----------|---------|-------------------|
|
|
539
|
+
| `content_projects` | Content planning/scripts | ✅ Yes |
|
|
540
|
+
| `video_projects` | Active video projects | ❌ No (required) |
|
|
541
|
+
| `published_projects` | Published video archives | ✅ Yes |
|
|
542
|
+
| `abandoned_projects` | Abandoned projects | ✅ Yes |
|
|
543
|
+
|
|
544
|
+
Use `"NOT-SET"` as a placeholder for unconfigured locations.
|
|
353
545
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
-
|
|
357
|
-
-
|
|
546
|
+
**Safe to:**
|
|
547
|
+
- ✅ Version control structure (remove personal paths first)
|
|
548
|
+
- ⚠️ Each developer customizes paths locally
|
|
549
|
+
- ✅ Share channel definitions (codes, names, handles)
|
|
358
550
|
|
|
359
|
-
|
|
360
|
-
|
|
551
|
+
#### 3. YouTube Automation Config (`~/.config/appydave/youtube_automation.json`)
|
|
552
|
+
Automation workflow configurations and sequences (internal use).
|
|
553
|
+
|
|
554
|
+
#### 4. Environment Variables (`.env` file - project root)
|
|
555
|
+
**⚠️ CRITICAL: Secrets and API keys stored here, NEVER commit to version control!**
|
|
361
556
|
|
|
362
557
|
```bash
|
|
363
|
-
#
|
|
364
|
-
|
|
365
|
-
|
|
558
|
+
# OpenAI API Configuration (required for prompt_tools and youtube_automation)
|
|
559
|
+
# Get your API key from: https://platform.openai.com/api-keys
|
|
560
|
+
OPENAI_ACCESS_TOKEN=sk-your-actual-api-key-here
|
|
561
|
+
OPENAI_ORGANIZATION_ID=org-your-actual-org-id
|
|
366
562
|
|
|
367
|
-
#
|
|
368
|
-
|
|
563
|
+
# Enable OpenAI tools (set to 'true' to enable)
|
|
564
|
+
TOOLS_ENABLED=false
|
|
369
565
|
```
|
|
370
566
|
|
|
371
|
-
**
|
|
567
|
+
**Environment Variables:**
|
|
568
|
+
|
|
569
|
+
| Variable | Purpose | Required For | Secret? |
|
|
570
|
+
|----------|---------|--------------|---------|
|
|
571
|
+
| `OPENAI_ACCESS_TOKEN` | OpenAI API key | prompt_tools, youtube_automation | ✅ SECRET |
|
|
572
|
+
| `OPENAI_ORGANIZATION_ID` | OpenAI org ID | prompt_tools, youtube_automation | ✅ SECRET |
|
|
573
|
+
| `TOOLS_ENABLED` | Enable OpenAI configuration | Optional | ❌ No |
|
|
574
|
+
|
|
575
|
+
**Safe to:**
|
|
576
|
+
- ❌ **NEVER** version control
|
|
577
|
+
- ❌ **NEVER** share
|
|
578
|
+
- ❌ **NEVER** commit to git
|
|
579
|
+
- ✅ Keep local only
|
|
580
|
+
- ✅ Share `.env.example` template
|
|
581
|
+
|
|
582
|
+
### Safety Features
|
|
583
|
+
|
|
584
|
+
**Automatic Backups:**
|
|
585
|
+
- Every config save creates timestamped backup: `filename.backup.YYYYMMDD-HHMMSS`
|
|
586
|
+
- Backups stored alongside config files in `~/.config/appydave/`
|
|
587
|
+
- Restore from backup: `cp settings.json.backup.20251109-203015 settings.json`
|
|
588
|
+
|
|
589
|
+
**Safe Configuration Creation:**
|
|
590
|
+
- `ad_config -c` only creates missing files, never overwrites existing ones
|
|
591
|
+
- Prevents accidental data loss from running setup commands
|
|
592
|
+
|
|
593
|
+
**Secrets Separation:**
|
|
594
|
+
- API keys stored in `.env` files (gitignored), not in JSON configs
|
|
595
|
+
- Configuration files can be safely version-controlled (after removing personal paths)
|
|
596
|
+
|
|
597
|
+
### Migration from Legacy Config
|
|
598
|
+
|
|
599
|
+
**From `~/.vat-config` (DEPRECATED):**
|
|
600
|
+
|
|
601
|
+
The old `~/.vat-config` file is no longer used. VAT now uses `settings.json`.
|
|
602
|
+
|
|
603
|
+
**Migration steps:**
|
|
604
|
+
1. Check your old config: `cat ~/.vat-config`
|
|
605
|
+
2. Add value to settings.json: `ad_config -e`
|
|
606
|
+
3. Add: `"video-projects-root": "/your/path/from/vat/config"`
|
|
607
|
+
4. Test VAT still works: `vat list`
|
|
608
|
+
5. Delete old file: `rm ~/.vat-config`
|
|
609
|
+
|
|
610
|
+
**Note:** The `vat init` command is deprecated. Use `ad_config -c` instead.
|
|
372
611
|
|
|
373
612
|
## Git Hooks & Security
|
|
374
613
|
|