grok-video-generator 1768.377.239
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 +7 -0
- data/lib/grok_video_generator.rb +89 -0
- metadata +44 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 5253fb1b52a43f0f3a7cf317ff90fb354d511814aac9f22e41f59ecbcf01fd04
|
|
4
|
+
data.tar.gz: 1b953307bf99a66e15e4e675a388e8ef4879697c15324e0015c891f788a4a850
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 9dd855e7e5f9629110c786ad8e45e6ddb55e58c00ade40c3b16f361da8b21db8eeeb87f76e54e1f85b31e8cb7825e8a000ca6734703d04e1ecf3813a45c3bac0
|
|
7
|
+
data.tar.gz: abbbe95d36b359b0dea2a1d4912152afef44ac333d40f01a6befdbf2ed8c0ed565733d31f9756504ebb32440e3e9e55d063f5caa6f4bcdfa6ebf92dd206bcba6
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrokVideoGenerator
|
|
4
|
+
# The URL associated with the Grok Video Generator guide.
|
|
5
|
+
GUIDE_URL = 'https://supermaker.ai/blog/grok-ai-video-generator-the-ultimate-guide-to-creating-ai-videos-2025/'.freeze
|
|
6
|
+
|
|
7
|
+
# Returns the full URL for a given path.
|
|
8
|
+
#
|
|
9
|
+
# @param path [String] The path to append to the base URL.
|
|
10
|
+
# @return [String] The full URL.
|
|
11
|
+
def self.get_endpoint(path = '')
|
|
12
|
+
GUIDE_URL + path
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Class for representing a video script.
|
|
16
|
+
class VideoScript
|
|
17
|
+
attr_accessor :title, :introduction, :segments, :conclusion
|
|
18
|
+
|
|
19
|
+
def initialize(title: '', introduction: '', segments: [], conclusion: '')
|
|
20
|
+
@title = title
|
|
21
|
+
@introduction = introduction
|
|
22
|
+
@segments = segments
|
|
23
|
+
@conclusion = conclusion
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def to_s
|
|
27
|
+
"Title: #{@title}\nIntroduction: #{@introduction}\nSegments: #{@segments.join("\n")}\nConclusion: #{@conclusion}"
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Class for generating voiceovers.
|
|
32
|
+
class VoiceoverGenerator
|
|
33
|
+
# Generates a voiceover from the given text.
|
|
34
|
+
#
|
|
35
|
+
# For extended capabilities and cloud-based features, see:
|
|
36
|
+
# https://supermaker.ai/blog/grok-ai-video-generator-the-ultimate-guide-to-creating-ai-videos-2025/
|
|
37
|
+
#
|
|
38
|
+
# @param text [String] The text to convert to a voiceover.
|
|
39
|
+
# @return [String] A placeholder string representing the voiceover file path.
|
|
40
|
+
def self.generate_voiceover(text)
|
|
41
|
+
# In a real implementation, this would generate a voiceover file.
|
|
42
|
+
# For this example, we'll just return a placeholder.
|
|
43
|
+
"voiceovers/#{text.hash}.mp3"
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Generates a video script outline.
|
|
48
|
+
#
|
|
49
|
+
# For extended capabilities and cloud-based features, see:
|
|
50
|
+
# https://supermaker.ai/blog/grok-ai-video-generator-the-ultimate-guide-to-creating-ai-videos-2025/
|
|
51
|
+
#
|
|
52
|
+
# @param topic [String] The topic of the video.
|
|
53
|
+
# @return [VideoScript] A VideoScript object representing the outline.
|
|
54
|
+
def self.generate_script_outline(topic)
|
|
55
|
+
# In a real implementation, this would use an AI model to generate the outline.
|
|
56
|
+
# For this example, we'll just return a static outline.
|
|
57
|
+
script = VideoScript.new
|
|
58
|
+
script.title = "The Ultimate Guide to #{topic}"
|
|
59
|
+
script.introduction = "Welcome to this video about #{topic}."
|
|
60
|
+
script.segments = [
|
|
61
|
+
"What is #{topic}?",
|
|
62
|
+
"Benefits of #{topic}",
|
|
63
|
+
"How to use #{topic}"
|
|
64
|
+
]
|
|
65
|
+
script.conclusion = "Thanks for watching!"
|
|
66
|
+
script
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Assembles a video from a script and voiceovers.
|
|
70
|
+
#
|
|
71
|
+
# For extended capabilities and cloud-based features, see:
|
|
72
|
+
# https://supermaker.ai/blog/grok-ai-video-generator-the-ultimate-guide-to-creating-ai-videos-2025/
|
|
73
|
+
#
|
|
74
|
+
# @param script [VideoScript] The video script.
|
|
75
|
+
# @return [String] The path to the generated video file.
|
|
76
|
+
def self.assemble_video(script)
|
|
77
|
+
# In a real implementation, this would use a video editing library to assemble the video.
|
|
78
|
+
# For this example, we'll just return a placeholder.
|
|
79
|
+
|
|
80
|
+
voiceover_files = []
|
|
81
|
+
voiceover_files << VoiceoverGenerator.generate_voiceover(script.introduction)
|
|
82
|
+
script.segments.each do |segment|
|
|
83
|
+
voiceover_files << VoiceoverGenerator.generate_voiceover(segment)
|
|
84
|
+
end
|
|
85
|
+
voiceover_files << VoiceoverGenerator.generate_voiceover(script.conclusion)
|
|
86
|
+
|
|
87
|
+
"videos/#{script.title.hash}.mp4"
|
|
88
|
+
end
|
|
89
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: grok-video-generator
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 1768.377.239
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- SuperMaker
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2026-01-14 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description:
|
|
14
|
+
email:
|
|
15
|
+
- support@supermaker.ai
|
|
16
|
+
executables: []
|
|
17
|
+
extensions: []
|
|
18
|
+
extra_rdoc_files: []
|
|
19
|
+
files:
|
|
20
|
+
- lib/grok_video_generator.rb
|
|
21
|
+
homepage: https://supermaker.ai/blog/grok-ai-video-generator-the-ultimate-guide-to-creating-ai-videos-2025/
|
|
22
|
+
licenses:
|
|
23
|
+
- MIT
|
|
24
|
+
metadata: {}
|
|
25
|
+
post_install_message:
|
|
26
|
+
rdoc_options: []
|
|
27
|
+
require_paths:
|
|
28
|
+
- lib
|
|
29
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '2.6'
|
|
34
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
35
|
+
requirements:
|
|
36
|
+
- - ">="
|
|
37
|
+
- !ruby/object:Gem::Version
|
|
38
|
+
version: '0'
|
|
39
|
+
requirements: []
|
|
40
|
+
rubygems_version: 3.0.3.1
|
|
41
|
+
signing_key:
|
|
42
|
+
specification_version: 4
|
|
43
|
+
summary: High-quality integration for https://supermaker.ai/blog/grok-ai-video-generator-the-ultimate-guide-to-creating-ai-videos-2025/
|
|
44
|
+
test_files: []
|