Created
March 27, 2017 04:10
-
-
Save mikekavouras/f96fb210ed36d69e87854eaba6caf342 to your computer and use it in GitHub Desktop.
stuff.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def self.generate_video(video, text) | |
# og video name is self.video_name(video) | |
instagram_video = InstagramVideoGenerator.run(video: video, text: text) | |
system("mv #{instagram_video.path} #{output_dir_path}/instagram.mp4") | |
snapchat_video = SnapchatVideoGenerator.run(video: video, text: text) | |
system("mv #{snapchat_video.path} #{output_dir_path}/snapchat.mp4") | |
end | |
def self.video_name(video) | |
parts = video.path.match(/^\/?(.+\/)*(.+)\.(.+)$/).captures | |
parts[1] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment