class Object
Constants
- ANSI_BLUE
- ANSI_CYAN
- ANSI_DEFAULT
- ANSI_GREEN
- ANSI_MAGENTA
- ANSI_RED
Public Instance Methods
extract_entries_from_cbz(source_cbz_file, destination_folder) { |name| ... }
click to toggle source
# File lib/comics_packager_zip.rb, line 3 def extract_entries_from_cbz(source_cbz_file, destination_folder, &block) Zip::File.open("#{source_cbz_file}.cbz") do |cbz_file| cbz_file.each do |entry| entry.extract("#{destination_folder}/#{entry.name}") yield entry.name if block_given? end end end
extract_file(source_cbz_file, file_to_extract, destination_folder)
click to toggle source
# File lib/comics_packager_zip.rb, line 12 def extract_file(source_cbz_file, file_to_extract, destination_folder) Zip::File.open("#{source_cbz_file}.cbz") do |cbz| cbz.extract(file_to_extract, destination_folder) end end
package_comics(path_to_files_to_package, input_filenames, path_to_output_package, file_extension_name) { |filename| ... }
click to toggle source
# File lib/comics_packager_zip.rb, line 18 def package_comics(path_to_files_to_package, input_filenames, path_to_output_package, file_extension_name, &block) Zip::File.open("#{path_to_output_package}.#{file_extension_name}", Zip::File::CREATE) do |package| input_filenames.each do |filename| package.add(filename, path_to_files_to_package + '/' + filename) yield filename if block_given? end end end
package_comics_to_cbz(path_to_files_to_zip, input_filenames, path_to_output_cbz)
click to toggle source
# File lib/comics_packager_zip.rb, line 27 def package_comics_to_cbz(path_to_files_to_zip, input_filenames, path_to_output_cbz) package_comics(path_to_files_to_zip, input_filenames, path_to_output_cbz, "cbz") end
package_comics_to_zip(path_to_files_to_zip, input_filenames, path_to_output_zip)
click to toggle source
# File lib/comics_packager_zip.rb, line 31 def package_comics_to_zip(path_to_files_to_zip, input_filenames, path_to_output_zip) package_comics(path_to_files_to_zip, input_filenames, path_to_output_zip, "zip") end
return_all_comics_entries(directory)
click to toggle source
# File lib/comics_packager_directory.rb, line 3 def return_all_comics_entries(directory) Dir.entries(directory) end
return_an_array_of_images(is_path_to_series_or_path_to_cbz, path_to_images = "")
click to toggle source
# File lib/comics_packager_directory.rb, line 7 def return_an_array_of_images(is_path_to_series_or_path_to_cbz, path_to_images = "") case is_path_to_series_or_path_to_cbz when "series" return_an_array_of_pages(path_to_images) when "cbz" return_an_array_of_pages("", "#{path_to_images}.cbz") end end