fli_video 0.1.0 → 0.1.2

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 (29) hide show
  1. checksums.yaml +4 -4
  2. data/{scripts/03-get-technical-design-and-features.rb → .builders/generators/back/scripts/01-get-technical-design-and-feature-list.rb} +5 -0
  3. data/{scripts/02-get-features-and-components.rb → .builders/generators/back/scripts/02-get-feature-list-and-components.rb} +4 -0
  4. data/{scripts/01-get-structure.rb → .builders/generators/back/scripts/03-get-structure.rb} +23 -3
  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 +1 -1
  9. data/.builders/klues/create_project.klue +1 -1
  10. data/.builders/klues/move_to_trash.klue +8 -2
  11. data/.rubocop.yml +5 -1
  12. data/CHANGELOG.md +15 -0
  13. data/README.md +1 -1
  14. data/docs/feature-list.md +1 -0
  15. data/docs/generated/application-structure.json +2 -6
  16. data/docs/generated/features-and-components.md +36 -30
  17. data/docs/generated/technical-design-and-features.md +25 -8
  18. data/docs/project-new.md +184 -0
  19. data/docs/technical-specifications.md +14 -1
  20. data/lib/fli_video/version.rb +1 -1
  21. data/package-lock.json +2 -2
  22. data/package.json +1 -1
  23. data/scripts/01-get-technical-design-and-feature-list.md +5 -0
  24. data/scripts/01-get-technical-design-and-feature-list.rb +39 -0
  25. data/scripts/02-get-feature-list-and-components.md +26 -0
  26. data/scripts/02-get-feature-list-and-components.rb +56 -0
  27. data/scripts/03-get-code-structure.md +33 -0
  28. data/scripts/03-get-code-structure.rb +73 -0
  29. metadata +15 -5
@@ -3,13 +3,16 @@
3
3
  ### Feature <-> DSL GPTs
4
4
  https://chat.openai.com/g/g-AyFi0UOXn-code-simplifier
5
5
 
6
- **Read Global Configuration**
6
+ **Global Configuration**
7
7
  Access and apply global configuration settings for video asset management and state consistency.
8
8
 
9
9
  **Project Configuration**
10
- Access and apply video or episode settings and state.
10
+ Access and apply video or episode settings and state. Infers project settings from existing project folders and files.
11
11
 
12
- **FileWatch Processor for File Event Commands**
12
+ **CLI Project Commands**
13
+ Efficiently execute and manage video project commands using a command-line interface, enhancing control and flexibility in project handling.
14
+
15
+ **FileWatch Processor**
13
16
  Utilize a FileWatch processor to automate file event responses, directing new recordings to designated folders for efficient content management.
14
17
 
15
18
  **Create Project**
@@ -64,9 +67,6 @@ Build a JSON datastore of files for an entire project based on existing project,
64
67
 
65
68
  ## Future Ideas
66
69
 
67
- **CLI Project Management Interface**
68
- Efficiently execute and manage video project commands using a command-line interface, enhancing control and flexibility in project handling.
69
-
70
70
  **Web Command Interface for Video Project Management**
71
71
  Introduce a streamlined, web-based interface for managing video project commands, enabling efficient control and organization of project components through simple browser interactions.
72
72
 
@@ -75,15 +75,15 @@ Generate a detailed report for a specific video project, including the episodes,
75
75
  This should be extracted to an AstroJS Website or HTML template servered by a local webserver and provide viewing and navigation for all my video projects.
76
76
 
77
77
 
78
- ## Klue Components
79
78
 
79
+ ## Klue Components
80
80
  Klue Component: `add_episode.klue`
81
81
 
82
82
  ```ruby
83
83
  component :add_episode do
84
84
  desc "Add a new episode to an existing podcast project."
85
85
 
86
- pattern "Interactor"
86
+ pattern "Command"
87
87
 
88
88
  comments <<~TEXT
89
89
  - Facilitates the addition of a new episode to a specific podcast project.
@@ -105,8 +105,8 @@ component :add_episode do
105
105
  # ~/video-projects/a21-ac-some-podcast/01-episode-about-something/.trash
106
106
  RUBY
107
107
  end
108
- ```
109
108
 
109
+ ```
110
110
  Klue Component: `change_chapter_name.klue`
111
111
 
112
112
  ```ruby
@@ -142,8 +142,8 @@ component :change_chapter_name do
142
142
  # 01-d-intro-CTA.mov
