@ -1,30 +1,22 @@ | |||
# Maintainer: Sabart Otto - Seberm <seberm[at]gmail[dot].com | |||
# Maintainer: Pekka Helenius <fincer89 [at] hotmail [dot] com> | |||
pkgname=kde-servicemenus-hexstrings | |||
pkgver=1 | |||
pkgrel=1 | |||
pkgdesc="Extract all readable strings from a file using Dolphin or Konqueror (KDE5 Dolphin action)" | |||
url=() | |||
arch=('any') | |||
license=('BSD') | |||
install='' | |||
source=(hexstrings.patch) | |||
license=('GPL') | |||
source=( | |||
'hexstrings.desktop' | |||
'hexstrings.sh' | |||
) | |||
depends=('binutils' 'dolphin') | |||
optdepends=() | |||
conflicts=() | |||
#provides='' | |||
makedepends=() | |||
prepare() { | |||
mkdir $pkgname-$pkgver | |||
cd $srcdir/$pkgname-$pkgver | |||
touch hexstrings.sh hexstrings.desktop | |||
patch -Np1 -i "$srcdir/hexstrings.patch" | |||
} | |||
md5sums=('d239cc16272b4ba3243172bd72dff939' | |||
'7c06343e1802be5adf445e719a2c1fd0') | |||
package() { | |||
mkdir -p $pkgdir/usr/share/kservices5/ServiceMenus/ | |||
cp $srcdir/$pkgname-$pkgver/{hexstrings.desktop,hexstrings.sh} $pkgdir/usr/share/kservices5/ServiceMenus/ | |||
chmod 755 $pkgdir/usr/share/kservices5/ServiceMenus/{hexstrings.desktop,hexstrings.sh} | |||
mkdir -p $pkgdir/usr/share/kservices5/ServiceMenus/ | |||
cp $srcdir/{hexstrings.desktop,hexstrings.sh} $pkgdir/usr/share/kservices5/ServiceMenus/ | |||
chmod 755 $pkgdir/usr/share/kservices5/ServiceMenus/{hexstrings.desktop,hexstrings.sh} | |||
} | |||
md5sums=('501cf2c12fa9c8e7f88012b9e6a77d21') |
@ -0,0 +1,17 @@ | |||
[Desktop Action hexstrings] | |||
Exec=/usr/share/kservices5/ServiceMenus/hexstrings.sh | |||
Icon=text-x-script | |||
Name=Export readable strings from this file | |||
Name[fi]=Hae luettavissa olevat tekstit tästä tiedostosta | |||
[Desktop Entry] | |||
Actions=hexstrings; | |||
Icon=text-richtext | |||
MimeType= | |||
ServiceTypes= | |||
TryExec=strings | |||
Type=Service | |||
X-KDE-Priority=TopLevel | |||
X-KDE-ServiceTypes=KonqPopupMenu/Plugin,all/allfiles | |||
X-KDE-StartupNotify=false | |||
X-KDE-Submenu= |
@ -1,32 +0,0 @@ | |||
--- a/hexstrings.sh | |||
+++ b/hexstrings.sh | |||
@@ -0,0 +1,8 @@ | |||
+#!/bin/bash | |||
+ | |||
+while [ $# -gt 0 ]; do | |||
+ HEXFILE=$1 | |||
+ HEXFILE_STRINGS=$(echo "$HEXFILE" | sed 's/\.\w*$/_strings.txt/') | |||
+ strings "$HEXFILE" | sort > "$HEXFILE_STRINGS" #Export strings from a hex file and sort them alphabetically. | |||
+ shift | |||
+done | |||
--- a/hexstrings.desktop | |||
+++ b/hexstrings.desktop | |||
@@ -0,0 +1,17 @@ | |||
+[Desktop Action hexstrings] | |||
+Exec=/usr/share/kservices5/ServiceMenus/hexstrings.sh | |||
+Icon=text-x-script | |||
+Name=Export readable strings from this file | |||
+Name[fi]=Hae luettavissa olevat tekstit tästä tiedostosta | |||
+ | |||
+[Desktop Entry] | |||
+Actions=hexstrings; | |||
+Icon=text-richtext | |||
+MimeType= | |||
+ServiceTypes= | |||
+TryExec=strings | |||
+Type=Service | |||
+X-KDE-Priority=TopLevel | |||
+X-KDE-ServiceTypes=KonqPopupMenu/Plugin,all/allfiles | |||
+X-KDE-StartupNotify=false | |||
+X-KDE-Submenu= |
@ -0,0 +1,9 @@ | |||
#!/bin/env bash | |||
while [ $# -gt 0 ]; do | |||
HEXFILE=$1 | |||
HEXFILE_STRINGS=$(echo "$HEXFILE" | sed 's/\.\w*$/_strings.txt/') | |||
#Export strings from a hex file and sort them alphabetically. | |||
strings "$HEXFILE" | sort > "$HEXFILE_STRINGS" | |||
shift | |||
done |