KDE Unballer

Dolphin Service Menus

Source (required if based on other people's work): Add the source-code for this project on git.opendesktop.org

0
Score 56%
Description:

Unball:
Between new kernels, patches, and source, I found myself doing:
tar jvxf filename.tar.bz2
tar xvzf filename.tar.gz
unzip crappyformat.zip
all the time. So I wrote a script called unball to perform the same operations I was doing over and over... it recognizes bz2s, zips, gzs, tgz, rars, jars, and tars. Put the "unball" script in your path and the kdeunball.desktop script in your servicemenus directory. Its quite handy to type unball from the console instead of nineteen different options...
-maitre

ssokolow

13 years ago

I got tired of unball's inability to deal with filenames containing spaces, that annoying but harmless error it displays, and the limited number of formats it recognized so I decided to improve it.

Long story short, I ended up rewriting it from scratch. My version should be drop-in compatible with the KDE menu entry but, since I switched from KDE to Xfce+Konqueror a while ago, I can't test it.

Anyway, it's at http://www.ssokolow.com/MyPrograms/Gentoo

Report

ssokolow

13 years ago

Oh, and I also added support for properly handling tar files compressed with formats other than gzip and bzip2 as well as replacing the directory creation for zip files with something that only does it as needed and works for any archive format.

Just expect a shock if you look at the code. My coding style has been called everything from esoteric to awful. (I have a habit of using boolean operators instead of if/else blocks and cooking up shell equivalents for constructs from Python's standard library.)

Report

C

maitre

13 years ago

solid work, mind if I step on your toes and clean it up a bit?

interested in merging it back into the service menu...

Report

ssokolow

12 years ago

Actually, I'm working on my own service menu to be distributed along with the Nautilus (GNOME) equivalent to service menus, and the script itself.

I'd have it up already, but it's taking longer than expected to solve an "unace freezes up when called from Konqueror" bug.

By the way, sorry for the delayed reply.

Report

ssokolow

10 years ago

Update: In order to get nice integration with my Bazaar revision control, I moved it to https://launchpad.net/unball/

Report

peppelorum

14 years ago

First I want to thank you for this very nice script.

Found one error though;
peppe@hoth ~/inetpub/test: unball ExoPHPDesk_v1.2.rar
/home/peppe/bin/unball: line 10: [: =: unary operator expected
Found RAR, unballing ExoPHPDesk_v1.2.rar...
unrar: invalid option -- i
Try `unrar --help' or `unrar --usage' for more information.

Is it me of the script?

Report

C

maitre

14 years ago

Bah - thats probably me - I'll check it and reup a better version.

Report

j6cubic

14 years ago

I like the unball script, it makes managing archives easier than it was on Windows. But there is one thing that's bothering me: zip files get unzipped into folders with names like zip-filename.zip, which is quite unergonomic when you're doing everything in the Konsole.
I suggest the following change to the script, which makes it handle zip archives without the need for ugly folders:Replace this
*.zip)
echo -ne "Found zip, unballing $FILE...\n"unzip -qq -d zip-$FILE $FILE
;;
*.ZIP)
echo -ne "Found ZIP, unballing $FILE...\n"unzip -qq -d zip-$FILE $FILE
;;with this
*.zip)
echo -ne "Found zip, unballing $FILE...\n"unzip -qq -d `echo "$FILE" |sed "s/\.zip$//"` $FILE
;;
*.ZIP)
echo -ne "Found ZIP, unballing $FILE...\n"unzip -qq -d `echo "$FILE" |sed "s/\.ZIP$//"` $FILE
;;
This makes unball turn filename.zip into filename/ instead of zip-filename.zip/.

Report

C

maitre

14 years ago

Sweetness - you sed freak. I'll merge your changes. :)

Report

Joker

14 years ago

Im very much new to this and when i dl the thing and unzip it, it doesnt have a program to open up with. So what do i do ?

Report

C

maitre

14 years ago

Didn't see your post til now - oops. :) There's a .desktop file in there, and there's an unball script. Move the .desktop file into your servicemenus directory and the unball script anywhere in your path, I suggest /usr/bin.
More detailed explanation:
Open up a console, say xterm.
1. su {enter}
2. enter root password {enter}
3. cp unball /usr/bin
4. locate servicemenus
This will hopefully find your
servicemenus directory for you.
It should be under a apps/konqueror
parent directory. If you do not
have locate. You can cd to /
"cd /" and do:
find | grep servicemenus to do the
same thing (just slower).
5. cp unball.desktop /path/servicemenus
6. Logout and backin.

Report

LukA

14 years ago

which theme do you have on kde3.2? i'm sorry for OT

Report

C

maitre

14 years ago

thinkeramik - my menus are in XRender mode...

Report

LukA

14 years ago

thank you!

Report

LukA

14 years ago

ehhmmm but the window decorations?????

Report

C

maitre

14 years ago

nvidia...

Report

MDonoughe

14 years ago

Has anyone else noticed that if you open an archive, and then copy the contents, click up and paste, you get an error about not being able to write to (insert format here)? Is that a know bug?

Report

MDonoughe

14 years ago

Is this a known bug?^^^

Report

C

maitre

14 years ago

that works fine for me.

Report

gg3po

14 years ago

I get exactly the same error all the time. When I drop to the command line and do it manually, everything works great. It seems to be a problem with Ark, though I'm not sure what.

Report

C

maitre

14 years ago

could be a known bug - I used konstruct to build KDE for me and I belive it patches the source for me.
-maitre

Report

tommycw1

14 years ago

I probably just don't get it, but how is this different then the service menus provided by ark? I.E. Extract to, Extract Here, et all?

Report

C

maitre

14 years ago

for one its quicker, rather than ark loading my script just calls the cli utilities - another big one for me is I don't have a bunch of files littered everywhere b/c someone didn't know how to put paths in their archive. i find it really useful in consoles mostly, the six or seven line servicemenu was just easy to make...
-maitre

Report

product-maker 28 38

File (click to download) Version Description Packagetype Architecture Downloads Date Filesize DL OCS-Install
Pling
Details
license
version
0.1
updated May 11 2004
added May 11 2004
downloads today
0
page views today 0
System Tags addon