143
143
  RUBY
144
144
  end
145
- ```
146
145
 
146
+ ```
147
147
  Klue Component: `create_chapter_video.klue`
148
148
 
149
149
  ```ruby
@@ -181,15 +181,15 @@ component :create_chapter_video do
181
181
  # Output: '~/video-projects/a27-ac-some-podcast/chapters/01-intro-custom.mov'
182
182
  RUBY
183
183
  end
184
- ```
185
184
 
185
+ ```
186
186
  Klue Component: `create_project.klue`
187
187
 
188
188
  ```ruby
189
189
  component :create_project do
190
190
  desc "Setup a new video project for standalone YouTube video or Podcast."
191
191
 
192
- pattern "Interactor"
192
+ pattern "Command"
193
193
 
194
194
  comments <<~TEXT
195
195
  - Allows the creation of a new project, specifying if it's for a YouTube video or a Podcast.
@@ -223,8 +223,8 @@ component :create_project do
223
223
  # ~/video-projects/a21-ac-some-podcast/.fv.json
224
224
  RUBY
225
225
  end
226
- ```
227
226
 
227
+ ```
228
228
  Klue Component: `empty_trash.klue`
229
229
 
230
230
  ```ruby
@@ -252,8 +252,8 @@ component :empty_trash do
252
252
  # Empties the entire .trash folder in "~/video-projects/a27-ac-categorize-mp4-CI/.trash/
253
253
  RUBY
254
254
  end
255
- ```
256
255
 
256
+ ```
257
257
  Klue Component: `episode_path.klue`
258
258
 
259
259
  ```ruby
@@ -334,8 +334,8 @@ component :episode_path do
334
334
  episode_path.keywords # => ["TODO"]
335
335
  RUBY
336
336
  end
337
- ```
338
337
 
338
+ ```
339
339
  Klue Component: `global_config.klue`
340
340
 
341
341
  ```ruby
@@ -370,8 +370,8 @@ component :global_configuation do
370
370
  method :load
371
371
  method :save
372
372
  end
373
- ```
374
373
 
374
+ ```
375
375
  Klue Component: `move_ecamm_file.klue`
376
376
 
377
377
  ```ruby
@@ -396,8 +396,8 @@ component :move_ecamm_file do
396
396
  # ~/video-projects/a20-ad-some-video/recordings/Ecamm Live Recording on 2023-08-25 at 14.51.58.mov
397
397
  RUBY
398
398
  end
399
- ```
400
399
 
400
+ ```
401
401
  Klue Component: `move_to_trash.klue`
402
402
 
403
403
  ```ruby
@@ -414,9 +414,9 @@ component :move_to_trash do
414
414
 
415
415
  constructure(:parent_project)
416
416
 
417
- method :run(:file_name)
417
+ method :run(:file_name = nil)
418
418
 
419
- sample :move_video_to_trash, <<~RUBY
419
+ sample :move_named_video_to_trash, <<~RUBY
420
420
  project_path = ProjectPath.new('a27')
421
421
 
422
422
  command = move_to_trash.new(project_path)
@@ -424,14 +424,20 @@ component :move_to_trash do
424
424
  # Example of moving a specific suboptimal video take to the trash folder
425
425
  command.run('01-a-introduction.mov')
426
426
  # => "~/video-projects/a27-ac-categorize-mp4-CI/.trash/01-a-introduction.mov"
427
+ RUBY
428
+
429
+ sample :move_last_ecamm__video_to_trash, <<~RUBY
430
+ project_path = ProjectPath.new('a27')
427
431
 
432
+ command = move_to_trash.new(project_path)
433
+
428
434
  # Example of moving the last suboptimal video take to the trash folder
429
435
  command.run
430
436
  # => "~/video-projects/a27-ac-categorize-mp4-CI/.trash/Ecamm Live Recording on 2023-08-25 at 14.51.58.mov
431
437
  RUBY
432
438
  end
433
- ```
434
439
 
440
+ ```
435
441
  Klue Component: `open_in_finder.klue`
436
442
 
437
443
  ```ruby
@@ -460,8 +466,8 @@ component :open_in_finder do
460
466
  # Opens the folder for episode '01' of project 'a27' in Finder
461
467
  RUBY
462
468
  end
463
- ```
464
469
 
470
+ ```
465
471
  Klue Component: `project_config.klue`
466
472
 
467
473
  ```ruby
@@ -588,8 +594,8 @@ component :project_configuration do
588
594
  }
589
595
  JSON
590
596
  end
591
- ```
592
597
 
598
+ ```
593
599
  Klue Component: `project_meta_data_store.klue`
594
600
 
595
601
  ```ruby
@@ -621,8 +627,8 @@ component :project_meta_data_store do
621
627
  # Output: '~/video-projects/a27-ac-categorize-mp4-CI/project_metadata.json'
622
628
  RUBY
623
629
  end
624
- ```
625
630
 
631
+ ```
626
632
  Klue Component: `project_path.klue`
627
633
 
628
634
  ```ruby
@@ -703,8 +709,8 @@ component :project_path do
703
709
  project_path.keywords # => "CI"
704
710
  RUBY
705
711
  end
706
- ```
707
712
 
713
+ ```
708
714
  Klue Component: `recording_file_watcher.klue`
709
715
 
710
716
  ```ruby
@@ -736,8 +742,8 @@ component :filewatch_processor do
736
742
  filewatch_processor.move_file
737
743
  RUBY
738
744
  end
739
- ```
740
745
 
746
+ ```
741
747
  Klue Component: `recording_filename.klue`
742
748
 
743
749
  ```ruby
@@ -853,8 +859,8 @@ component :recording_filename do
853
859
  filename.filename # => "01-a-introduction-NEW_TAG.mov"
854
860
  RUBY
855
861
  end
856
- ```
857
862
 
863
+ ```
858
864
  Klue Component: `restore_from_trash.klue`
859
865
 
860
866
  ```ruby
@@ -887,8 +893,8 @@ component :restore_from_trash do
887
893
  # => "~/video-projects/a27-ac-categorize-mp4-CI/Ecamm Live Recording on 2023-08-25 at 14.51.58.mov"
888
894
  RUBY
889
895
  end
890
- ```
891
896
 
897
+ ```
892
898
  Klue Component: `switch_focus.klue`
893
899
 
894
900
  ```ruby
@@ -916,8 +922,8 @@ component :change_focus do
916
922
  change_focus.run('a21', '02')
917
923
  RUBY
918
924
  end
919
- ```
920
925
 
926
+ ```
921
927
  Klue Component: `text_to_speech.klue`
922
928
 
923
929
  ```ruby
@@ -950,8 +956,8 @@ component :text_to_speech do
950
956
  # Output: Transcriptions saved in '~/video-projects/a27-ac-categorize-mp4-CI/recordings/transcript/01-introduction.txt|srt|vtt|json|tsv'
951
957
  RUBY
952
958
  end
953
- ```
954
959
 
960
+ ```
955
961
  Klue Component: `transcript_data_store.klue`
956
962
 
957
963
  ```ruby
@@ -983,5 +989,5 @@ component :transcript_data_store do
983
989
  # Output: '~/video-projects/a27-ac-categorize-mp4-CI/project_transcripts.json'
984
990
  RUBY
985
991
  end
986
- ```
987
992
 
993
+ ```
@@ -1,6 +1,20 @@
1
+ # FliVideo
2
+
1
3
  ## Application Overview
2
4
 
3
- This document provides an overview of a specialized application designed primarily for video content creators using Ecamm Live on the Mac, and adaptable for OBS users. Tailored for projects ranging from individual YouTube videos to episodes in a podcast series, the application fits seamlessly into the workflow between video recording and editing. It streamlines the post-recording process, encompassing file organization, renaming, and assembly of video recordings, thereby enhancing the efficiency and structure of content creation.
5
+ FliVideo is a Video Asset Managment tool created by a YouTuber `@AppyDave` for YouTubers.
6
+
7
+ It provides a set of image, video and workflow management tools to help its creator 'AppyDave' to automate and systemetize the video production process.
8
+
9
+ The intiial idea behind FliVideo was Zappier for YouTubers, but it is evolving with a range of capabilities around script, b-roll and presenation canvas automation.
10
+
11
+ ### Video Recording Managment
12
+
13
+ FliVideo initially targeted video content creators using Ecamm Live on the Mac, and adaptable for OBS users.
14
+
15
+ Tailored for projects ranging from individual YouTube videos to episodes in a podcast series, the application fits seamlessly into the workflow between video recording and editing.
16
+
17
+ It streamlines the post-recording process, encompassing file organization, renaming, and assembly of video recordings, thereby enhancing the efficiency and structure of content creation.
4
18
 
5
19
  ### Core Functionality
6
20
 
@@ -74,8 +88,8 @@ a29-ac-gpts-analyze-pdf-transations
74
88
 
75
89
  ### Sample project codes
76
90
 
77
- - `ac` - AppyCast
78
91
  - `ad` - AppyDave
92
+ - `ac` - AppyDaveCoding
79
93
  - `fv` - FliVideo
80
94
  - `wp` - WinningPrompts
81
95
  - `c9` - Carnivore90
@@ -343,18 +357,23 @@ project-name/recordings/03-a-outro.mov
343
357
  project-name/recordings/03-b-outro-cta.mov
344
358
  project-name/recordings/03-c-outro.mov
345
359
  ```
