forked from extern/cbr2cbz
* cbr2cbz.py: Support filename with whitespace
Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin@suse.com>
This commit is contained in:
parent
fc04a9e27c
commit
312617e069
@ -15,9 +15,9 @@ Requirements
|
|||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
||||||
|
|
||||||
To convert a single CBR file use this (the script can't handle filenames with spaces):
|
To convert a single CBR file use this:
|
||||||
|
|
||||||
``./cbr2cbz.py <cbr_filename_without_spaces>``
|
``./cbr2cbz.py <cbr_filename>``
|
||||||
|
|
||||||
To convert an entire directory with CBR files in it use:
|
To convert an entire directory with CBR files in it use:
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ def uncompress(filename, directory):
|
|||||||
def compress (directory, zip_filename):
|
def compress (directory, zip_filename):
|
||||||
ZIP="zip"
|
ZIP="zip"
|
||||||
directory=directory+"/*"
|
directory=directory+"/*"
|
||||||
command=" ".join([ZIP, zip_filename, directory ])
|
command=" ".join([ZIP, "\""+zip_filename+"\"", directory ])
|
||||||
execute (command)
|
execute (command)
|
||||||
|
|
||||||
def get_filename_without_extension(filename):
|
def get_filename_without_extension(filename):
|
||||||
@ -58,7 +58,6 @@ compress(temp_dir, cbz_filename)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def extract (cbr_filename, dir_name):
|
def extract (cbr_filename, dir_name):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ def print_usage():
|
|||||||
|
|
||||||
def convert(filename):
|
def convert(filename):
|
||||||
CONVERT="./cbr2cbz.py"
|
CONVERT="./cbr2cbz.py"
|
||||||
command=" ".join([CONVERT, filename])
|
command=" ".join([CONVERT, "\""+filename+"\""])
|
||||||
execute(command)
|
execute(command)
|
||||||
|
|
||||||
if len(sys.argv)!=2:
|
if len(sys.argv)!=2:
|
||||||
|
Loading…
Reference in New Issue
Block a user