UExtract-4.2

Miscellaneous tools
Message
Author
Robert123
Posts: 362
Joined: Fri 20 May 2016, 05:22
Location: Pacific

#181 Post by Robert123 »

____

Greetings![/quote], Here is a scenario, I'm updating Wary 5.5, Don't know if I'm going to release it or not on here yet,
ttuuxxx[/quote]

Yes please.
Last edited by Robert123 on Sun 14 Aug 2016, 09:58, edited 1 time in total.
Devuan Linux, Stardust 013 (4.31) updated [url]https://archive.org/details/Stardustpup013glibc2.10[/url]
s57(2018)barebone[url]https://sourceforge.net/projects/puppy-linux-minimal-builds/files/s57%282018%29barebones.iso/download[/url]

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

#182 Post by slavvo67 »

I can't imagine having a Puppy or Quirky without UExtract. It's even smart enough to ask for the password when extracting an encrypted 7zip file.

Thank you for the solid application. It's right up there with the Right Click Tools, in my opinion.

Slavvo67

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#183 Post by SFR »

Hi Ttuuxxx & Robert123

Once again - UExtract does not rename anything, it just creates a folder into which extracts the archive, safely and without any conflicts with exising files/dirs.
Let's take an archive without the top-most directory, e.g.:

Code: Select all

touch f1 f2 f3
tar cv f1 f2 f3 -f out.tar
rm f1 f2 f3
Now, try to extract that TAR using Xarchive(r)/Engrampa/PeaZip vs. UExtract and you'll see the difference.

A separate dir per archive is especially helpful when extracting, e.g. DEB packages as they share identically named control files (md5sums, postinst, perm, etc.).
In case of batch extracting each subsequent package would overwrite the previous one's files if there were no separate subdirs.

However, from what I understood, you don't actually have anything against these extra (= being no part of original archive) directories, but only the fact that they inherit input file's extension(s) + '.extracted' suffix.
Currently is: something.tar.gz -> something.tar.gz.extracted
and you'd like it to be: something.tar.gz -> something
even if 'something.tar.gz' archive doesn't contain a toplevel directory named 'something', am I right?

Well, like I said in my previous post this would introduce ambiguity and inconsistencies in some cases.
OTOH, I can understand that it could be indeed time-saving in some scenarios.

Anyway, I've figured out a relatively easy (and probably smart enough to circumvent most of corner cases) way to drop all those extension(s) from output dir.
Just replace line 118 in /usr/local/apps/UExtract/uextract:

Code: Select all

DESTDIR="${CUSTOMDIR}/$(basename "$FILEPATH").$(gettext 'extracted')"
with these 3:

Code: Select all

shopt -s extglob
DESTDIR="${CUSTOMDIR}/$(basename "${FILEPATH%%?($(grep -woE "[^#\"\*\?]\*\..*\)" "$(readlink -f "$0")" | tr -d '\t \*)' | tr '\n' '|'))}")"
shopt -u extglob
It is not well tested, there may be some unforeseen side-effects, so proceed with caution at first.
Give it a spin and let me know if this is really what you want.
I'm very hesitant about including this, though...
___________

Thanks Slavvo67, appreciated.

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

Robert123
Posts: 362
Joined: Fri 20 May 2016, 05:22
Location: Pacific

#184 Post by Robert123 »

Understood SFR I just was excited at the prospect of an updated Wary. I have ammended my post to reflect that.
Devuan Linux, Stardust 013 (4.31) updated [url]https://archive.org/details/Stardustpup013glibc2.10[/url]
s57(2018)barebone[url]https://sourceforge.net/projects/puppy-linux-minimal-builds/files/s57%282018%29barebones.iso/download[/url]

User avatar
666philb
Posts: 3615
Joined: Sun 07 Feb 2010, 12:27
Location: wales ... by the sea

#185 Post by 666philb »

hi SFR,

maybe the best thing to do is have a setting so users can turn it on or off to suit their preference
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#186 Post by greengeek »

SFR wrote:UExtract does not rename anything, it _creates_ output directory after the name of an archive that's about to be extracted, adds '.extracted' suffix to it and then unpacks the archive there.

The reason for having a separate extraction directory is to prevent polluting your filesystem with lots of loose files and dirs in case of archives that do not have the top-most directory.!
Initially this behaviour seemed unnecessary but the more I have used uextract the more I have come to value the fact that the extracted files are wrapped in a clearly identified "-extracted" directory.

It has saved me from myself a number of times. I would like it to remain the default behaviour even if an options switch is added to allow the user to change it.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#187 Post by Mike Walsh »

Hi, SFR.

Agree with greengeek, there. The fact of having a separate folder for the extracted files is one of the best things about it.

Since installing don570's 'Right-click' .pet in all my Pups around a year ago (which has UExtract as part of its complement of tricks!), it's all I use now. I can't remember the last time I used XArchiver..!

One question, if I may? I don't know which version of UExtract 'Right-click' is using; if I install your newest .pet, will 'Right-click' then make use of it? Or will it always be a standalone app?

(Not that I mind, either way... :) )


Mike. :wink:

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#188 Post by SFR »

Robert123 wrote:Understood SFR I just was excited at the prospect of an updated Wary. I have ammended my post to reflect that.
Ok, thanks for clarification.
666philb wrote:maybe the best thing to do is have a setting so users can turn it on or off to suit their preference
greengeek wrote:Initially this behaviour seemed unnecessary but the more I have used uextract the more I have come to value the fact that the extracted files are wrapped in a clearly identified "-extracted" directory.

It has saved me from myself a number of times. I would like it to remain the default behaviour even if an options switch is added to allow the user to change it.
Mike Walsh wrote:Agree with greengeek, there. The fact of having a separate folder for the extracted files is one of the best things about it.
No worries, I don't plan to change the default behaviour.
Maybe I'll add this as an option, but I haven't decided yet.
Besides, not much has been happening lately in UExtract's development, so next version won't be released anytime soon, anyway.
Mike Walsh wrote:One question, if I may? I don't know which version of UExtract 'Right-click' is using; if I install your newest .pet, will 'Right-click' then make use of it? Or will it always be a standalone app?
You can check the version by simply issuing uextract command in terminal:

Code: Select all

# uextract 

UExtract v3.25 by SFR'2013-2016; GNU GPL v2 applies
...
UExtract has always been (and will be) a standalone app, but if you install newer version it should overwrite the previous one.
Its ROX "right-clicks" are part of it, although I'm not sure if Don570 makes use of the provided 'pinstall.sh' script that takes care of creating them, or uses his own method in his suite...

Thank you all for the feedback &
Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

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

#189 Post by don570 »

I'm not sure if Don570 makes use of the provided 'pinstall.sh' script that takes care of creating them, or uses his own method in his suite...

I stick about five lines of your pinstall.sh script in my pinstall.sh script
at the end.

I'll do an update of the right click utility package to uextract 325

____________________________________________________

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

#190 Post by don570 »

uextract 3.25 report from barry's newest...

There is no right click menu item for Barry's compressed image.

quirky-pi2-sd-8gb-xerus-8.0.18alpha.img.xz

_____________________________________

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#191 Post by SFR »

don570 wrote:uextract 3.25 report from barry's newest...

There is no right click menu item for Barry's compressed image.

quirky-pi2-sd-8gb-xerus-8.0.18alpha.img.xz
Yes, it's because that image is not seen as regular application/x-xz, but application/x-raw-disk-image-xz-compressed.
I'll add this MIME type in next version, thanks.

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

Robert123
Posts: 362
Joined: Fri 20 May 2016, 05:22
Location: Pacific

#192 Post by Robert123 »

Hi SFR,

