webcomics 3.0.1 → 3.1.0
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 +4 -4
- data/lib/comics_cbz.rb +7 -7
- data/lib/comics_db.rb +1 -1
- data/lib/comics_dir_helper.rb +1 -1
- data/lib/comics_engine.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3a1915ceca574e8ed53cf743fc3ee07a85cc880
|
4
|
+
data.tar.gz: 1e10065fb222825fd5241cbec42879911d328b09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1306a0c72ed2f7133651f1c84718a7de5c25caa914e6aa88fc7f0a8c5ef93bcdd96c2d313222bd03b3ba3f7eb8d88d8ba59e549efd85e3acf0c8d7c900463656
|
7
|
+
data.tar.gz: 2235f7611b719f65d75c90e75beae5648b2f03478f0bfeb415699429519031f9e887ad2ab88eb86aa290ea8a5b20dd194b99b928f69494e4c63413ce94511e80
|
data/lib/comics_cbz.rb
CHANGED
@@ -8,7 +8,7 @@ def is_this_file_a_cbz_or_zip?(file)
|
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
11
|
-
def
|
11
|
+
def return_an_array_cbz_files(series_path)
|
12
12
|
files_array = []
|
13
13
|
return_an_array_of_files(series_path).each do |file|
|
14
14
|
files_array.push(file) if is_this_file_a_cbz_or_zip?(file)
|
@@ -17,11 +17,11 @@ def list_cbz_files(series_path)
|
|
17
17
|
files_array
|
18
18
|
end
|
19
19
|
|
20
|
-
def
|
20
|
+
def return_pages_inside_a_cbz(path_to_cbz, xml_ignore = true)
|
21
21
|
files_array = []
|
22
|
-
Zip::File.open(path_to_cbz) do |
|
23
|
-
|
24
|
-
files_array.push(
|
22
|
+
Zip::File.open(path_to_cbz) do |images|
|
23
|
+
images.each do |image|
|
24
|
+
files_array.push(image.name) if File.extname(image.name) == ".jpg" || File.extname(image.name) == ".png" || File.extname(image.name) == ".bmp" || File.extname(image.name) == ".xml"
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
@@ -30,9 +30,9 @@ def list_pages_inside_a_cbz(path_to_cbz, xml_ignore = true)
|
|
30
30
|
files_array
|
31
31
|
end
|
32
32
|
|
33
|
-
def
|
33
|
+
def extract_image(path_to_cbz, index = 0)
|
34
34
|
Zip::File.open(path_to_cbz) do |cbz|
|
35
|
-
@page = cbz.extract(
|
35
|
+
@page = cbz.extract(return_pages_inside_a_cbz(path_to_cbz)[index], return_pages_inside_a_cbz(path_to_cbz)[index])
|
36
36
|
end
|
37
37
|
|
38
38
|
@page
|
data/lib/comics_db.rb
CHANGED
@@ -8,5 +8,5 @@ def is_there_a_db_field_value_that_matches_an_asset?(field_value, assets_path)
|
|
8
8
|
!field_values_array.empty?
|
9
9
|
end
|
10
10
|
|
11
|
-
alias :
|
11
|
+
alias :is_there_a_db_field_value_that_matches_a_series? :is_there_a_db_field_value_that_matches_an_asset?
|
12
12
|
alias :db_assets_match? :is_there_a_db_field_value_that_matches_an_asset?
|
data/lib/comics_dir_helper.rb
CHANGED
data/lib/comics_engine.rb
CHANGED
@@ -12,13 +12,13 @@ def return_series_assets_directories(series_path)
|
|
12
12
|
return_an_array_of_entries_without_image_files(return_an_array_of_comics_entries(series_path))
|
13
13
|
end
|
14
14
|
|
15
|
-
def
|
16
|
-
|
15
|
+
def return_an_array_pages_from_cbz(path_to_cbz)
|
16
|
+
return_pages_inside_a_cbz(path_to_cbz).sort
|
17
17
|
end
|
18
18
|
|
19
|
-
def
|
19
|
+
def return_an_array_of_pages(series_path = "", path_to_cbz = "")
|
20
20
|
if is_this_file_a_cbz_or_zip?(path_to_cbz)
|
21
|
-
|
21
|
+
return_an_array_pages_from_cbz(path_to_cbz)
|
22
22
|
else
|
23
23
|
image_array = []
|
24
24
|
FileUtils.cd(series_path) do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webcomics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ralph Desir
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-04-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|