Writing, publishing, geekdom, and errata.

Making File-Roller Behave

No comments
technology.pngThis was actually while re-going over my notes for the How To Make an eBook eBook. You see, the way you compress files makes a difference. Yeah, they all say "zip" (or not, actually) on the end, but sometimes it impacts operation. So I was checking out file-roller some more.

I didn't learn to convert eBooks on a linux machine - it was a Windows Vista box. So file-roller was a new thing for me.

It's not, however, a new thing for GNOME users (including Ubuntu). It's been at the same version for just over two years. Not necessarily bad, but given that there's some shortcomings, it's an issue.

For example, it dumps temporary files all over the place if you're not paying attention. It's slow, with a GUI I'm not happy about. I like my file compression ... transparent, if you will.

I also use TuxCommander. Unlike Total Commander (which I highly recommend for Windows users), it does not (yet) have built in file compression. It can view archives like nobody's business, but making them is still a pain.

Until now.

I've got a nice bash script here that lets you:
  • Pass a file or directory name (either at the command line or through something like TuxCommander) and compress it, based on the extension you determine.
  • Lets you decide where to compress it.
  • Respects the $TMPDIR variable, and defaults to actual temporary directories.
  • With the --add option, lets you choose files or directories to back up interactively.
  • Takes place in the background (if you launch it from TuxCommander) with notify-send notifications to let you know it's done or has a problem.
  • Is a script, so you can hack it all you want.
Dependencies? It relies on: Zenity
7z and 7za
The script itself is here, and is highly commented. Any improvements you make would be appreciated if you shared.

No comments :