fli_video 0.0.2 → 0.1.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.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.builders/generators/back/scripts/01-get-technical-design-and-feature-list.rb +32 -0
  3. data/.builders/generators/back/scripts/02-get-feature-list-and-components.rb +42 -0
  4. data/.builders/generators/back/scripts/03-get-structure.rb +104 -0
  5. data/.builders/generators/back/scripts/generated/application-structure.json +231 -0
  6. data/.builders/generators/back/scripts/generated/features-and-components.md +988 -0
  7. data/.builders/generators/back/scripts/generated/technical-design-and-features.md +424 -0
  8. data/.builders/klues/add_episode.klue +25 -0
  9. data/.builders/klues/change_chapter_name.klue +32 -0
  10. data/.builders/klues/create_chapter_video.klue +34 -0
  11. data/.builders/klues/create_project.klue +37 -0
  12. data/.builders/klues/empty_trash.klue +24 -0
  13. data/.builders/klues/episode_path.klue +77 -0
  14. data/.builders/klues/global_config.klue +31 -0
  15. data/.builders/klues/move_ecamm_file.klue +21 -0
  16. data/.builders/klues/move_to_trash.klue +35 -0
  17. data/.builders/klues/open_in_finder.klue +25 -0
  18. data/.builders/klues/project_config.klue +123 -0
  19. data/.builders/klues/project_meta_data_store.klue +28 -0
  20. data/.builders/klues/project_path.klue +77 -0
  21. data/.builders/klues/recording_file_watcher.klue +28 -0
  22. data/.builders/klues/recording_filename.klue +112 -0
  23. data/.builders/klues/restore_from_trash.klue +29 -0
  24. data/.builders/klues/switch_focus.klue +24 -0
  25. data/.builders/klues/text_to_speech.klue +29 -0
  26. data/.builders/klues/transcript_data_store.klue +28 -0
  27. data/.rubocop.yml +2 -0
  28. data/CHANGELOG.md +26 -0
  29. data/README.md +13 -20
  30. data/bin/fli_video +6 -0
  31. data/docs/feature-list.md +76 -0
  32. data/docs/generated/application-structure.json +53 -0
  33. data/docs/generated/features-and-components.md +993 -0
  34. data/docs/generated/technical-design-and-features.md +437 -0
  35. data/docs/technical-specifications.md +360 -0
  36. data/fli.rb +138 -0
  37. data/lib/fli_video/cli.rb +30 -0
  38. data/lib/fli_video/version.rb +1 -1
  39. data/package-lock.json +2 -2
  40. data/package.json +1 -1
  41. data/scripts/01-get-technical-design-and-feature-list.md +5 -0
  42. data/scripts/01-get-technical-design-and-feature-list.rb +39 -0
  43. data/scripts/02-get-feature-list-and-components.md +26 -0
  44. data/scripts/02-get-feature-list-and-components.rb +56 -0
  45. data/scripts/03-get-code-structure.md +33 -0
  46. data/scripts/03-get-code-structure.rb +73 -0
  47. metadata +41 -3
  48. data/README-features.md +0 -36
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env ruby
2
+ require 'find'
3
+
4
+ # Method to read file contents
5
+ def read_file(file_path)
6
+ begin
7
+ File.read(file_path)
8
+ rescue => e
9
+ puts "Error reading file #{file_path}: #{e}"
10
+ ""
11
+ end
12
+ end
13
+
14
+ # Method to write content to a file
15
+ def write_file(file_path, content)
16
+ begin
17
+ # Ensure the directory exists
18
+ Dir.mkdir(File.dirname(file_path)) unless Dir.exist?(File.dirname(file_path))
19
+ File.write(file_path, content)
20
+ rescue => e
21
+ puts "Error writing to file #{file_path}: #{e}"
22
+ end
23
+ end
24
+
25
+ # Method to combine Klue files
26
+ def combine_klue_files(klue_dir)
27
+ klue_components = "## Klue Components\n"
28
+ Find.find(klue_dir) do |path|
29
+ if path =~ /.*\.klue$/
30
+ klue_file_content = read_file(path)
31
+ klue_components += "Klue Component: `#{File.basename(path)}`\n\n```ruby\n#{klue_file_content}\n```\n"
32
+ end
33
+ end
34
+ klue_components
35
+ end
36
+
37
+ # Method to copy content to clipboard
38
+ def copy_to_clipboard(content)
39
+ IO.popen('pbcopy', 'w') { |clip| clip.puts content }
40
+ end
41
+
42
+ # Read the feature list
43
+ feature_list = read_file('docs/feature-list.md')
44
+
45
+ # Combine Klue files
46
+ klue_components = combine_klue_files('.builders/klues')
47
+
48
+ # Merge contents
49
+ merged_content = "#{feature_list}\n\n#{klue_components}"
50
+
51
+ # Output file path
52
+ output_file = 'docs/generated/features-and-components.md'
53
+
54
+ # Write the merged content to the output file and copy to clipboard
55
+ write_file(output_file, merged_content)
56
+ copy_to_clipboard(merged_content)
@@ -0,0 +1,33 @@
1
+ ## Prompt:
2
+
3
+ Create a Ruby script to scan a project's directory, ignoring specific folders and files. For the remaining files generate a JSON file with their structure and content and write to `docs/generated/application-structure.json`
4
+
5
+ Store a copy of the data in the clipboard
6
+
7
+ For some files, eg. ` *.rb` I would like you to read the content and put it in the JSON
8
+
9
+ ### Sample Structure
10
+ ```json
11
+ [
12
+ {
13
+ "name": ".rspec_status",
14
+ "type": "file"
15
+ },
16
+ {
17
+ "name": "spec",
18
+ "type": "directory",
19
+ "children": [
20
+ {
21
+ "name": "spec_helper.rb",
22
+ "type": "file",
23
+ "content": "# frozen_string_literal: true\n\nrequire 'pry'\nrequire 'bundler/setup'\nrequire 'simplecov'\n\nSimpleCov.start\n\nrequire 'fli_video'\n\nRSpec.configure do |config|\n # Enable flags like --only-failures and --next-failure\n config.example_status_persistence_file_path = '.rspec_status'\n config.filter_run_when_matching :focus\n\n # Disable RSpec exposing methods globally on `Module` and `main`\n config.disable_monkey_patching!\n\n config.expect_with :rspec do |c|\n c.syntax = :expect\n end\nend\n"
24
+ },
25
+ {
26
+ "name": "fli_video_spec.rb",
27
+ "type": "file",
28
+ "content": "# frozen_string_literal: true\n\nRSpec.describe FliVideo do\n it 'has a version number' do\n expect(FliVideo::VERSION).not_to be_nil\n end\nend\n"
29
+ }
30
+ ]
31
+ },
32
+ ]
33
+ ```
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env ruby
2
+ require 'json'
3
+ require 'find'
4
+
5
+ # Method to read file contents based on inclusion patterns
6
+ def read_file_contents(file_path, include_content_for)
7
+ return nil unless include_content_for.any? { |pattern| File.fnmatch(pattern[:pattern], File.basename(file_path)) }
8
+ File.read(file_path)
9
+ end
10
+
11
+ # Method to write JSON content to a file
12
+ def write_structure_to_file(file_path, content)
13
+ File.write(file_path, JSON.pretty_generate(content))
14
+ end
15
+
16
+ # Method to copy content to clipboard
17
+ def copy_to_clipboard(content)
18
+ IO.popen('pbcopy', 'w') { |clip| clip.puts content }
19
+ end
20
+
21
+ # Method to scan and structure directory contents
22
+ def scan_directory(dir, ignore_folders, ignore_files, include_content_for)
23
+ Dir.children(dir).map do |entry|
24
+ path = "#{dir}/#{entry}"
25
+ next if ignore_folders.include?(File.basename(path)) || ignore_files.include?(File.basename(path))
26
+
27
+ if File.directory?(path)
28
+ { 'name' => entry, 'type' => 'directory', 'children' => scan_directory(path, ignore_folders, ignore_files, include_content_for) }
29
+ else
30
+ file_data = { 'name' => entry, 'type' => 'file' }
31
+ file_data['content'] = read_file_contents(path, include_content_for) if include_content_for.any? { |pattern| File.fnmatch(pattern[:pattern], entry) }
32
+ file_data
33
+ end
34
+ end.compact
35
+ end
36
+
37
+ # Method to build content for GPT clipboard
38
+ def build_gpt_content(structure)
39
+ JSON.pretty_generate(structure)
40
+ end
41
+
42
+ # Usage example:
43
+ ignore_folders = ['coverage', 'tmp', 'log', '.git', '.githooks', '.github', 'bin', 'sig', 'node_modules', '.builders', 'docs', 'scripts']
44
+
45
+ ignore_files = [
46
+ 'fli.rb',
47
+ 'application-structure.json',
48
+ '.rspec_status',
49
+ '.releaserc.json',
50
+ 'CODE_OF_CONDUCT.md',
51
+ 'Guardfile',
52
+ '.rspec',
53
+ 'CHANGELOG.md',
54
+ '.tool-versions',
55
+ 'Rakefile',
56
+ 'Gemfile.lock',
57
+ '.gitignore',
58
+ 'package-lock.json',
59
+ 'package.json',
60
+ '.rubocop.yml',
61
+ 'LICENSE.txt',
62
+ 'fli_video.gemspec',
63
+ '01-get-structure.rb'
64
+ ]
65
+ include_content_for = [
66
+ { pattern: '*.rb' },
67
+ ]
68
+
69
+ structure = scan_directory('.', ignore_folders, ignore_files, include_content_for)
70
+ write_structure_to_file('docs/generated/application-structure.json', structure)
71
+ gpt_content = build_gpt_content(structure)
72
+ copy_to_clipboard(gpt_content)
73
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fli_video
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-19 00:00:00.000000000 Z
11
+ date: 2024-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: k_log
@@ -34,6 +34,31 @@ files:
34
34
  - ".builders/_.rb"
35
35
  - ".builders/boot.rb"
36
36
  - ".builders/generators/01-bootstrap.rb"
37
+ - ".builders/generators/back/scripts/01-get-technical-design-and-feature-list.rb"
38
+ - ".builders/generators/back/scripts/02-get-feature-list-and-components.rb"
39
+ - ".builders/generators/back/scripts/03-get-structure.rb"
40
+ - ".builders/generators/back/scripts/generated/application-structure.json"
41
+ - ".builders/generators/back/scripts/generated/features-and-components.md"
42
+ - ".builders/generators/back/scripts/generated/technical-design-and-features.md"
43
+ - ".builders/klues/add_episode.klue"
44
+ - ".builders/klues/change_chapter_name.klue"
45
+ - ".builders/klues/create_chapter_video.klue"
46
+ - ".builders/klues/create_project.klue"
47
+ - ".builders/klues/empty_trash.klue"
48
+ - ".builders/klues/episode_path.klue"
49
+ - ".builders/klues/global_config.klue"
50
+ - ".builders/klues/move_ecamm_file.klue"
51
+ - ".builders/klues/move_to_trash.klue"
52
+ - ".builders/klues/open_in_finder.klue"
53
+ - ".builders/klues/project_config.klue"
54
+ - ".builders/klues/project_meta_data_store.klue"
55
+ - ".builders/klues/project_path.klue"
56
+ - ".builders/klues/recording_file_watcher.klue"
57
+ - ".builders/klues/recording_filename.klue"
58
+ - ".builders/klues/restore_from_trash.klue"
59
+ - ".builders/klues/switch_focus.klue"
60
+ - ".builders/klues/text_to_speech.klue"
61
+ - ".builders/klues/transcript_data_store.klue"
37
62
  - ".releaserc.json"
38
63
  - ".rspec"
39
64
  - ".rubocop.yml"
@@ -43,15 +68,28 @@ files:
43
68
  - Gemfile
44
69
  - Guardfile
45
70
  - LICENSE.txt
46
- - README-features.md
47
71
  - README.md
48
72
  - Rakefile
49
73
  - bin/console
74
+ - bin/fli_video
50
75
  - bin/setup
76
+ - docs/feature-list.md
77
+ - docs/generated/application-structure.json
78
+ - docs/generated/features-and-components.md
79
+ - docs/generated/technical-design-and-features.md
80
+ - docs/technical-specifications.md
81
+ - fli.rb
51
82
  - lib/fli_video.rb
83
+ - lib/fli_video/cli.rb
52
84
  - lib/fli_video/version.rb
53
85
  - package-lock.json
54
86
  - package.json
87
+ - scripts/01-get-technical-design-and-feature-list.md
88
+ - scripts/01-get-technical-design-and-feature-list.rb
89
+ - scripts/02-get-feature-list-and-components.md
90
+ - scripts/02-get-feature-list-and-components.rb
91
+ - scripts/03-get-code-structure.md
92
+ - scripts/03-get-code-structure.rb
55
93
  - sig/fli_video.rbs
56
94
  homepage: http://appydave.com/gems/fli_video
57
95
  licenses:
data/README-features.md DELETED
@@ -1,36 +0,0 @@
1
- Read Global Configuration
2
- Access and apply global configuration settings for video asset management and state consistency.
3
- Project or Project/Episode Management
4
- Efficiently handle one video project or episode at a time, ensuring focused and organized workflow.
5
- Quick Create New Project
6
- Rapidly initiate new video project or episode, enabling quick development and setup with minimal steps.
7
- Change Project/Episode Focus
8
- Easily switch between different video projects or episodes to accommodate changing content priorities.
9
- Read Project Configuration
10
- Maintain and retrieve project-specific settings and configurations to resume video projects seamlessly.
11
- Calculate Location/Filename for Video Recordings
12
- Automatically determine and organize storage locations and filenames for video recordings, enhancing asset management.
13
- Move eCamm File to Project Recordings Folder
14
- Seamlessly transfer eCamm recordings into appropriate project or episode folders for streamlined project continuity.
15
- Trash
16
- Moves suboptimal video takes to a designated 'trash' or 'archive' folder, optimizing storage and maintaining project clarity by segregating lesser-quality content.
17
- Trash Undo
18
- Retrieves video takes from the 'trash' or 'archive' folder and moves them back into the target project folder, allowing for reconsideration or re-evaluation of previously discarded content.
19
- Finder Integration
20
- Quickly access video project and episode folders within the Finder, streamlining file navigation.
21
- FileWatch Processor for File Event Commands
22
- Utilize a FileWatch processor to automate file event responses, directing new recordings to designated folders for efficient content management.
23
- Generate Chapter Video
24
- Compile and review video chapter segments independently, facilitating content evaluation and editing.
25
- Text to Speech
26
- Transcribe spoken content to text, integrating transcriptions into subsequent workflow stages.
27
- Meta Data Generator
28
- Extract and utilize metadata from video transcriptions and file tags for automated post-production processes like keyword generation, B-roll organization, chapter transitions, and time code marking for calls to action.
29
- Report
30
- Generate a detailed report for a specific video project or episode, including the number of files, chapters, a list of recording IDs (chapter sequence + part number), and the name for the next video recording.
31
- Change Tags
32
- Modify tags or keywords associated with a specific recording ID, allowing for dynamic categorization and organization of video content.
33
- Change Chapter Name
34
- Alter the name of a chapter based on its sequence in the project, facilitating better organization and identification of video content.
35
- Change Chapter Sequence
36
- Adjust the chapter sequence for all files within a chapter, for example, changing from 02 to 03, ensuring consistent and accurate organization of video content.