Compression 2.2 - Utility program

Miscellaneous tools
Post Reply
Message
Author
User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

Compression 2.2 - Utility program

#1 Post by don570 »

Compression 2.2 - Utility program
Compression of a folder .

It works in puppies with Rox as the file manager
The big advantage is the right click feature. Just right click
on a folder and choose to compress folder (See image)

Checked with precise 5.7.1 linux and more recent as well.
32bit or 64 bit

NOTES:
RAR and ZIP compression replaces links with the real files.
However newest version of compression.sh has option to preserve links.(see image)
This can add significantly to the size of an archive.
RAR uses 'a' option ---> to add to an already existing archive

4 foreign languages supported with gettext

Updated compression.sh script with password (if zip, rar or 7z compression used)
yaf-splash screen should work if compression takes 5 seconds or more.


The time to compress the folder is an estimate based
on the size of the folder.

The folder name that you compress can have a blank space in the name
but not the password.

The most recent version of gtkdialog is needed for this feature.
The time field will be blank otherwise.
Attachments
screenshot-compression.png
(45.68 KiB) Downloaded 103 times
compression-2.2.pet
(21.37 KiB) Downloaded 172 times
Last edited by don570 on Sat 15 Feb 2020, 17:01, edited 21 times in total.

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

new version 1.3

#2 Post by don570 »

New version 1.3-

Changed to a new icon in menu ---> harddrive.png
Since it should work with all Puppies

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

new version 1.4

#3 Post by don570 »

Version 1.4 changed the XZ compression extension
to tar.xz rather than txz on the advice of a Slack expert.

___________________________________________

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#4 Post by technosaurus »

fyi for future development, if you have a prog that prompts you for a password or y/n you can use yes | prog (to always answer y)

Code: Select all

yes "string" |prog 
(to always answer string)or

Code: Select all

echo "username
password" |prog
(if it asks for username then password)
, but it could as easily be any answer, like:

Code: Select all

echo "y
y
/usr/share/Opera
/usr/lib/mozilla/plugins" | ./Opera-installer
if you wanted to automate an install (btw, those are totally made up examples, I don't even know how Opera installs these days)

-HTH
Brad
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
vicmz
Posts: 1262
Joined: Sun 15 Jan 2012, 22:47

#5 Post by vicmz »

Thanks for this. For some reason, drag and drop function of XArchive desktop icon doesn't work for me, I drag and drop my files but get an empty window where I must create the archive and add the files manually.
I made a separate Spanish version, so that the symlink appears in Spanish when user right-click, my translation is inside the PET.
Attachments
compression-1.4-spanish.pet
(4.51 KiB) Downloaded 648 times
compression-1.4-spanish.png
(24.76 KiB) Downloaded 1186 times
[url=http://murga-linux.com/puppy/viewtopic.php?t=76948]Puppy Linux en español[/url]

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

New version 1.5

#6 Post by don570 »

New version 1.5

I made various changes like

1) new Icon choice for menu

2) Changes inside .desktop file

3) splash screen added when compressing to warn user to wait

4) Changed how gtkdialog version was selected using
Shinobar's method which should be full proof

5) Put in underscore character if folder had whitespace in it's name

6) Removal of final slash character in path if user accidently put
it in

7) A couple of new local messages were added for internationalizing

8 ) A warning if folder empty

I have put this version in my right clicks package

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#7 Post by don570 »


Version 1.6

- I corrected bug ---> if user had typed a bad folder name
no warning would show. Now there will be at least some warning.

- Added the Spanish translation by vicz

-Changed . desktop file for German, Spanish and French names

-Thunar is now properly supported.

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#8 Post by don570 »

New version 1.8

New version 1.8 has 7z library which is popular on Windows
platform. Also UExtract 2.7
is installed as well for an integrated
solution to compress and decompress.

It was tested on Precise and Carolina.
Both Rox filer and Thunar were tested.

It should work on most Puppies that Barry Kauler has created.

Gettext --> French German Spanish

_____________________________________

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#9 Post by don570 »

version 1.9

-Should work properly with 7z installed or not....
-32 bit or 64 bit

Download in first post
______________________________

slavvo67
Posts: 1610
Joined: Sat 13 Oct 2012, 02:07
Location: The other Mr. 305

#10 Post by slavvo67 »

Hi Don,

It would be cool if you had a default "Maximum Compression" button. I'm guessing you know which gives the max compression, of course you do.

Haven't been around much lately; hoping to change that in 2020.

All the best,

Slavvo67

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#11 Post by don570 »

I'll test to see if max compression makes any difference.
It would be simple to program and I could add a password.
The zip command allows you to specify a compression level using number prefixed with a dash from 0 to 9. The default compression level is -6 . When using -0 , all files will be stored without compression. -9 will force the zip command to use an optimal compression for all files

________________________________________________

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#12 Post by don570 »

Compression 2.0 - Utility program

Checked with precise 5.7.1 linux and more recent as well.
32bit or 64 bit

Updated compression.sh script with password (if zip or 7z compression used)
yaf-splash screen should work if compression takes 5 seconds or more.


Available ---> first post
________________________________________________________

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

Compression 2.1 - Utility program

#13 Post by don570 »

New Version 2.1

Added RAR compression if rar is installed.

Note that 'a' option is used so if there is already an archive with same name,
the files will be added. Also a link will be replaced with the real file.
________________________________________________________

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

compression 2.2

#14 Post by don570 »

New version
Compression 2.2 - Utility program

Note: Both zip and rar will normally substitute a link with the real file.

New Feature
- preserve links when compressing using RAR

Warning --> current version of uextract won't extract the link.
Link will be totally ignored. :cry:



However I was able to extract using command

Code: Select all

# unrar e -ola New_Dir.rar

UNRAR 5.50 freeware      Copyright (c) 1993-2017 Alexander Roshal


Extracting from New_Dir.rar


Would you like to replace the existing file Script
    51 bytes, modified on 2020-01-21 03:25
with a new one
    51 bytes, modified on 2020-01-21 03:25

[Y]es, [N]o, [A]ll, n[E]ver, [R]ename, [Q]uit a

Extracting  Script                                                    OK 
Extracting  zzzzzz                                                    OK 
Extracting  DIRNAME_CORRECTED.tar.gz.gpg                              OK 
Extracting  DIRNAME_CORRECTED.tar.xz.gpg                              OK 
Extracting  binney55.mp4                                              OK 
Extracting  NewDir.tar.gz                                             OK 
All OK
# 
_______________________________________________

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#15 Post by don570 »

Be sure to use latest uextract --> version 4.0 to extract a RAR archive
(with links preserved)
__________________________

Post Reply