image-dumper 0.5 → 0.5.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f6b3b37cb3deb4ed73cd0cc3c676ecdaf45e690a
4
- data.tar.gz: ff6a852744bbd7437321fc3bfa157164636d647e
3
+ metadata.gz: bbcea2f504358565d2c1e8fdd8e5276fc3338261
4
+ data.tar.gz: 557c6ebfa821eba8ad59a063d72330c2d34fafe8
5
5
  SHA512:
6
- metadata.gz: 9977d1fadaedc6834bac95d61a3c1e46f8b91e8d78d672c7de584332968ae1f8dfb11992b15bed2bbf23fbae87f54c8004f77ff166e95594272b66ca0064700e
7
- data.tar.gz: b0b5874b6b1c6350f6c18d115d189b056ef83bba18ee53e8cd15a1cf3a34a3bec311bde5c8e256ea552e856c760aed3295513988238fc5cf799fb844399bee51
6
+ metadata.gz: 62e403f34b233ec3063d6efea95d590fa75011a9e77c7bb0d9bf35c6034da8e02b6921ba38ffaa8cabb8e0ecf8307f7f09fbae3b744496367a5ef67350761247
7
+ data.tar.gz: b8692485b5ebaf75df3a98cfb564dbaf789e9888061c3b1124e1d1fca05a1f89a94c883f7757ff8118683a2e7af82eb07e24a158fe25a03f62366f3322abb7d2
data/lib/dumper.rb CHANGED
@@ -24,6 +24,7 @@ require 'optparse'
24
24
  require 'net/http'
25
25
  require 'base64'
26
26
 
27
+ require 'dumper/utils'
27
28
  Dir.glob(File.expand_path("../dumper/profiles/*.rb", __FILE__)).each { |f|
28
29
  require "dumper/profiles/#{File.basename(f).split(?.)[0]}"
29
30
  }
@@ -0,0 +1,48 @@
1
+ #--
2
+ # Copyright(C) 2013 Giovanni Capuano <webmaster@giovannicapuano.net>
3
+ #
4
+ # This file is part of Dumper.
5
+ #
6
+ # Dumper is free software: you can redistribute it and/or modify
7
+ # it under the terms of the GNU General Public License as published by
8
+ # the Free Software Foundation, either version 3 of the License, or
9
+ # (at your option) any later version.
10
+ #
11
+ # Dumper is distributed in the hope that it will be useful,
12
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ # GNU General Public License for more details.
15
+ #
16
+ # You should have received a copy of the GNU General Public License
17
+ # along with Dumper. If not, see <http://www.gnu.org/licenses/>.
18
+ #++
19
+
20
+ module Dumper
21
+ module Profiles
22
+
23
+ def self.get_mangahere(url, path, from = 1, to = 1)
24
+ Nokogiri::HTML(open(url)).xpath('//div[@class="detail_list"]/ul/li').each { |p|
25
+ chapter = p.children[1].children[1]['href'].to_s
26
+
27
+ dir = File.join path, p.children[1].text.sanitize_filename
28
+ Dir.mkdir(dir) unless File.directory? dir
29
+
30
+ option = Nokogiri::HTML(open(chapter)).xpath('//select[@class="wid60"]/option')
31
+ first = option.first.text.to_i
32
+ last = option.last.text.to_i
33
+
34
+ first.upto(last) { |i|
35
+ url = chapter.gsub(/\/[0-9]+\.html/, '') + i.to_s + '.html'
36
+
37
+ scan = Nokogiri::HTML(open(url)).xpath('//section[@id="viewer"]/a/img/@src')[0].to_s
38
+ self.get dir, scan, '', '', "#{i}.png"
39
+ }
40
+ }
41
+ end
42
+
43
+ def self.info_mangahere
44
+ { :from => false, :to => false }
45
+ end
46
+
47
+ end
48
+ end
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Dumper
21
21
  def self.version
22
- '0.5'
22
+ '0.5.1'
23
23
  end
24
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: image-dumper
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.5'
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giovanni Capuano
@@ -41,6 +41,7 @@ files:
41
41
  - lib/dumper/profiles/gelbooru.rb
42
42
  - lib/dumper/profiles/imagebam.rb
43
43
  - lib/dumper/profiles/mangaeden.rb
44
+ - lib/dumper/profiles/mangahere.rb
44
45
  - lib/dumper/profiles/mi9.rb
45
46
  - lib/dumper/profiles/multiplayer.rb
46
47
  - lib/dumper/profiles/redblow.rb