I look forward to the next version bloody good program.
Devuan Linux, Stardust 013 (4.31) updated [url]https://archive.org/details/Stardustpup013glibc2.10[/url]
s57(2018)barebone[url]https://sourceforge.net/projects/puppy-linux-minimal-builds/files/s57%282018%29barebones.iso/download[/url]

quirkian2new
Posts: 152
Joined: Tue 06 Oct 2015, 14:10
Location: on the inter-planet train

#193 Post by quirkian2new »

Hello, SFR,

For some reason, i downloaded the windows version of mtpaint, "mtpaint-3.40-setup.exe" and dropped into Uextract v3.25.
The extract process failed.

I loaded WINE and then run the "Universal Extractor (v1.6.1 R7)
==================================================
Portable application customized for Lupo PenSuite"
http://www.lupopensuite.com/
Original Software:
http://www.legroom.net/software/uniextract
=========================================

This windows extractor did it successfully in WINE. see below screens.

my impression seems that this windows extractor have more chance of success extracting the windows xxx-setup.exe files .

My impression right or wrong, i don't know, you decide.
Attachments
Screenshot(1).jpg
(21.75 KiB) Downloaded 167 times

quirkian2new
Posts: 152
Joined: Tue 06 Oct 2015, 14:10
Location: on the inter-planet train

#194 Post by quirkian2new »

screen1
Attachments
Screenshot.jpg
(23.64 KiB) Downloaded 160 times

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#195 Post by SFR »

quirkian2new wrote:For some reason, i downloaded the windows version of mtpaint, "mtpaint-3.40-setup.exe" and dropped into Uextract v3.25.
The extract process failed.
Well, UExtract unpacks exe files via p7zip, so if the latter can't handle it, neither can UExtract (it's only a wrapper script after all).
In this particular case we're dealing with exe created with Inno Setup installer.
But there's a native Linux unpacker for such files: http://constexpr.org/innoextract/, so I think I'll add support for it in next version.
Thanks for drawing my attention to that.
___________
Robert123 wrote:I look forward to the next version bloody good program.
Thanks. It will take a while yet, though...

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

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

#196 Post by vicmz »

Spanish .mo
Attachments
MoManager-es-uextract-3.25.tar.gz
(4.26 KiB) Downloaded 242 times

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

#197 Post by don570 »

Barry K had interesting report on mime info on his blog

http://barryk.org/news/?viewDetailed=00424
____________________________________________

belham2
Posts: 1715
Joined: Mon 15 Aug 2016, 22:47

#198 Post by belham2 »

Have a question about UExtract (SFR, Don, Greengeek, anyone??) :

I am so addicted to UExtract, that I put it in nearly every puppy (removing whatever might be there) that I can.

And when I go back to use bigger Linux desktop distros, I find myself wondering if UExtract would work in those too.

Would it? Would it load just like all other regular scripts I have and still do its great stuff??? Or am I just whistling Dixie here & don't realize everything that is needed for UExtract to work... :?:

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#199 Post by SFR »

vicmz wrote:Spanish .mo
Thanks, will be in next version.
don570 wrote:Barry K had interesting report on mime info on his blog
Yeah, I've seen it. I'll add this new DEB mimetype, too, just in case.
belham2 wrote:And when I go back to use bigger Linux desktop distros, I find myself wondering if UExtract would work in those too.
Theoretically, it should.
However rather not as a right-click extension, but as a pure CLI utility.
Just extract UExtract.pet, grab usr/local/apps/UExtract/uextract script and put it somewhere in PATH (/usr/local/bin perhaps) in one of your "bigger" distros.
Then try it from terminal, e.g.:

Code: Select all

uextract archive.tar.gz
Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#200 Post by SFR »

Version 3.26

- added application/x-raw-disk-image-xz-compressed and application/vnd.debian.binary-package MIME types (thanks to don570)
- added support for 'innoextract' (thanks to quirkian2new)
- updated Spanish translation (thanks to vicmz)
- minor corrections
- new formats/extensions:
  • .spack (0linux package) [(un)xz+cpio]
First post updated!

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

Post Reply