Last active
August 29, 2015 14:07
-
-
Save marshluca/6957405b2fa40475d35a to your computer and use it in GitHub Desktop.
Open multiple videos with MPlayX on OS X
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
#!/usr/bin/env ruby | |
require 'date' | |
def open_video(file) | |
file = file.gsub(/\s/, '\\ ') | |
puts "opening #{file}" | |
`open #{file} -n /Applications/MPlayerX.app` | |
end | |
if ARGV.empty? | |
date = Date.today | |
else | |
date = ARGV.first | |
end | |
source_folder = "/Users/lucas/Documents/VSee/#{date}" | |
abort "#{source_folder} doesn't exist!" unless Dir.exist? source_folder | |
Dir.glob("#{source_folder}/*.mkv") do |file| | |
open_video file unless file.include? 'continued' | |
end | |
# ./standup | |
# ./standup 2014-10-22 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment