Skip to content

Instantly share code, notes, and snippets.

@neurotech
Created March 2, 2013 13:39
Show Gist options
  • Select an option

  • Save neurotech/5071025 to your computer and use it in GitHub Desktop.

Select an option

Save neurotech/5071025 to your computer and use it in GitHub Desktop.
require "viddl-rb"
ViddlRb.io = $stdout
Shoes.app :title => 'Viddl', :width => 300, :height => 150, :margin => 10, :resizable => false do
stack do
para "Enter Video URL:"
edit_line do |e|
@url = e.text
end
button "Save to..." do
destination = ask_open_folder
end
end
button "Download!" do
begin
ViddlRb.get_urls(@url)
rescue ViddlRb::DownloadError => e
alert "Could not get download url: #{e.message}"
rescue ViddlRb::PluginError => e
alert "Plugin blew up! #{e.message}\n" + "Backtrace:\n#{e.backtrace.join("\n")}"
end
end
end
@rb2k
Copy link
Copy Markdown

rb2k commented Mar 3, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment