Created
March 2, 2013 13:39
-
-
Save neurotech/5071025 to your computer and use it in GitHub Desktop.
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
| 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 |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is mainly a personal "hobby" program to make it easy to get YouTube videos as audio files.
Is it possible to call the CLI for viddl-rb from ruby?