Created
March 12, 2021 09:11
-
-
Save NO-ob/88641e7a7f6c763f1a64271b17818df0 to your computer and use it in GitHub Desktop.
Converts all cbr in current dir to cbz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys, os | |
os.system("mkdir tmp") | |
for filename in os.listdir("."): | |
if filename.endswith(".cbr"): | |
workingdir = os.path.abspath(".") | |
os.system("unrar x '" + os.path.abspath(filename) + "' " + workingdir + "/tmp") | |
os.system("cd tmp && zip -r '../" + filename.split(".")[0]+"'.cbz *") | |
os.system("rm -rf tmp/*") | |
os.system("rm \"" + filename + "\"") | |
os.system("rm -rf tmp/") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment