* cbr2cbz.py: Support filename with whitespace

Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin@suse.com>
This commit is contained in:
Nicolas Morey-Chaisemartin 2018-06-19 17:02:23 +02:00
parent fc04a9e27c
commit 312617e069
3 changed files with 4 additions and 5 deletions

View File

@ -15,9 +15,9 @@ Requirements
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:

View File

@ -28,7 +28,7 @@ def uncompress(filename, directory):
def compress (directory, zip_filename):
ZIP="zip"
directory=directory+"/*"
command=" ".join([ZIP, zip_filename, directory ])
command=" ".join([ZIP, "\""+zip_filename+"\"", directory ])
execute (command)
def get_filename_without_extension(filename):
@ -58,7 +58,6 @@ compress(temp_dir, cbz_filename)
def extract (cbr_filename, dir_name):
pass

View File

@ -19,7 +19,7 @@ def print_usage():
def convert(filename):
CONVERT="./cbr2cbz.py"
command=" ".join([CONVERT, filename])
command=" ".join([CONVERT, "\""+filename+"\""])
execute(command)
if len(sys.argv)!=2: