Skip to content

Instantly share code, notes, and snippets.

@marshluca
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marshluca/6957405b2fa40475d35a to your computer and use it in GitHub Desktop.
Save marshluca/6957405b2fa40475d35a to your computer and use it in GitHub Desktop.
Open multiple videos with MPlayX on OS X
#!/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