fli_video 0.0.2 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.builders/generators/back/scripts/01-get-technical-design-and-feature-list.rb +32 -0
- data/.builders/generators/back/scripts/02-get-feature-list-and-components.rb +42 -0
- data/.builders/generators/back/scripts/03-get-structure.rb +104 -0
- data/.builders/generators/back/scripts/generated/application-structure.json +231 -0
- data/.builders/generators/back/scripts/generated/features-and-components.md +988 -0
- data/.builders/generators/back/scripts/generated/technical-design-and-features.md +424 -0
- data/.builders/klues/add_episode.klue +25 -0
- data/.builders/klues/change_chapter_name.klue +32 -0
- data/.builders/klues/create_chapter_video.klue +34 -0
- data/.builders/klues/create_project.klue +37 -0
- data/.builders/klues/empty_trash.klue +24 -0
- data/.builders/klues/episode_path.klue +77 -0
- data/.builders/klues/global_config.klue +31 -0
- data/.builders/klues/move_ecamm_file.klue +21 -0
- data/.builders/klues/move_to_trash.klue +35 -0
- data/.builders/klues/open_in_finder.klue +25 -0
- data/.builders/klues/project_config.klue +123 -0
- data/.builders/klues/project_meta_data_store.klue +28 -0
- data/.builders/klues/project_path.klue +77 -0
- data/.builders/klues/recording_file_watcher.klue +28 -0
- data/.builders/klues/recording_filename.klue +112 -0
- data/.builders/klues/restore_from_trash.klue +29 -0
- data/.builders/klues/switch_focus.klue +24 -0
- data/.builders/klues/text_to_speech.klue +29 -0
- data/.builders/klues/transcript_data_store.klue +28 -0
- data/.rubocop.yml +2 -0
- data/CHANGELOG.md +26 -0
- data/README.md +13 -20
- data/bin/fli_video +6 -0
- data/docs/feature-list.md +76 -0
- data/docs/generated/application-structure.json +53 -0
- data/docs/generated/features-and-components.md +993 -0
- data/docs/generated/technical-design-and-features.md +437 -0
- data/docs/technical-specifications.md +360 -0
- data/fli.rb +138 -0
- data/lib/fli_video/cli.rb +30 -0
- data/lib/fli_video/version.rb +1 -1
- data/package-lock.json +2 -2
- data/package.json +1 -1
- data/scripts/01-get-technical-design-and-feature-list.md +5 -0
- data/scripts/01-get-technical-design-and-feature-list.rb +39 -0
- data/scripts/02-get-feature-list-and-components.md +26 -0
- data/scripts/02-get-feature-list-and-components.rb +56 -0
- data/scripts/03-get-code-structure.md +33 -0
- data/scripts/03-get-code-structure.rb +73 -0
- metadata +41 -3
- data/README-features.md +0 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c7a6c05e77e2419355d0face10ceb668c380fd811cb6f8a950f4e33e5f14ad0
|
4
|
+
data.tar.gz: be44ae3f44ce9370d6643b59d2429b47ce64a54fc2fc735a6e6e1f1286cd4a58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 126713356dcb007247fd0425492555d06b5ea7e5c2e95b1c4363fb3d713b91219f50b6ea2e4515f4bf3b29756dd6d82961e1f91448816bcff7a759b208265063
|
7
|
+
data.tar.gz: 92d109890b7c57b84b297bdf8cd8d08a62ebb924ea3f0dbccf3d1c1eb7c9310260d2e2b2a06f3fd0b1e63bb8b6aea50498f33cde304fba9d4db46138b0762e80
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# Prompt:
|
2
|
+
# Write a Ruby script to read docs/technical-specifictions.md and docs/feature-list.md,
|
3
|
+
# merge their content into docs/generated/technical-design-and-features.md
|
4
|
+
# and copy it to the clipboard.
|
5
|
+
|
6
|
+
require 'json'
|
7
|
+
|
8
|
+
def read_file(file_name)
|
9
|
+
puts "Reading file #{file_name}"
|
10
|
+
File.read(file_name)
|
11
|
+
rescue => e
|
12
|
+
puts "Error reading file #{file_name}: #{e.message}"
|
13
|
+
''
|
14
|
+
end
|
15
|
+
|
16
|
+
def write_file(file_name, technical_design, feature_list)
|
17
|
+
File.open(file_name, 'w') do |file|
|
18
|
+
file.write(technical_design)
|
19
|
+
file.write(feature_list)
|
20
|
+
end
|
21
|
+
rescue => e
|
22
|
+
puts "Error writing to file #{file_name}: #{e.message}"
|
23
|
+
end
|
24
|
+
|
25
|
+
# Main execution
|
26
|
+
technical_design = read_file('docs/technical-specifications.md')
|
27
|
+
feature_list = read_file('docs/feature-list.md')
|
28
|
+
output_file = 'docs/generated/technical-design-and-features.md'
|
29
|
+
|
30
|
+
write_file(output_file, technical_design, feature_list)
|
31
|
+
|
32
|
+
IO.popen('pbcopy', 'w') { |io| io.puts File.read(output_file) }
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# Prompt:
|
2
|
+
# Write a Ruby script to read docs/feature-list.md and merge it with content from .builders/klues/*.klue files
|
3
|
+
# into docs/generated/features-and-components.md, then copy the result to the clipboard.
|
4
|
+
|
5
|
+
require 'json'
|
6
|
+
|
7
|
+
def read_file(file_name)
|
8
|
+
puts "Reading file #{file_name}"
|
9
|
+
File.read(file_name)
|
10
|
+
rescue => e
|
11
|
+
puts "Error reading file #{file_name}: #{e.message}"
|
12
|
+
''
|
13
|
+
end
|
14
|
+
|
15
|
+
def read_klue_files(path)
|
16
|
+
klue_content = ''
|
17
|
+
Dir.glob(File.join(path, '*.klue')).each do |file|
|
18
|
+
klue_content += "Klue Component: `#{File.basename(file)}`\n"
|
19
|
+
klue_content += "\n```ruby\n"
|
20
|
+
klue_content += read_file(file)
|
21
|
+
klue_content += "```\n\n"
|
22
|
+
end
|
23
|
+
klue_content
|
24
|
+
end
|
25
|
+
|
26
|
+
def write_features_and_components_to_file(file_name, features_content, klue_content)
|
27
|
+
File.open(file_name, 'w') do |file|
|
28
|
+
file.write(features_content)
|
29
|
+
file.write("\n\n## Klue Components\n\n")
|
30
|
+
file.write(klue_content)
|
31
|
+
end
|
32
|
+
rescue => e
|
33
|
+
puts "Error writing to file #{file_name}: #{e.message}"
|
34
|
+
end
|
35
|
+
|
36
|
+
# Main execution
|
37
|
+
features_content = read_file('docs/feature-list.md')
|
38
|
+
klue_content = read_klue_files('.builders/klues')
|
39
|
+
|
40
|
+
write_features_and_components_to_file('docs/generated/features-and-components.md', features_content, klue_content)
|
41
|
+
|
42
|
+
IO.popen('pbcopy', 'w') { |io| io.puts File.read('docs/generated/features-and-components.md') }
|
@@ -0,0 +1,104 @@
|
|
1
|
+
# Prompt:
|
2
|
+
Create a Ruby script to scan a project's directory, ignoring specific folders and files. For the remaining files,
|
3
|
+
especially *.rb, generate a JSON file with their structure and content. and write to docs/generated/application-structure.json
|
4
|
+
Store a copy of the data in the clipboard
|
5
|
+
|
6
|
+
Sample Structure
|
7
|
+
```json
|
8
|
+
[
|
9
|
+
{
|
10
|
+
"name": "bin",
|
11
|
+
"type": "directory",
|
12
|
+
"children": [
|
13
|
+
{
|
14
|
+
"name": "fli.rb",
|
15
|
+
"type": "file",
|
16
|
+
"content": "require 'fli_video'\n\nFliVideo::CLI.start(ARGV)\n"
|
17
|
+
}
|
18
|
+
]
|
19
|
+
}
|
20
|
+
]
|
21
|
+
```
|
22
|
+
|
23
|
+
require 'json'
|
24
|
+
|
25
|
+
def include_file_content?(file_name, include_content_for)
|
26
|
+
include_content_for.any? do |criteria|
|
27
|
+
if criteria[:pattern]
|
28
|
+
File.fnmatch(criteria[:pattern], file_name)
|
29
|
+
elsif criteria[:file]
|
30
|
+
criteria[:file] == file_name
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def list_dir(path, ignore_folders, ignore_files, include_content_for)
|
36
|
+
entries = Dir.entries(path) - %w[. ..] - ignore_folders - ignore_files
|
37
|
+
entries.map do |entry|
|
38
|
+
full_path = File.join(path, entry)
|
39
|
+
if File.directory?(full_path)
|
40
|
+
{ name: entry, type: 'directory', children: list_dir(full_path, ignore_folders, ignore_files, include_content_for) }
|
41
|
+
else
|
42
|
+
file_info = { name: entry, type: 'file' }
|
43
|
+
file_info[:content] = File.read(full_path) if include_file_content?(entry, include_content_for)
|
44
|
+
file_info
|
45
|
+
end
|
46
|
+
end
|
47
|
+
rescue => e
|
48
|
+
puts "Error reading directory #{path}: #{e.message}"
|
49
|
+
[]
|
50
|
+
end
|
51
|
+
|
52
|
+
def write_structure_to_file(file_name, structure)
|
53
|
+
File.open(file_name, 'w') do |file|
|
54
|
+
file.write(JSON.pretty_generate(structure))
|
55
|
+
end
|
56
|
+
rescue => e
|
57
|
+
puts "Error writing to file #{file_name}: #{e.message}"
|
58
|
+
end
|
59
|
+
|
60
|
+
def build_gpt_content(structure, path = '')
|
61
|
+
gpt_content = ''
|
62
|
+
structure.each do |item|
|
63
|
+
full_path = path.empty? ? item[:name] : File.join(path, item[:name])
|
64
|
+
|
65
|
+
if item[:type] == 'file'
|
66
|
+
gpt_content += "File: #{full_path}\n" # Line 1: Path/File name
|
67
|
+
gpt_content += "#{item[:content]}\n" if item.key?(:content) # Line 2: Content (if exists)
|
68
|
+
gpt_content += "\n" # Line 3: Blank line
|
69
|
+
elsif item[:type] == 'directory'
|
70
|
+
gpt_content += build_gpt_content(item[:children], full_path) # Recursively handle directories
|
71
|
+
end
|
72
|
+
end
|
73
|
+
gpt_content
|
74
|
+
end
|
75
|
+
|
76
|
+
# Usage example:
|
77
|
+
ignore_folders = ['tmp', 'log', '.git', '.githooks', '.github', 'bin', 'sig', 'node_modules', '.builders', 'docs', 'scripts']
|
78
|
+
ignore_files = [
|
79
|
+
'fli.rb',
|
80
|
+
'application-structure.json',
|
81
|
+
'.releaserc.json',
|
82
|
+
'CODE_OF_CONDUCT.md',
|
83
|
+
'Guardfile',
|
84
|
+
'.rspec',
|
85
|
+
'CHANGELOG.md',
|
86
|
+
'.tool-versions',
|
87
|
+
'Rakefile',
|
88
|
+
'Gemfile.lock',
|
89
|
+
'.gitignore',
|
90
|
+
'package-lock.json',
|
91
|
+
'package.json',
|
92
|
+
'.rubocop.yml',
|
93
|
+
'LICENSE.txt',
|
94
|
+
'fli_video.gemspec',
|
95
|
+
'01-get-structure.rb'
|
96
|
+
]
|
97
|
+
include_content_for = [
|
98
|
+
{ pattern: '*.rb' },
|
99
|
+
]
|
100
|
+
|
101
|
+
structure = list_dir('.', ignore_folders, ignore_files, include_content_for)
|
102
|
+
write_structure_to_file('docs/generated/application-structure.json', structure)
|
103
|
+
gpt_content = build_gpt_content(structure)
|
104
|
+
copy_to_clipboard(gpt_content)
|
@@ -0,0 +1,231 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"name": ".rspec_status",
|
4
|
+
"type": "file"
|
5
|
+
},
|
6
|
+
{
|
7
|
+
"name": "spec",
|
8
|
+
"type": "directory",
|
9
|
+
"children": [
|
10
|
+
{
|
11
|
+
"name": "spec_helper.rb",
|
12
|
+
"type": "file",
|
13
|
+
"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"
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"name": "fli_video_spec.rb",
|
17
|
+
"type": "file",
|
18
|
+
"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"
|
19
|
+
}
|
20
|
+
]
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"name": "README.md",
|
24
|
+
"type": "file"
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"name": "lib",
|
28
|
+
"type": "directory",
|
29
|
+
"children": [
|
30
|
+
{
|
31
|
+
"name": "fli_video",
|
32
|
+
"type": "directory",
|
33
|
+
"children": [
|
34
|
+
{
|
35
|
+
"name": "cli.rb",
|
36
|
+
"type": "file",
|
37
|
+
"content": "# frozen_string_literal: true\n\nrequire_relative '../fli_video'\n\nmodule FliVideo\n # FliVideo::CLI is the command line interface for the FliVideo gem.\n class CLI\n def self.start(args)\n new(args).execute\n end\n\n def initialize(args)\n @args = args\n end\n\n def execute\n if @args.empty?\n puts 'FliVideo CLI - No command provided'\n return\n end\n\n case @args.first\n when 'version'\n puts \"FliVideo version #{FliVideo::VERSION}\"\n else\n puts \"Unknown command: #{@args.first}\"\n end\n end\n end\nend\n"
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"name": "version.rb",
|
41
|
+
"type": "file",
|
42
|
+
"content": "# frozen_string_literal: true\n\nmodule FliVideo\n VERSION = '0.1.0'\nend\n"
|
43
|
+
}
|
44
|
+
]
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"name": "fli_video.rb",
|
48
|
+
"type": "file",
|
49
|
+
"content": "# frozen_string_literal: true\n\nrequire_relative 'fli_video/version'\n\nmodule FliVideo\n class Error < StandardError; end\n # Your code goes here...\nend\n"
|
50
|
+
}
|
51
|
+
]
|
52
|
+
},
|
53
|
+
{
|
54
|
+
"name": "Gemfile",
|
55
|
+
"type": "file"
|
56
|
+
},
|
57
|
+
{
|
58
|
+
"name": "coverage",
|
59
|
+
"type": "directory",
|
60
|
+
"children": [
|
61
|
+
{
|
62
|
+
"name": "index.html",
|
63
|
+
"type": "file"
|
64
|
+
},
|
65
|
+
{
|
66
|
+
"name": ".last_run.json",
|
67
|
+
"type": "file"
|
68
|
+
},
|
69
|
+
{
|
70
|
+
"name": ".resultset.json",
|
71
|
+
"type": "file"
|
72
|
+
},
|
73
|
+
{
|
74
|
+
"name": "assets",
|
75
|
+
"type": "directory",
|
76
|
+
"children": [
|
77
|
+
{
|
78
|
+
"name": "0.12.3",
|
79
|
+
"type": "directory",
|
80
|
+
"children": [
|
81
|
+
{
|
82
|
+
"name": "images",
|
83
|
+
"type": "directory",
|
84
|
+
"children": [
|
85
|
+
{
|
86
|
+
"name": "ui-icons_cd0a0a_256x240.png",
|
87
|
+
"type": "file"
|
88
|
+
},
|
89
|
+
{
|
90
|
+
"name": "ui-icons_888888_256x240.png",
|
91
|
+
"type": "file"
|
92
|
+
},
|
93
|
+
{
|
94
|
+
"name": "ui-bg_glass_75_dadada_1x400.png",
|
95
|
+
"type": "file"
|
96
|
+
},
|
97
|
+
{
|
98
|
+
"name": "ui-icons_2e83ff_256x240.png",
|
99
|
+
"type": "file"
|
100
|
+
},
|
101
|
+
{
|
102
|
+
"name": "ui-bg_flat_75_ffffff_40x100.png",
|
103
|
+
"type": "file"
|
104
|
+
},
|
105
|
+
{
|
106
|
+
"name": "ui-bg_glass_75_e6e6e6_1x400.png",
|
107
|
+
"type": "file"
|
108
|
+
},
|
109
|
+
{
|
110
|
+
"name": "ui-bg_glass_65_ffffff_1x400.png",
|
111
|
+
"type": "file"
|
112
|
+
},
|
113
|
+
{
|
114
|
+
"name": "ui-bg_glass_95_fef1ec_1x400.png",
|
115
|
+
"type": "file"
|
116
|
+
},
|
117
|
+
{
|
118
|
+
"name": "ui-icons_222222_256x240.png",
|
119
|
+
"type": "file"
|
120
|
+
},
|
121
|
+
{
|
122
|
+
"name": "ui-bg_highlight-soft_75_cccccc_1x100.png",
|
123
|
+
"type": "file"
|
124
|
+
},
|
125
|
+
{
|
126
|
+
"name": "ui-bg_glass_55_fbf9ee_1x400.png",
|
127
|
+
"type": "file"
|
128
|
+
},
|
129
|
+
{
|
130
|
+
"name": "ui-icons_454545_256x240.png",
|
131
|
+
"type": "file"
|
132
|
+
},
|
133
|
+
{
|
134
|
+
"name": "ui-bg_flat_0_aaaaaa_40x100.png",
|
135
|
+
"type": "file"
|
136
|
+
}
|
137
|
+
]
|
138
|
+
},
|
139
|
+
{
|
140
|
+
"name": "application.css",
|
141
|
+
"type": "file"
|
142
|
+
},
|
143
|
+
{
|
144
|
+
"name": "loading.gif",
|
145
|
+
"type": "file"
|
146
|
+
},
|
147
|
+
{
|
148
|
+
"name": "colorbox",
|
149
|
+
"type": "directory",
|
150
|
+
"children": [
|
151
|
+
{
|
152
|
+
"name": "border.png",
|
153
|
+
"type": "file"
|
154
|
+
},
|
155
|
+
{
|
156
|
+
"name": "loading.gif",
|
157
|
+
"type": "file"
|
158
|
+
},
|
159
|
+
{
|
160
|
+
"name": "controls.png",
|
161
|
+
"type": "file"
|
162
|
+
},
|
163
|
+
{
|
164
|
+
"name": "loading_background.png",
|
165
|
+
"type": "file"
|
166
|
+
}
|
167
|
+
]
|
168
|
+
},
|
169
|
+
{
|
170
|
+
"name": "favicon_red.png",
|
171
|
+
"type": "file"
|
172
|
+
},
|
173
|
+
{
|
174
|
+
"name": "favicon_green.png",
|
175
|
+
"type": "file"
|
176
|
+
},
|
177
|
+
{
|
178
|
+
"name": "favicon_yellow.png",
|
179
|
+
"type": "file"
|
180
|
+
},
|
181
|
+
{
|
182
|
+
"name": "DataTables-1.10.20",
|
183
|
+
"type": "directory",
|
184
|
+
"children": [
|
185
|
+
{
|
186
|
+
"name": "images",
|
187
|
+
"type": "directory",
|
188
|
+
"children": [
|
189
|
+
{
|
190
|
+
"name": "sort_asc_disabled.png",
|
191
|
+
"type": "file"
|
192
|
+
},
|
193
|
+
{
|
194
|
+
"name": "sort_both.png",
|
195
|
+
"type": "file"
|
196
|
+
},
|
197
|
+
{
|
198
|
+
"name": "sort_desc_disabled.png",
|
199
|
+
"type": "file"
|
200
|
+
},
|
201
|
+
{
|
202
|
+
"name": "sort_desc.png",
|
203
|
+
"type": "file"
|
204
|
+
},
|
205
|
+
{
|
206
|
+
"name": "sort_asc.png",
|
207
|
+
"type": "file"
|
208
|
+
}
|
209
|
+
]
|
210
|
+
}
|
211
|
+
]
|
212
|
+
},
|
213
|
+
{
|
214
|
+
"name": "magnify.png",
|
215
|
+
"type": "file"
|
216
|
+
},
|
217
|
+
{
|
218
|
+
"name": "application.js",
|
219
|
+
"type": "file"
|
220
|
+
}
|
221
|
+
]
|
222
|
+
}
|
223
|
+
]
|
224
|
+
},
|
225
|
+
{
|
226
|
+
"name": ".resultset.json.lock",
|
227
|
+
"type": "file"
|
228
|
+
}
|
229
|
+
]
|
230
|
+
}
|
231
|
+
]
|