360
+
361
+
346
362
  ## Features
347
363
 
348
364
  ### Feature <-> DSL GPTs
349
365
  https://chat.openai.com/g/g-AyFi0UOXn-code-simplifier
350
366
 
351
- **Read Global Configuration**
367
+ **Global Configuration**
352
368
  Access and apply global configuration settings for video asset management and state consistency.
353
369
 
354
370
  **Project Configuration**
355
- Access and apply video or episode settings and state.
371
+ Access and apply video or episode settings and state. Infers project settings from existing project folders and files.
372
+
373
+ **CLI Project Commands**
374
+ Efficiently execute and manage video project commands using a command-line interface, enhancing control and flexibility in project handling.
356
375
 
357
- **FileWatch Processor for File Event Commands**
376
+ **FileWatch Processor**
358
377
  Utilize a FileWatch processor to automate file event responses, directing new recordings to designated folders for efficient content management.
359
378
 
360
379
  **Create Project**
@@ -409,12 +428,10 @@ Build a JSON datastore of files for an entire project based on existing project,
409
428
 
410
429
  ## Future Ideas
411
430
 
412
- **CLI Project Management Interface**
413
- Efficiently execute and manage video project commands using a command-line interface, enhancing control and flexibility in project handling.
414
-
415
431
  **Web Command Interface for Video Project Management**
416
432
  Introduce a streamlined, web-based interface for managing video project commands, enabling efficient control and organization of project components through simple browser interactions.
417
433
 
418
434
  **Project Meta Report**
419
435
  Generate a detailed report for a specific video project, including the episodes, chapters, recordings, a list of recording IDs (chapter sequence + part sequence), and the name for the next video recording, file sizes.
420
436
  This should be extracted to an AstroJS Website or HTML template servered by a local webserver and provide viewing and navigation for all my video projects.
