Added sample scripts.

This commit is contained in:
Glenn Y. Rolland 2011-11-19 15:59:13 +01:00
parent 099263b3e7
commit c7301462e8
4 changed files with 22 additions and 0 deletions

22
bin/cbr2cbz Normal file → Executable file
View file

@ -0,0 +1,22 @@
#!/usr/bin/env ruby
require 'fileutils'
where = Dir.pwd
ARGV.each do |arg|
Dir.chdir where
cbr_path = File.expand_path arg
cbz_path = cbr_path.gsub(/.cbr$/,'.cbz')
name = File.basename(arg).dup
name.gsub!(/\.cbr/i,'')
FileUtils.mkdir_p name
Dir.chdir name
system "unrar e \"#{cbr_path}\""
Dir.chdir where
system "zip -r \"#{cbz_path}\" \"#{name}\""
FileUtils.rm_rf name
end

0
bin/cbzlint Normal file → Executable file
View file

0
bin/dir2cbz Normal file → Executable file
View file

0
bin/pdf2cbz Normal file → Executable file
View file