viddl-rb 0.5.2 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +2 -0
- data/Gemfile.lock +21 -0
- data/README.md +3 -2
- data/Rakefile +8 -0
- data/bin/viddl-rb +12 -0
- data/helper/download-helper.rb +2 -2
- metadata +49 -4
    
        data/Gemfile
    ADDED
    
    
    
        data/Gemfile.lock
    ADDED
    
    | @@ -0,0 +1,21 @@ | |
| 1 | 
            +
            PATH
         | 
| 2 | 
            +
              remote: .
         | 
| 3 | 
            +
              specs:
         | 
| 4 | 
            +
                viddl-rb (0.5.2)
         | 
| 5 | 
            +
                  nokogiri
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            GEM
         | 
| 8 | 
            +
              specs:
         | 
| 9 | 
            +
                mime-types (1.17.2)
         | 
| 10 | 
            +
                minitest (2.8.1)
         | 
| 11 | 
            +
                nokogiri (1.5.0)
         | 
| 12 | 
            +
                rest-client (1.6.7)
         | 
| 13 | 
            +
                  mime-types (>= 1.16)
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            PLATFORMS
         | 
| 16 | 
            +
              ruby
         | 
| 17 | 
            +
             | 
| 18 | 
            +
            DEPENDENCIES
         | 
| 19 | 
            +
              minitest
         | 
| 20 | 
            +
              rest-client
         | 
| 21 | 
            +
              viddl-rb!
         | 
    
        data/README.md
    CHANGED
    
    | @@ -1,6 +1,7 @@ | |
| 1 1 | 
             
            __viddl-rb:__  
         | 
| 2 2 | 
             
            Created by Marc Seeger (@rb2k)  
         | 
| 3 | 
            -
            Repo: http://github.com/rb2k/viddl-rb
         | 
| 3 | 
            +
            Repo: http://github.com/rb2k/viddl-rb  
         | 
