qop
Utilities
Score 50%
Description:

Qt Output Parser for tar, zip, unzip, unrar, 7z with a compression/extraction progress indicator. Support platforms: windows(Qt4), Linux(Qt4, tested on ubuntu 10.04), motorola ezx(Qt2, tested on MOTO E6) and Maemo5 etc.

Usage: qop [--all] [-t parserFor] [-n|s] [-chm] [-x archieve|-T totalSteps] [files...]
--all: update all changes. default is update on timer event
-m, --multi-thread: create a new thread to calculate progress bar's total steps.
-h, --help: help
-n|s, --number/--size: set number/size(default) of files as total steps.
-T, --steps=STEPSs: specify total steps.
-t, --parser[=TYPE]: usually is tool's name, like tar, zip, unzip. If using xz, lzop etc with tar, -ttar(default). To extract .tar/.tar.xxx with -s, -tuntar.
-c, --auto-close: auto close when finished
-C, --cmd=command execute command. e.g. qop -C tar zxvvf test.tar.gz
-x, --exteact=ARCHIVE: extracting mode. Omit -T. Analyze parser and total steps automaticly. Don't need -t(only for tar.gz now).
-d, --diy[=TARFILE]: using built-in method to extract an archive

Examples:
qop -C zip -ryv -9 test.zip test
qop -C zip -ry -9 test.zip test
qop -C unzip -o test.zip
qop -C unrar x -o+ -p- -y rar.rar destdir
qop -C tar cvvf test.tar test
qop -C tar zcvf test.tgz test
qop -C tar zxvvf test.tgz -C /tmp ##only 1 v
tar zcvvf test.tgz test |qop test -m
tar zcvf test.tgz test |qop test
tar zxvvf test.tgz |qop -T`gzip -l test.tgz |sed -n '$s/\(.*\) \(.*\) .*/\2/p'` -tuntar -c
zip -ryv -9 -FS test.zip test |qop test -m -t zip
unzip -o test.zip -d . |qop -T`unzip -Z -t test.zip |sed 's/\(.*\) files.*/\1/'` -tunzip
unrar -o+ -y test.rar . |qop -tunrar
7z x -y test.7z |qop -t7z -T $((`7z l test.7z |sed -n '$s/\(.*\), \(.*\)folders/\2/p'`+`7z l test.7z |sed -n '$s/\(.*\) \(.*\)files.*/\2/p'`))

Extracting a tar.gz file with less code (version 0.1.0 or later):
tar zxvvf test.tar.gz |qop -x test.tar.gz

Extracting a tar archive by qop(version>=0.1.2)
qop -d -x test.tar
qop -dtest.tar
qop --diy=test.tar
Last changelog:

7 years ago

=====================================2011=======================================
09-27:
1.fix old qt version build errors and other bugs
2.-i or --interval to set the progress update frequency
09-25:
default is update the compressing/extracting status on timerEvent(every 300 msecs), so that you can see the status much more clearly. You can update status as soon as status changes by adding --all.
06-19:
support for MSVC.
Elapsed time is correct now after a pause.
04-22:
fix -T bugs.
add some scripts for testing.
04-19:
-C option supports simple usages of zip, unzip, and unrar

04-18:
QOutParser only change unit without recount total steps when use -x option.
move steps calculation from Option to Qop to reduce dependency.
Fix tar extracting progress when using -C option

04-17:
you can omit -n and -s
-C option supports tar compression

04-14:
Now can parse command line when use -C option. Total setps will calculate automaticly.
04-11:
new: qop -C|--cmd commad (e.g. qop -C tar zxvf test.tgz)
bug: can't show correct progress
Can pause and continue when extracting by internal method
=====================================2010=======================================
11-27:
auto detect tar output message format and determin the right unit in single thread mode.

10-02:
new classes: QArchive, QTar
support extract tar archive using: qop -d -x test.tar or qop -dtest.tar or qop --diy=test.dir
TODO: complete tar functions
pause and continue
read from stdin and write to stdout