437
+
@@ -0,0 +1,184 @@
1
+ # Requirements Document for Project Management Tool
2
+
3
+ ## 1. Overview
4
+ This document outlines the requirements for a command-line tool and supporting backend system for creating, renaming, and managing projects across multiple business units. The tool uses sequential naming conventions and integrates with a web server API for centralized management. This system is designed for a single-user environment.
5
+
6
+ ## 2. Business Objectives
7
+ - Automate project creation, renaming, and listing for multiple business units.
8
+ - Maintain consistent naming conventions with sequential identifiers.
9
+ - Enforce folder structures based on project types.
10
+ - Separate business rules between local and server environments for scalability.
11
+
12
+ ## 3. Functional Requirements
13
+
14
+ ### 3.1 Command-Line Tool
15
+ The tool provides the following commands:
16
+
17
+ #### 3.1.1 Creating a New Project
18
+ **Command:**
19
+ ```
20
+ ad-project-new <business_unit> <project_type> "<project_name>"
21
+ ```
22
+ **Example:**
23
+ ```
24
+ ad-project-new appydave video "hello-world"
25
+ ```
26
+ **Expected Outcome:**
27
+ - Generates a new project folder.
28
+ - Assigns a sequential identifier, e.g., `a05-hello-world`.
29
+ - Logs the output:
30
+ ```yaml
31
+ Project created: a05-hello-world
32
+ ```
33
+
34
+ #### 3.1.2 Renaming a Project
35
+ **Command:**
36
+ ```
37
+ ad-project-rename <business_unit> <project_type> <project_id> "<new_project_name>"
38
+ ```
39
+ **Example:**
40
+ ```
41
+ ad-project-rename appydave video a05 "rails8"
42
+ ```
43
+ **Expected Outcome:**
44
+ - Updates the project folder name to `a05-rails8`.
45
+ - Logs the change:
46
+ ```yaml
47
+ Project renamed: a05-rails8
48
+ ```
49
+
50
+ #### 3.1.3 Listing Projects
51
+ **Command for all projects:**
52
+ ```
53
+ ad-project-list <business_unit> <project_type>
54
+ ```
55
+ **Command for last N projects:**
56
+ ```
57
+ ad-project-list <business_unit> <project_type> -l <number>
58
+ ```
59
+ **Examples:**
60
+
61
+ **All Projects:**
62
+ ```
63
+ ad-project-list appydave video
64
+ ```
65
+ **Output:**
66
+ ```css
67
+ a01-intro-video
68
+ a02-tutorial
69
+ a03-promo-video
70
+ ```
71
+
72
+ **Last 3 Projects:**
73
+ ```
74
+ ad-project-list appydave video -l 3
75
+ ```
76
+ **Output:**
77
+ ```css
78
+ a03-promo-video
79
+ a02-tutorial
80
+ a01-intro-video
81
+ ```
82
+
83
+ ## 4. Non-Functional Requirements
84
+ - Must work as a single-user tool on the local environment.
85
+ - The command-line tool will interact with the backend via RESTful APIs to ensure database consistency.
86
+
87
+ ## 5. Entities and Database Design
88
+
89
+ ### 5.1 Entities
90
+ - **Business Unit**: Represents channels like "AppyDave" or "AITLDR".
91
+ - **Project Type**: Defines types like "Video" or "Article".
92
+ - **Project**: Tracks individual projects, including name and sequential identifier.
93
+ - **Folder Structure**: Stores default folders for each project type.
94
+
95
+ ### 5.2 Entity Relationship Diagram (ERD)
96
+ **ERD Diagram Description:**
97
+ - **Business Unit** links to **Project** (one-to-many relationship).
98
+ - **Project Type** links to **Folder Structure** (one-to-one relationship).
99
+ - **Project** has attributes like ID, Name, and Type.
100
+
101
+ (An actual diagram would be helpful here; I can generate one if needed.)
102
+
103
+ ## 6. System Architecture
104
+
105
+ ### 6.1 Web Server
106
+ - Maintains the central database.
107
+ - Provides RESTful APIs:
108
+ - `POST /projects`: Create a new project.
109
+ - `PUT /projects/:id`: Rename a project.
110
+ - `GET /projects`: List projects.
111
+
112
+ ### 6.2 Command-Line Tool
113
+ - Acts as a local interface to execute commands.
114
+ - Interacts with the web server for updates and fetching data.
115
+
116
+ ## 7. Example API Interactions
117
+
118
+ ### 7.1 Create a New Project
119
+ **Request:**
120
+ ```
121
+ POST /projects
122
+ Content-Type: application/json
123
+
124
+ {
125
+ "business_unit": "appydave",
126
+ "project_type": "video",
127
+ "project_name": "hello-world"
128
+ }
129
+ ```
130
+ **Response:**
131
+ ```json
132
+ {
133
+ "status": "success",
134
+ "project_id": "a05",
135
+ "project_name": "a05-hello-world"
136
+ }
137
+ ```
138
+
139
+ ### 7.2 Rename a Project
140
+ **Request:**
141
+ ```
142
+ PUT /projects/a05
143
+ Content-Type: application/json
144
+
145
+ {
146
+ "new_name": "rails8"
147
+ }
148
+ ```
149
+ **Response:**
150
+ ```json
151
+ {
152
+ "status": "success",
153
+ "project_name": "a05-rails8"
154
+ }
155
+ ```
156
+
157
+ ### 7.3 List Projects
158
+ **Request:**
159
+ ```
160
+ GET /projects?business_unit=appydave&project_type=video&limit=3
161
+ ```
162
+ **Response:**
163
+ ```json
164
+ [
165
+ {
166
+ "id": "a03",
167
+ "name": "promo-video"
168
+ },
169
+ {
170
+ "id": "a02",
171
+ "name": "tutorial"
172
+ },
173
+ {
174
+ "id": "a01",
175
+ "name": "intro-video"
176
+ }
177
+ ]
178
+ ```
179
+
180
+ ## 8. Corrections and Finalized Decisions
181
+ - Sequential identifiers are three letters followed by a number (e.g., `a05`), followed by the project name.
182
+ - Output logs should always include the project identifier for user reference.
183
+ - Simplified to focus on a single-user environment.
184
+
@@ -2,7 +2,19 @@
2
2
 
3
3
  ## Application Overview
4
4
 
5
- This document provides an overview of a specialized application designed primarily for video content creators using Ecamm Live on the Mac, and adaptable for OBS users. Tailored for projects ranging from individual YouTube videos to episodes in a podcast series, the application fits seamlessly into the workflow between video recording and editing. It streamlines the post-recording process, encompassing file organization, renaming, and assembly of video recordings, thereby enhancing the efficiency and structure of content creation.
5
+ FliVideo is a Video Asset Managment tool created by a YouTuber `@AppyDave` for YouTubers.
6
+
7
+ It provides a set of image, video and workflow management tools to help its creator 'AppyDave' to automate and systemetize the video production process.
8
+
9
+ The intiial idea behind FliVideo was Zappier for YouTubers, but it is evolving with a range of capabilities around script, b-roll and presenation canvas automation.
10
+
11
+ ### Video Recording Managment
12
+
13
+ FliVideo initially targeted video content creators using Ecamm Live on the Mac, and adaptable for OBS users.
14
+
15
+ Tailored for projects ranging from individual YouTube videos to episodes in a podcast series, the application fits seamlessly into the workflow between video recording and editing.
16
+
17
+ It streamlines the post-recording process, encompassing file organization, renaming, and assembly of video recordings, thereby enhancing the efficiency and structure of content creation.
6
18
 
7
19
  ### Core Functionality
8
20
 
@@ -345,3 +357,4 @@ project-name/recordings/03-a-outro.mov
345
357
  project-name/recordings/03-b-outro-cta.mov
346
358
  project-name/recordings/03-c-outro.mov
347
359
  ```
360
+
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FliVideo
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.2'
5
5
  end
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "fli_video",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "fli_video",
9
- "version": "0.1.0",
9
+ "version": "0.1.2",
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": "fli_video",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "FliVideo - Video Asset Management for Content Creators",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
@@ -0,0 +1,5 @@
1
+ ## Prompt:
2
+
3
+ Write a Ruby script to read `docs/technical-specifictions.md` and `docs/feature-list.md`,
4
+ and merge their content into `docs/generated/technical-design-and-features.md` and copy it to the clipboard.
5
+
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # Method to read file contents
4
+ def read_file(file_path)
5
+ begin
6
+ File.read(file_path)
7
+ rescue => e
8
+ puts "Error reading file #{file_path}: #{e}"
9
+ ""
10
+ end
11
+ end
12
+
13
+ # Method to write content to a file
14
+ def write_file(file_path, *contents)
15
+ merged_content = contents.join("\n")
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, merged_content)
20
+ rescue => e
21
+ puts "Error writing to file #{file_path}: #{e}"
22
+ end
23
+ end
24
+
25
+ # Method to copy content to clipboard
26
+ def copy_to_clipboard(content)
27
+ IO.popen('pbcopy', 'w') { |clip| clip.puts content }
28
+ end
29
+
30
+ # Main execution
31
+ technical_design = read_file('docs/technical-specifications.md')
32
+ feature_list = read_file('docs/feature-list.md')
33
+ output_file = 'docs/generated/technical-design-and-features.md'
34
+
35
+ # Merge and write the content to the output file
36
+ write_file(output_file, technical_design, feature_list)
37
+
38
+ # Copy content to clipboard
39
+ copy_to_clipboard("#{technical_design}\n#{feature_list}")
@@ -0,0 +1,26 @@
1
+ ## Prompt:
2
+
3
+ Write a Ruby script to read `docs/feature-list.md` and merge it with content from `.builders/klues/*.klue` files.
4
+ Write the result to `docs/generated/features-and-components.md` and copy it to the clipboard.
5
+
6
+ The Klue files should need a heading: "Klue Components"
7
+
8
+ The content from each Klue file have a simple heading and be wraped with in a code block with the language set to ruby.
9
+
10
+ Example:
11
+
12
+
13
+ ## Klue Components
14
+
15
+ Klue Component: `add_episode.klue`
16
+
17
+ ```ruby
18
+ # content of add_episode.klue goes here
19
+ ```
20
+
21
+ Klue Component: `change_chapter_name.klue`
22
+
23
+ ```ruby
24
+ # content of change_chapter_name.klue goes here
25
+ ```
26
+