Skip to content

Instantly share code, notes, and snippets.

@mikekavouras
Created March 27, 2017 04:10
Show Gist options
  • Save mikekavouras/f96fb210ed36d69e87854eaba6caf342 to your computer and use it in GitHub Desktop.
Save mikekavouras/f96fb210ed36d69e87854eaba6caf342 to your computer and use it in GitHub Desktop.
stuff.rb
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