Commit f3d4e86a authored by Davide Gianforte's avatar Davide Gianforte
Browse files

add ComicBook support

krarc can browse ComicBook formats (*.cbz or *.cbr)
the two extensions were added to the packer interface

Review D1362
parent 609409c5
[Protocol]
exec=kio_krarc
protocol=krarc
archiveMimetype=application/x-7z,application/x-7z-compressed,application/x-ace,application/x-ace-compressed,application/x-arj,application/x-arj-compressed,application/x-cpio,application/x-deb,application/x-debian-package,application/vnd.debian.binary-package,application/x-java-archive,application/x-lha,application/x-lha-compressed,application/x-rar,application/x-rar-compressed,application/x-rpm,application/x-source-rpm,application/zip,application/x-zip,application/x-zip-compressed,application/vnd.oasis.opendocument.chart,application/vnd.oasis.opendocument.database,application/vnd.oasis.opendocument.formula,application/vnd.oasis.opendocument.graphics,application/vnd.oasis.opendocument.presentation,application/vnd.oasis.opendocument.spreadsheet,application/vnd.oasis.opendocument.text,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document
archiveMimetype=application/x-7z,application/x-7z-compressed,application/x-ace,application/x-ace-compressed,application/x-arj,application/x-arj-compressed,application/x-cpio,application/x-deb,application/x-debian-package,application/vnd.debian.binary-package,application/x-java-archive,application/x-lha,application/x-lha-compressed,application/x-rar,application/x-rar-compressed,application/x-rpm,application/x-source-rpm,application/zip,application/x-zip,application/x-zip-compressed,application/vnd.oasis.opendocument.chart,application/vnd.oasis.opendocument.database,application/vnd.oasis.opendocument.formula,application/vnd.oasis.opendocument.graphics,application/vnd.oasis.opendocument.presentation,application/vnd.oasis.opendocument.spreadsheet,application/vnd.oasis.opendocument.text,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/x-cbz,application/x-cbr
input=filesystem
output=filesystem
listing=Name,Type,Size,Date,Access,Owner,Group,Link
......
......@@ -74,7 +74,9 @@ PackGUI::PackGUI(QString defaultName, QString defaultPath, int noOfFiles, QStrin
if (PS("tar") && PS("lzma")) typeData->addItem("tar.lzma");
if (PS("tar") && PS("xz")) typeData->addItem("tar.xz");
if (PS("zip")) typeData->addItem("zip");
if (PS("zip")) typeData->addItem("cbz");
if (PS("rar")) typeData->addItem("rar");
if (PS("rar")) typeData->addItem("cbr");
if (PS("lha")) typeData->addItem("lha");
if (PS("arj")) typeData->addItem("arj");
if (PS("7z")) typeData->addItem("7z");
......
......@@ -102,10 +102,12 @@ QStringList KRarcHandler::supportedPackers()
if (KrServices::cmdExist("xz")) packers.append("xz");
if (KrServices::cmdExist("unzip")) packers.append("unzip");
if (KrServices::cmdExist("zip")) packers.append("zip");
if (KrServices::cmdExist("zip")) packers.append("cbz");
if (KrServices::cmdExist("lha")) packers.append("lha");
if (KrServices::cmdExist("cpio")) packers.append("cpio");
if (KrServices::cmdExist("unrar")) packers.append("unrar");
if (KrServices::cmdExist("rar")) packers.append("rar");
if (KrServices::cmdExist("rar")) packers.append("cbr");
if (KrServices::cmdExist("arj")) packers.append("arj");
if (KrServices::cmdExist("unarj")) packers.append("unarj");
if (KrServices::cmdExist("unace")) packers.append("unace");
......@@ -461,6 +463,8 @@ bool KRarcHandler::pack(QStringList fileNames, QString type, QString dest, long
if (type == "zip") {
packer << KrServices::fullPathName("zip") << "-ry"; type = "-zip";
} else if (type == "cbz") {
packer << KrServices::fullPathName("zip") << "-ry"; type = "-zip";
} else if (type == "tar") {
packer << KrServices::fullPathName("tar") << "-cvf"; type = "-tar";
} else if (type == "tar.gz") {
......@@ -473,6 +477,8 @@ bool KRarcHandler::pack(QStringList fileNames, QString type, QString dest, long
packer << KrServices::fullPathName("tar") << "--xz" << "-cvf"; type = "-txz";
} else if (type == "rar") {
packer << KrServices::fullPathName("rar") << "-r" << "a"; type = "-rar";
} else if (type == "cbr") {
packer << KrServices::fullPathName("rar") << "-r" << "a"; type = "-rar";
} else if (type == "lha") {
packer << KrServices::fullPathName("lha") << "a"; type = "-lha";
} else if (type == "arj") {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment