appydave-tools 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 99c323bf20ff261cb8bc480f62755bd2bcf3329f71757336a860ae012519c756
4
- data.tar.gz: 77adbb57ab140ae8edd305b99145d015e60bab9c66193ec221b02dd284619dfe
3
+ metadata.gz: c5e47cee4b8a3f0c9d7d1714bceeb4a02780cfe441348466ecd822e4e454d0fe
4
+ data.tar.gz: 3f035ac5b9e34e819a79c17f3c19a9646ec246017493a63ba20a1096ae86c95f
5
5
  SHA512:
6
- metadata.gz: f553305dd9de4407a078f6c3cb8a1aa73263ab96e7bfe534283b81dfa742ea7c65287480da31f03f549364ca5743b0b49ddffe277592b24b2df3541ff7da0713
7
- data.tar.gz: c631a73481020791d0221dc997332f09163eabbdbf38e03dbfea8198d680ecbf45cf74f18b38df234feaefd530a498aeaac5a2ef29aa0a1fdc73aeb654fcbf68
6
+ metadata.gz: 59aa944562e5a3c28c47e053a49df7d9ea6236268736263dca2d29022ed4d3a70d1a3fe9668b080183dfce38fe520efac252aa2c0fe11f40aa7491a325f88570
7
+ data.tar.gz: 55aa8b91b2992fec8968f214baefc896ab816e56a77ff0f724b99d0f3ac10d8eb8446e220beecbac5398b3b23cf46bad14b8fe3dc785af25573cbbbf077e0f87
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [0.3.3](https://github.com/klueless-io/appydave-tools/compare/v0.3.2...v0.3.3) (2024-05-18)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * updating configuration with channels and channel_projects ([d4f54aa](https://github.com/klueless-io/appydave-tools/commit/d4f54aa0f455f535b6e265f23e6fba123d099d26))
7
+
1
8
  ## [0.3.2](https://github.com/klueless-io/appydave-tools/compare/v0.3.1...v0.3.2) (2024-05-16)
2
9
 
3
10
 
@@ -1,3 +1,69 @@
1
1
  # Configuration Component
2
2
 
3
- [ChatGPT conversation](https://chatgpt.com/g/g-4dMsIRK3E-ruby-script-assistant/c/d8ea5960-071b-48aa-9fd9-554ca302c7dd)
3
+ [ChatGPT conversation](https://chatgpt.com/g/g-4dMsIRK3E-ruby-script-assistant/c/d8ea5960-071b-48aa-9fd9-554ca302c7dd)
4
+ [ChatGPT confersation for Schema](https://chatgpt.com/c/bb93e7ac-f139-44f9-8b9c-4e74ac2fa461)
5
+
6
+ ## Schema
7
+
8
+ ### Channels Schema
9
+
10
+ - **code**: Short identifier for the channel (e.g., `"ad"`, `"ac"`, `"fv"`).
11
+ - **name**: Full name of the channel (e.g., `"AppyDave"`, `"AppyDave Coding"`, `"FliVideo"`).
12
+ - **youtube_handle**: YouTube handle for the channel (e.g., `"@appydave"`, `"@appydavecoding"`, `"@flivideo"`).
13
+
14
+ #### Example
15
+
16
+ ```json
17
+ {
18
+ "channels": {
19
+ "appydave": {
20
+ "code": "ad",
21
+ "name": "AppyDave",
22
+ "youtube_handle": "@appydave"
23
+ },
24
+ "appydave_coding": {
25
+ "code": "ac",
26
+ "name": "AppyDave Coding",
27
+ "youtube_handle": "@appydavecoding"
28
+ },
29
+ "fli_video": {
30
+ "code": "fv",
31
+ "name": "FliVideo",
32
+ "youtube_handle": "@flivideo"
33
+ }
34
+ }
35
+ }
36
+ ```
37
+
38
+ ### Channel Projects Schema
39
+
40
+ - **content_projects**: Path to the shared folder for content creation (e.g., `"/user/Library/CloudStorage/Dropbox/team-appydave"`).
41
+ - **video_projects**: Path to the local storage folder for active video projects (e.g., `"/user/tube-channels/appy-dave/active"`).
42
+ - **published_projects**: Path to the archive folder for published projects (e.g., `"/Volumes/Expansion/published/appydave"`).
43
+ - **abandoned_projects**: Path to the archive folder for incomplete or failed projects (e.g., `"/Volumes/Expansion/failed/appydave"`).
44
+
45
+ ## Example
46
+ ```json
47
+ {
48
+ "projects": {
49
+ "appydave": {
50
+ "content_projects": "/user/Library/CloudStorage/Dropbox/team-appydave",
51
+ "video_projects": "/user/tube-channels/appy-dave/active",
52
+ "published_projects": "/Volumes/Expansion/published/appydave",
53
+ "abandoned_projects": "/Volumes/Expansion/failed/appydave"
54
+ },
55
+ "appydave_coding": {
56
+ "content_projects": "/user/Library/CloudStorage/Dropbox/team-appydavecoding",
57
+ "video_projects": "/user/tube-channels/a-cast/cast-active",
58
+ "published_projects": "/Volumes/Expansion/published/appydave-coding",
59
+ "abandoned_projects": "/Volumes/Expansion/failed/appydave-coding"
60
+ },
61
+ "fli_video": {
62
+ "content_projects": "/user/Library/CloudStorage/Dropbox/team-flivideo",
63
+ "video_projects": "/user/tube-channels/fli-video/active",
64
+ "published_projects": "/Volumes/Expansion/published/fli-video",
65
+ "abandoned_projects": "/Volumes/Expansion/failed/fli-video"
66
+ }
67
+ }
68
+ }
69
+ ```
@@ -5,10 +5,6 @@ module Appydave
5
5
  module Configuration
6
6
  # Channel projects configuration
7
7
  class ChannelProjectsConfig < ConfigBase
8
- def initialize
9
- super('channel_projects')
10
- end
11
-
12
8
  # Retrieve channel information by channel name (string or symbol)
13
9
  def get_channel_info(channel_name)
14
10
  channel_name = channel_name.to_s
@@ -5,10 +5,6 @@ module Appydave
5
5
  module Configuration
6
6
  # Channels configuration
7
7
  class ChannelsConfig < ConfigBase
8
- def initialize
9
- super('channels')
10
- end
11
-
12
8
  # Retrieve channel information by channel code (string or symbol)
13
9
  def get_channel(channel_key)
14
10
  channel_key = channel_key.to_s
@@ -29,6 +25,16 @@ module Appydave
29
25
  end
30
26
  end
31
27
 
28
+ def key?(key)
29
+ key = key.to_s
30
+ data['channels'].key?(key)
31
+ end
32
+
33
+ def code?(code)
34
+ code = code.to_s
35
+ data['channels'].values.any? { |info| info['code'] == code }
36
+ end
37
+
32
38
  private
33
39
 
34
40
  def default_data
@@ -6,6 +6,8 @@ module Appydave
6
6
  # Configuration class for handling multiple configurations
7
7
  class Config
8
8
  class << self
9
+ include KLog::Logging
10
+
9
11
  attr_accessor :config_path
10
12
  attr_reader :configurations
11
13
 
@@ -46,6 +48,11 @@ module Appydave
46
48
  Open3.capture3(open_vscode)
47
49
  end
48
50
 
51
+ def debug
52
+ log.kv 'Configuration Path', config_path
53
+ configurations.each_value(&:debug)
54
+ end
55
+
49
56
  private
50
57
 
51
58
  def ensure_config_directory
@@ -8,9 +8,11 @@ module Appydave
8
8
  module Configuration
9
9
  # Base class for handling common configuration tasks
10
10
  class ConfigBase
11
+ include KLog::Logging
12
+
11
13
  attr_reader :config_path, :data
12
14
 
13
- def initialize(config_name = 'unknown')
15
+ def initialize
14
16
  @config_path = File.join(Config.config_path, "#{config_name}.json")
15
17
  @data = load
16
18
  end
@@ -24,9 +26,27 @@ module Appydave
24
26
 
25
27
  default_data
26
28
  rescue JSON::ParserError
29
+ # log.exception e
27
30
  default_data
28
31
  end
29
32
 
33
+ def name
34
+ self.class.name.split('::')[-1].gsub(/Config$/, '')
35
+ end
36
+
37
+ def config_name
38
+ name.gsub(/([a-z])([A-Z])/, '\1-\2').downcase
39
+ end
40
+
41
+ def debug
42
+ log.kv 'Config', name
43
+ log.kv 'Path', config_path
44
+
45
+ log.json data
46
+ end
47
+
48
+ private
49
+
30
50
  def default_data
31
51
  {}
32
52
  end
@@ -5,10 +5,6 @@ module Appydave
5
5
  module Configuration
6
6
  # Global settings that can be referenced by other configurations or tools
7
7
  class SettingsConfig < ConfigBase
8
- def initialize
9
- super('settings')
10
- end
11
-
12
8
  def set(key, value)
13
9
  data[key] = value
14
10
  end
@@ -0,0 +1,21 @@
1
+ # Naming Manager
2
+
3
+ [ChatGPT conversation](https://chatgpt.com/g/g-4dMsIRK3E-ruby-script-assistant/c/cab5e2f7-a607-402f-80b7-9ca262bab8ee)
4
+
5
+ ## Channel Names
6
+
7
+ | Key | Code | Name | YouTube Handle |
8
+ |-----------------|------|-----------------|--------------------|
9
+ | appydave | ad | AppyDave | @appydave |
10
+ | appydave_coding | ac | AppyDave Coding | @appydavecoding |
11
+ | fli_video | fv | FliVideo | @flivideo |
12
+ | winning_prompts | wp | Winning Prompts | @winningprompts |
13
+ | trend10 | t1 | Trend10 | @trend10 |
14
+ | aitldr | tl | AI TLDR | @aitldr |
15
+
16
+
17
+ ## Project Naming Component
18
+
19
+ The Project Naming Component is a tool designed to generate standardized names for projects within the YouTube content creation process.
20
+ It ensures consistency and clarity by combining a unique sequence identifier, an optional channel code, and a descriptive project name into a well-defined format.
21
+ This component is essential for maintaining organized and easily recognizable project names across all channels and project types.
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Appydave
4
+ module Tools
5
+ # Project, channel, and file name management
6
+ module NameManager
7
+ # Parses and generates project names for Appydave video projects
8
+ class ProjectName
9
+ attr_reader :sequence, :channel_code, :project_name
10
+
11
+ def initialize(file_name)
12
+ parse_file_name(file_name)
13
+ end
14
+
15
+ def generate_name
16
+ if channel_code
17
+ "#{sequence}-#{channel_code}-#{project_name}"
18
+ else
19
+ "#{sequence}-#{project_name}"
20
+ end.downcase
21
+ end
22
+
23
+ def to_s
24
+ generate_name
25
+ end
26
+
27
+ private
28
+
29
+ def parse_file_name(file_name)
30
+ file_name = File.basename(file_name, File.extname(file_name))
31
+ parts = file_name.split('-')
32
+
33
+ @sequence = parts[0]
34
+ @project_name = parts[-1]
35
+ @channel_code = parts.length == 3 ? parts[1] : nil
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Appydave
4
4
  module Tools
5
- VERSION = '0.3.3'
5
+ VERSION = '0.3.4'
6
6
  end
7
7
  end
@@ -5,6 +5,7 @@ require 'fileutils'
5
5
  require 'json'
6
6
  require 'open3'
7
7
  require 'optparse'
8
+ require 'k_log'
8
9
 
9
10
  require 'appydave/tools/version'
10
11
  require 'appydave/tools/gpt_context/file_collector'
@@ -14,6 +15,7 @@ require 'appydave/tools/configuration/config'
14
15
  require 'appydave/tools/configuration/settings_config'
15
16
  require 'appydave/tools/configuration/channel_projects_config'
16
17
  require 'appydave/tools/configuration/channels_config'
18
+ require 'appydave/tools/name_manager/project_name'
17
19
 
18
20
  module Appydave
19
21
  module Tools
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "appydave-tools",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "appydave-tools",
9
- "version": "0.3.3",
9
+ "version": "0.3.4",
10
10
  "devDependencies": {
11
11
  "@klueless-js/semantic-release-rubygem": "github:klueless-js/semantic-release-rubygem",
12
12
  "@semantic-release/changelog": "^6.0.3",
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appydave-tools",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
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.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-05-18 00:00:00.000000000 Z
11
+ date: 2024-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clipboard
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: k_log
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  description: " AppyDave YouTube Automation Tools\n"
28
42
  email:
29
43
  - david@ideasmen.com.au
@@ -56,6 +70,8 @@ files:
56
70
  - lib/appydave/tools/configuration/settings_config copy.xrb
57
71
  - lib/appydave/tools/configuration/settings_config.rb
58
72
  - lib/appydave/tools/gpt_context/file_collector.rb
73
+ - lib/appydave/tools/name_manager/_doc.md
74
+ - lib/appydave/tools/name_manager/project_name.rb
59
75
  - lib/appydave/tools/version.rb
60
76
  - package-lock.json
61
77
  - package.json