PackIt-1.22 - a flexible Archiving/Compressing GUI
Version 1.21:
- fixes and improvements in creating ISO and ext2 images
- zstd: use '-T0' option (max. # of threads)
First post updated.
Greetings!
- fixes and improvements in creating ISO and ext2 images
- zstd: use '-T0' option (max. # of threads)
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]
[b][color=green]Omnia mea mecum porto.[/color][/b]
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
@SFR
PackIt is great! Feodor reminded me about it, suggesting it, and UExtract, would be good in EasyOS and EasyPup. Yes, they would!
I took the liberty os making some changes to the 'pinstall.sh' script:
...I thought is is better if leave out files that are already archives.
...and commented-out a couple of lines, to avoid duplicate "PackIt" entries in the right-click "Open With..." menu.
Also, the search for mime folders will ignore any without "_" in it. For example, ".text", as again, this causes duplicate entries in the menu.
For the 'pet.specs' file, I made one change, "Utility;package", as the "X-Utility-package" is wrong for Easy -- don't know if that is now acceptable to woofCE.
packit-1.21-1|packit|1.21-1||Utility;package|116K||packit-1.21-1.pet||Archiving/Compressing GUI||||
PackIt is great! Feodor reminded me about it, suggesting it, and UExtract, would be good in EasyOS and EasyPup. Yes, they would!
I took the liberty os making some changes to the 'pinstall.sh' script:
Code: Select all
#!/bin/sh
###############################################################################
# PackIt v1.21 by JakeSFR (a.k.a. SFR)'2013-2016,2019,2020 #
# GNU GPL v2 applies #
# Thanks to Pemasu for helping me with making this script Woof-friendly #
###############################################################################
# -----------------------------------------------------------------------------
# Associate ROX 'SendTo/OpenWith' with PackIt
# -----------------------------------------------------------------------------
#BK got this from UExtract.desktop...
ARCHIVED_MIME='application_epub+zip\napplication_gzip\napplication_img\napplication_initramfs-gz\napplication_mbox\napplication_ms-tnef\napplication_pdf\napplication_pet\napplication_pup\napplication_vnd.adobe.flash.movie\napplication_vnd.android.package-archive\napplication_vnd.appimage\napplication_vnd.comicbook-rar\napplication_vnd.comicbook+zip\napplication_vnd.debian.binary-package\napplication_vnd.etsi.asic-e+zip\napplication_vnd.ms-cab-compressed\napplication_vnd.ms-excel.sheet.macroEnabled.12\napplication_vnd.ms-powerpoint\napplication_vnd.ms-tnef\napplication_vnd.oasis.opendocument.chart\napplication_vnd.oasis.opendocument.database\napplication_vnd.oasis.opendocument.graphics\napplication_vnd.oasis.opendocument.graphics-template\napplication_vnd.oasis.opendocument.image\napplication_vnd.oasis.opendocument.presentation\napplication_vnd.oasis.opendocument.presentation-template\napplication_vnd.oasis.opendocument.spreadsheet\napplication_vnd.oasis.opendocument.spreadsheet-template\napplication_vnd.oasis.opendocument.text\napplication_vnd.oasis.opendocument.text-master\napplication_vnd.oasis.opendocument.text-template\napplication_vnd.oasis.opendocument.text-web\napplication_vnd.openofficeorg.extension\napplication_vnd.openxmlformats-officedocument.presentationml.presentation\napplication_vnd.openxmlformats-officedocument.spreadsheetml.sheet\napplication_vnd.openxmlformats-officedocument.wordprocessingml.document\napplication_vnd.rar\napplication_vnd.sqlite3\napplication_vnd.squashfs\napplication_vnd.sun.xml.calc\napplication_vnd.sun.xml.calc.template\napplication_vnd.sun.xml.draw\napplication_vnd.sun.xml.draw.template\napplication_vnd.sun.xml.impress\napplication_vnd.sun.xml.impress.template\napplication_vnd.sun.xml.math\napplication_vnd.sun.xml.writer\napplication_vnd.sun.xml.writer.global\napplication_vnd.sun.xml.writer.template\napplication_x-7z-compressed\napplication_x-abiword\napplication_x-ace\napplication_x-aes\napplication_x-alz\napplication_x-amiga-disk-format\napplication_x-amipro\napplication_x-apple-diskimage\napplication_x-arc\napplication_x-archive\napplication_x-arj\napplication_x-bfe\napplication_x-blender\napplication_x-bzip\napplication_x-bzip-compressed-tar\napplication_x-cb7\napplication_x-cbr\napplication_x-cbt\napplication_x-cbz\napplication_x-ccrypt\napplication_x-cd-image\napplication_x-chm\napplication_x-compress\napplication_x-compressed-tar\napplication_x-cpio\napplication_x-cpio-compressed\napplication_x-dar\napplication_x-deb\napplication_x-debian-package\napplication_x-emerald-theme\napplication_x-ext2-image\napplication_x-ext3-image\napplication_x-ext4-image\napplication_x-font-pcf\napplication_x-gamegear-rom\napplication_x-gettext-translation\napplication_x-gnumeric\napplication_x-gz-font-linux-psf\napplication_x-gzip\napplication_x-gzpdf\napplication_x-gzpostscript\napplication_x-hwp\napplication_x-initrd\napplication_x-initrd-compressed\napplication_x-iso9660-appimage\napplication_x-java-archive\napplication_x-java-pack200\napplication_x-lha\napplication_x-linux-kernel\napplication_x-lz4\napplication_x-lrzip-compressed-tar\napplication_x-lzip\napplication_x-lzip-compressed-tar\napplication_x-lzma\napplication_x-lzma-compressed-tar\napplication_x-lzop\napplication_x-matroska\napplication_x-mimearchive\napplication_x-ms-dos-executable\napplication_x-ms-wim\napplication_x-navi-animation\napplication_x-ole-storage\napplication_x-pak\napplication_x-php\napplication_x-rar\napplication_x-raw-disk-image\napplication_x-raw-disk-image-xz-compressed\napplication_x-rpm\napplication_x-shar\napplication_x-sharedlib\napplication_x-shockwave-flash\napplication_x-sms-rom\napplication_x-source-rpm\napplication_x-sqlite3\napplication_x-squashfs-image\napplication_x-tar\napplication_x-tarz\napplication_x-truecrypt\napplication_x-tzo\napplication_x-veracrypt\napplication_x-virtualbox-ova\napplication_x-virtualbox-vbox-extpack\napplication_x-virtualbox-vdi\napplication_x-virtualbox-vmdk\napplication_x-windows-themepack\napplication_x-xar\napplication_x-xpinstall\napplication_x-xz\napplication_x-xz-compressed-tar\napplication_x-zstd-compressed-tar\napplication_x-zoo\napplication_zip\napplication_zstd\naudio_basic\naudio_mpeg\naudio_x-flac\naudio_x-ms-wma\naudio_x-wav\nimage_bmp\nimage_gif\nimage_jpeg\nimage_png\nimage_vnd.djvu\nimage_vnd.djvu+multipage\nimage_vnd.microsoft.icon\nimage_x-icns\nimage_x-win-bitmap\nimage_x-xcursor\nmessage_rfc822\ntext_x-vhdl\nvideo_3gpp\nvideo_mp2t\nvideo_mp4\nvideo_mpeg\nvideo_ogg\nvideo_quicktime\nvideo_webm\nvideo_x-flv\nvideo_x-matroska\nvideo_x-msvideo\nvideo_x-ms-wmv'
echo -e "$ARCHIVED_MIME" > /tmp/packit-archived-mime
PackIt_PATH="/usr/local/apps/PackIt"
LOC1="/etc/xdg/rox.sourceforge.net/SendTo"
LOC2="$HOME/.config/rox.sourceforge.net/SendTo"
LOC3="$HOME/.config/rox.sourceforge.net/OpenWith"
LOC4="/root/.config/rox.sourceforge.net/OpenWith"
if [ "$(pwd)" = "/" ]; then
for i in "$LOC1" "$LOC2" "$LOC3" "$LOC4"; do
[ -d "$i" ] && { RC_PATH="$i"; break; }
done
Globs_PATH="/usr/share/mime/globs"
Types_PATH="/usr/share/mime/types"
else # Woof/Fatdog build system
for i in ".$LOC1" ".$LOC2" ".$LOC3" ".$LOC4"; do
[ -d "$i" ] && { RC_PATH="$i"; break; }
done
Globs_PATH="./usr/share/mime/globs"
Types_PATH="./usr/share/mime/types"
fi
if [ -d "$RC_PATH" ]; then
# Creates missing folders using contents of 'globs' file
for i in $(grep ":" "$Globs_PATH" | cut -f1 -d ':' | tr '/' '_' | uniq); do
[ ! -d "${RC_PATH}/.${i}" ] && mkdir "${RC_PATH}/.${i}"
done
# Creates missing folders using contents of 'types' file
for i in $(cat "$Types_PATH" | tr '/' '_' | uniq); do
[ ! -d "${RC_PATH}/.${i}" ] && mkdir "${RC_PATH}/.${i}"
done
#BK[ ! -d "${RC_PATH}/.inode_unknown" ] && mkdir "${RC_PATH}/.inode_unknown"
#BK[ ! -d "${RC_PATH}/.group" ] && mkdir "${RC_PATH}/.group"
# Creates symlink to PackIt in every folder
# BK: must have "_", ex to avoid ".text"...
for i in $(find "$(realpath "${RC_PATH}")" -maxdepth 1 -type d -iname ".*_*"); do
#BK: ignore files already archives...
echo -n "${i/*./}" > /tmp/packit-mime-folder
grep -q -x -f /tmp/packit-archived-mime /tmp/packit-mime-folder
[ $? -eq 0 ] && continue
[ ! -L "${i}/PackIt" ] && ln -s "$PackIt_PATH" "${i}/PackIt"
done
#BK[ ! -L "${RC_PATH}/PackIt" ] && ln -s "$PackIt_PATH" "${RC_PATH}/PackIt"
fi
# -----------------------------------------------------------------------------
# Associate custom action with Thunar
if [ "$(pwd)" = "/" ]; then
if [ $(which thunar 2>/dev/null) ] || [ $(which Thunar 2>/dev/null) ]; then
CONFIG="$HOME/.config/Thunar/uca.xml"
CONFIG_BAK="$HOME/.config/Thunar/uca.xml.bak"
CONFIG_TMP="/tmp/uca.xml"
if [ -f "$CONFIG" ]; then
grep '<name>PackIt</name>' "$CONFIG" >/dev/null || {
grep -v '^</actions>' "$CONFIG" > "$CONFIG_TMP"
echo '<action>
<icon>PackIt</icon>
<name>PackIt</name>
<command>/usr/local/apps/PackIt/AppRun %F</command>
<description>Archive files</description>
<patterns>*</patterns>
<directories/>
<audio-files/>
<image-files/>
<other-files/>
<text-files/>
<video-files/>
</action>
</actions>' >> "$CONFIG_TMP"
mv "$CONFIG" "$CONFIG_BAK"
mv "$CONFIG_TMP" "$CONFIG"
}
else
mkdir -p "${CONFIG%/*}"
echo '<?xml encoding="UTF-8" version="1.0"?>
<actions>
<action>
<icon></icon>
<name>PackIt</name>
<command>/usr/local/apps/PackIt/AppRun %F</command>
<description>Archive files</description>
<patterns>*</patterns>
<directories/>
<audio-files/>
<image-files/>
<other-files/>
<text-files/>
<video-files/>
</action>
</actions>' > "$CONFIG"
fi
fi
fi
# -----------------------------------------------------------------------------
# Create shortcut on pinboard/desktop
[ "$(pwd)" = "/" ] && /usr/local/apps/PackIt/createshortcut &
# =============================================================================
...and commented-out a couple of lines, to avoid duplicate "PackIt" entries in the right-click "Open With..." menu.
Also, the search for mime folders will ignore any without "_" in it. For example, ".text", as again, this causes duplicate entries in the menu.
For the 'pet.specs' file, I made one change, "Utility;package", as the "X-Utility-package" is wrong for Easy -- don't know if that is now acceptable to woofCE.
packit-1.21-1|packit|1.21-1||Utility;package|116K||packit-1.21-1.pet||Archiving/Compressing GUI||||
[url]https://bkhome.org/news/[/url]
Alright!BarryK wrote:PackIt is great! Feodor reminded me about it, suggesting it, and UExtract, would be good in EasyOS and EasyPup. Yes, they would!
Generally yes (not in all cases, though), but it was more straightforward to add it to all available MIME-Types.BarryK wrote:...I thought is is better if leave out files that are already archives.
BarryK wrote:...and commented-out a couple of lines, to avoid duplicate "PackIt" entries in the right-click "Open With..." menu.
Code: Select all
#BK[ ! -d "${RC_PATH}/.inode_unknown" ] && mkdir "${RC_PATH}/.inode_unknown"
Code: Select all
#BK[ ! -d "${RC_PATH}/.group" ] && mkdir "${RC_PATH}/.group"
I think '.group' wasn't implemented in the original ROX, but is supported by some of its forks (jun7's for sure).
There's also '.all', that adds menu item for all MIME-Types, which would be the best option for PackIt, but again it's not supported by the original ROX.
Interesting, I don't have '.text' dir in Fatdog, but indeed adding it creates a duplicate.BarryK wrote:Also, the search for mime folders will ignore any without "_" in it. For example, ".text", as again, this causes duplicate entries in the menu.
However, just installed PackIt in easy-2.2.11 and clicking a text/plain file shows only one PackIt menu item, even if '.text' dir also contains PackIt symlink.
In fact, I didn't see a duplicate menu entry for PackIt in Easy at all...
In Fatdog I see the duplicates only if I select multiple items of the same MIME-Type and it's caused by '.group'.
EDIT: unless you mean the 'SendTo/OpenWith' case? Yeah, there are some duplicates, but IIRC fixing it would also disable PackIt in the root menu in some cases...
Oh, that's because the 2nd .desktop file in AppDir has 'Categories=X-Utility-package;', should be just 'Utility'. And dir2pet picks up the wrong one.BarryK wrote:For the 'pet.specs' file, I made one change, "Utility;package", as the "X-Utility-package" is wrong for Easy -- don't know if that is now acceptable to woofCE.
Thanks!
EDIT: I reuploaded the .pet with corrected category.
___________
Here: https://www.rarlab.com/download.htmnic007 wrote:Where can I download the rar compression module (not unrar, I have that)?
Greetings!
Last edited by SFR on Tue 10 Mar 2020, 14:01, edited 1 time in total.
[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]
[b][color=green]Omnia mea mecum porto.[/color][/b]
Well, depends on what you find useful.
Some highlights: Find'N'Run (and Step's fork), LockState, MagDock, MultiRename, TAS.
Greetings!
Some highlights: Find'N'Run (and Step's fork), LockState, MagDock, MultiRename, TAS.
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]
[b][color=green]Omnia mea mecum porto.[/color][/b]
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
Yes, right-click, then choose "Open with...", you get duplicate entries of PackIt for a text file.SFR wrote:Interesting, I don't have '.text' dir in Fatdog, but indeed adding it creates a duplicate.BarryK wrote:Also, the search for mime folders will ignore any without "_" in it. For example, ".text", as again, this causes duplicate entries in the menu.
However, just installed PackIt in easy-2.2.11 and clicking a text/plain file shows only one PackIt menu item, even if '.text' dir also contains PackIt symlink.
In fact, I didn't see a duplicate menu entry for PackIt in Easy at all...
In Fatdog I see the duplicates only if I select multiple items of the same MIME-Type and it's caused by '.group'.
EDIT: unless you mean the 'SendTo/OpenWith' case? Yeah, there are some duplicates, but IIRC fixing it would also disable PackIt in the root menu in some cases...
I can't think of any situation where PackIt would not be listed in the root right-click menu. The 'globs' and 'types' mime files are pretty comprehensive, should cover all the types of text files that we are likely to encounter ...I think.
[url]https://bkhome.org/news/[/url]
I was thinking about it at the very beginning, but since it's only for storing stuff, I didn't see a need for a journaled fs.nic007 wrote:Consider adding capability to create 3fs and 4fs (mkfs.ext3 and mkfs.ext4) for next version.
Recently I even wanted to remove that option whatsoever, but since it can be used to convert a savefolder to savefile, maybe it has some practical use.
Will see next time I'll be doing something with PackIt.
Just checked and now I remember why I decided to add PackIt and UExtract symlinks in /etc/xdg/rox.sourceforge.net/{SendTo,OpenWith} dir (the main dir, not .something subdir).BarryK wrote:Yes, right-click, then choose "Open with...", you get duplicate entries of PackIt for a text file.
I can't think of any situation where PackIt would not be listed in the root right-click menu. The 'globs' and 'types' mime files are pretty comprehensive, should cover all the types of text files that we are likely to encounter ...I think.
Without them there's no UExtract (1 & 2) and PackIt (2) option in 'right-click -> SendTo/OpenWith' submenu at all, if:
1. given file type is not handled (properly) by ROX, e.g. "Macintosh HFS Extended version 4 ...", which is reported by ROX as 'application/octet-stream', but UExtract can extract it,
2. given file type is handled by ROX, but was added _after_ installing PackIt/UExtract and therefore the relevant subdir in /etc/xdg/rox.sourceforge.net/{SendTo,OpenWith} doesn't exist or does not contain symlinks to both apps.
Thanks to those symlinks they are at least always accessible via SendTo/OpenWith submenu, but in other, "normal" cases there are duplicates, unfortunately.
As for ROX's text (but also image, application, etc.) - I wasn't quite aware of those "parent" MIME-Types and that they are also creating duplicates. I may want to do something about it in next version, indeed.
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]
[b][color=green]Omnia mea mecum porto.[/color][/b]
Yeah, I just realized, too, that since the the size of .2fs created by PackIt is equal to the total size of its contents, it needs to be enlarged afterwards.nic007 wrote:You may want to add a user option for the size of the savefile to be created.
Hmm, I think a separate utility just for the purpose of converting savedir to savefile would be a better and neater solution in this case...
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]
[b][color=green]Omnia mea mecum porto.[/color][/b]
Version 1.22:
- added ability to select individual checksums
- added support for pigz compressor
- PackIt.desktop: fix category (thanks to BarryK)
- install script: ignore parent ROX MIME-Types (thanks to BarryK)
- some minor fixes
First post updated.
Greetings!
- added ability to select individual checksums
- added support for pigz compressor
- PackIt.desktop: fix category (thanks to BarryK)
- install script: ignore parent ROX MIME-Types (thanks to BarryK)
- some minor fixes
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]
[b][color=green]Omnia mea mecum porto.[/color][/b]