| 4 | 
            +
            [](http://travis-ci.org/rb2k/viddl-rb)
         | 
| 4 5 |  | 
| 5 6 |  | 
| 6 7 |  | 
| @@ -27,7 +28,7 @@ __Requirements:__ | |
| 27 28 |  | 
| 28 29 | 
             
            __Contributors:__
         | 
| 29 30 |  | 
| 30 | 
            -
            * [kl](https://github.com/kl): Windows support (who knew!), bug fixes,  | 
| 31 | 
            +
            * [kl](https://github.com/kl): Windows support (who knew!), bug fixes, veoh plugin   
         | 
| 31 32 | 
             
            * [divout](https://github.com/divout) aka Ivan K: blip.tv plugin, bugfixes
         | 
| 32 33 | 
             
            * Sniper: bugfixes
         | 
| 33 34 | 
             
            * [Serabe](https://github.com/Serabe) aka Sergio Arbeo: packaging viddl as a binary
         | 
    
        data/Rakefile
    ADDED
    
    
    
        data/bin/viddl-rb
    CHANGED
    
    | @@ -23,6 +23,9 @@ puts "Plugins loaded: #{PluginBase.registered_plugins.inspect}" | |
| 23 23 |  | 
| 24 24 | 
             
            url = ARGV[0]
         | 
| 25 25 | 
             
            extract_audio = ARGV.include?('--extract-audio')
         | 
| 26 | 
            +
            url_only = ARGV.include?('--url-only')
         | 
| 27 | 
            +
            title_only = ARGV.include?('--title-only')
         | 
| 28 | 
            +
             | 
| 26 29 | 
             
            puts "Will try to extract audio: #{extract_audio}."
         | 
| 27 30 |  | 
| 28 31 | 
             
            unless url.match(/^http/)
         | 
| @@ -42,6 +45,15 @@ PluginBase.registered_plugins.each do |plugin| | |
| 42 45 | 
             
            			puts "Error while running the #{plugin.name.inspect} plugin. Maybe it has to be updated? Error: #{e.message}."	
         | 
| 43 46 | 
             
            			exit(1)
         | 
| 44 47 | 
             
            		end
         | 
| 48 | 
            +
             | 
| 49 | 
            +
            		if url_only
         | 
| 50 | 
            +
            			download_queue.each{|url_name| puts url_name[:url]}
         | 
| 51 | 
            +
            			exit
         | 
| 52 | 
            +
            		elsif title_only
         | 
| 53 | 
            +
            			download_queue.each{|url_name| puts url_name[:name]}
         | 
| 54 | 
            +
            			exit
         | 
| 55 | 
            +
            		end
         | 
| 56 | 
            +
             | 
| 45 57 | 
             
            		download_queue.each do |url_name|
         | 
| 46 58 | 
             
            			result = DownloadHelper.save_file(url_name[:url], url_name[:name])
         | 
| 47 59 | 
             
            			if result
         | 
    
        data/helper/download-helper.rb
    CHANGED
    
    | @@ -30,7 +30,7 @@ class DownloadHelper | |
| 30 30 | 
             
                elsif os_has?("curl")
         | 
| 31 31 | 
             
                  puts "using curl"
         | 
| 32 32 | 
             
                  #-L means: follow redirects, We set an agent because Vimeo seems to want one
         | 
| 33 | 
            -
                	result = system("curl -A ' | 
| 33 | 
            +
                	result = system("curl -A 'Wget/1.8.1' -L \"#{unescaped_uri}\" -o #{file_name}")
         | 
| 34 34 | 
             
                else
         | 
| 35 35 | 
             
                  open(file_name, 'wb') { |file|   	      
         | 
| 36 36 | 
             
                    file.write(fetch_file(unescaped_uri)); puts
         | 
| @@ -53,4 +53,4 @@ class DownloadHelper | |
| 53 53 | 
             
                  end
         | 
| 54 54 | 
             
                end
         | 
| 55 55 | 
             
              end
         | 
| 56 | 
            -
            end
         | 
| 56 | 
            +
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,13 +1,13 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: viddl-rb
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              hash:  | 
| 4 | 
            +
              hash: 3
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 6 | 
             
              segments: 
         | 
| 7 7 | 
             
              - 0
         | 
| 8 8 | 
             
              - 5
         | 
| 9 | 
            -
              -  | 
| 10 | 
            -
              version: 0.5. | 
| 9 | 
            +
              - 4
         | 
| 10 | 
            +
              version: 0.5.4
         | 
| 11 11 | 
             
            platform: ruby
         | 
| 12 12 | 
             
            authors: 
         | 
| 13 13 | 
             
            - Marc Seeger
         | 
| @@ -15,7 +15,7 @@ autorequire: | |
| 15 15 | 
             
            bindir: bin
         | 
| 16 16 | 
             
            cert_chain: []
         | 
| 17 17 |  | 
| 18 | 
            -
            date: 2011-11- | 
| 18 | 
            +
            date: 2011-11-24 00:00:00 Z
         | 
| 19 19 | 
             
            dependencies: 
         | 
| 20 20 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 21 21 | 
             
              name: nokogiri
         | 
| @@ -31,6 +31,48 @@ dependencies: | |
| 31 31 | 
             
                    version: "0"
         | 
| 32 32 | 
             
              type: :runtime
         | 
| 33 33 | 
             
              version_requirements: *id001
         | 
| 34 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 35 | 
            +
              name: rake
         | 
| 36 | 
            +
              prerelease: false
         | 
| 37 | 
            +
              requirement: &id002 !ruby/object:Gem::Requirement 
         | 
| 38 | 
            +
                none: false
         | 
| 39 | 
            +
                requirements: 
         | 
| 40 | 
            +
                - - ">="
         | 
| 41 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 42 | 
            +
                    hash: 3
         | 
| 43 | 
            +
                    segments: 
         | 
| 44 | 
            +
                    - 0
         | 
| 45 | 
            +
                    version: "0"
         | 
| 46 | 
            +
              type: :development
         | 
| 47 | 
            +
              version_requirements: *id002
         | 
| 48 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 49 | 
            +
              name: minitest
         | 
| 50 | 
            +
              prerelease: false
         | 
| 51 | 
            +
              requirement: &id003 !ruby/object:Gem::Requirement 
         | 
| 52 | 
            +
                none: false
         | 
| 53 | 
            +
                requirements: 
         | 
| 54 | 
            +
                - - ">="
         | 
| 55 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 56 | 
            +
                    hash: 3
         | 
| 57 | 
            +
                    segments: 
         | 
| 58 | 
            +
                    - 0
         | 
| 59 | 
            +
                    version: "0"
         | 
| 60 | 
            +
              type: :development
         | 
| 61 | 
            +
              version_requirements: *id003
         | 
| 62 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 63 | 
            +
              name: rest-client
         | 
| 64 | 
            +
              prerelease: false
         | 
| 65 | 
            +
              requirement: &id004 !ruby/object:Gem::Requirement 
         | 
| 66 | 
            +
                none: false
         | 
| 67 | 
            +
                requirements: 
         | 
| 68 | 
            +
                - - ">="
         | 
| 69 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 70 | 
            +
                    hash: 3
         | 
| 71 | 
            +
                    segments: 
         | 
| 72 | 
            +
                    - 0
         | 
| 73 | 
            +
                    version: "0"
         | 
| 74 | 
            +
              type: :development
         | 
| 75 | 
            +
              version_requirements: *id004
         | 
| 34 76 | 
             
            description: An extendable commandline video downloader for flash video sites. Includes plugins for vimeo, youtube and megavideo
         | 
| 35 77 | 
             
            email: mail@marc-seeger.de
         | 
| 36 78 | 
             
            executables: 
         | 
| @@ -49,6 +91,9 @@ files: | |
| 49 91 | 
             
            - plugins/vimeo.rb
         | 
| 50 92 | 
             
            - plugins/youtube.rb
         | 
| 51 93 | 
             
            - CHANGELOG.txt
         | 
| 94 | 
            +
            - Gemfile
         | 
| 95 | 
            +
            - Gemfile.lock
         | 
| 96 | 
            +
            - Rakefile
         | 
| 52 97 | 
             
            - README.md
         | 
| 53 98 | 
             
            homepage: https://github.com/rb2k/viddl-rb
         | 
| 54 99 | 
             
            licenses: []
         |