10-01:
long options support

09-26:
ezprogressdialog print labelText() to stdout without return when hidden;

09-23:
detect format by reading header
add [-x archive] option.
add QArcReader as alternative
add lha detect

09-22:
add class ArcReader to get uncompressed size by reading the archieve. Using std c++;
-x x_file option

09-17:
version 0.0.4
show dialog with text "Calculating..." while counting without multi-thread support.
change dialog title
add class QUntarOutParser to indicate extraction progress exactly when extracting a .tar and .tar.xxx file. need -tuntar option.

09-15:
version 0.0.2
7z support
in number mode displaying speed, remaining time
and other

djszapi

6 years ago

Just one short question:

What is the difference between this purpose and what is already available in KArchive, KAr, KZip, KTar classes inside the KDE project ?

If it is the same use case, it would be really nice to see some Qt only solution, most likely inside the Qt framework itself. I was asking it 1-2 years on the #qt@freenode. It would make sense to have it there and to not see quite a few third-project implementations. I hope there will be some more organization in order to avoid the duplication, et cetera. (We also need to have some common archiving support in our Qt-only library and we need to copy/paste the KDE libraries or something like that, /sighs/)

But hey, good job and keep up with your work.

Report

C

wangbin

6 years ago

It's only a a gui application to show the compressing and decompressing progress. You must use it with other program to do the compressing and decompressing, such as tar zip, unzip, 7zip. You must use some special arguments of these programs. Qop will parse their output information and show the correct progress. Qop means Qt Output Parser for compressing/decompressing tools.
I really hope that i could write a pure qt based application like 7zip to manage kinds of archives. But i find it's hard. I will add some built-in methods to support some archives. Now it only supports unpacking a tar file, because it's the easiest.
I wrote some scripts in the folder "test" to show the usages of qop.
Thanks for your attention!

Report

7 years ago

=====================================2011=======================================
09-27:
1.fix old qt version build errors and other bugs
2.-i or --interval to set the progress update frequency
09-25:
default is update the compressing/extracting status on timerEvent(every 300 msecs), so that you can see the status much more clearly. You can update status as soon as status changes by adding --all.
06-19:
support for MSVC.
Elapsed time is correct now after a pause.
04-22:
fix -T bugs.
add some scripts for testing.
04-19:
-C option supports simple usages of zip, unzip, and unrar

04-18:
QOutParser only change unit without recount total steps when use -x option.
move steps calculation from Option to Qop to reduce dependency.
Fix tar extracting progress when using -C option

04-17:
you can omit -n and -s
-C option supports tar compression

04-14:
Now can parse command line when use -C option. Total setps will calculate automaticly.
04-11:
new: qop -C|--cmd commad (e.g. qop -C tar zxvf test.tgz)
bug: can't show correct progress
Can pause and continue when extracting by internal method
=====================================2010=======================================
11-27:
auto detect tar output message format and determin the right unit in single thread mode.

10-02:
new classes: QArchive, QTar
support extract tar archive using: qop -d -x test.tar or qop -dtest.tar or qop --diy=test.dir
TODO: complete tar functions
pause and continue
read from stdin and write to stdout

10-01:
long options support

09-26:
ezprogressdialog print labelText() to stdout without return when hidden;

09-23:
detect format by reading header
add [-x archive] option.
add QArcReader as alternative
add lha detect

09-22:
add class ArcReader to get uncompressed size by reading the archieve. Using std c++;
-x x_file option

09-17:
version 0.0.4
show dialog with text "Calculating..." while counting without multi-thread support.
change dialog title
add class QUntarOutParser to indicate extraction progress exactly when extracting a .tar and .tar.xxx file. need -tuntar option.

09-15:
version 0.0.2
7z support
in number mode displaying speed, remaining time
and other

File (click to download) Version Description Filetype Packagetype License Downloads Date Filesize OCS-Install DL
Details
version
0.3.5
updated Oct 29 2011
added Sep 11 2010
downloads today
0
page views today 1