@ -0,0 +1,25 @@ | |||||
# Maintainer: Pekka Helenius <fincer89 [at] hotmail [dot] com> | |||||
pkgname=kde-servicemenus-flif-webp | |||||
pkgver=1 | |||||
pkgrel=1 | |||||
pkgdesc="Convert image files to FLIF/WebP formats with Dolphin or Konqueror (KDE5 Dolphin actions)" | |||||
arch=('any') | |||||
license=('GPL') | |||||
source=( | |||||
'flif-webp-conv.desktop' | |||||
'flif-conversion.sh' | |||||
'webp-conversion.sh' | |||||
) | |||||
md5sums=('dfe8688e4c2f9a7318a5ac6efb43ceb3' | |||||
'b67c8ad9e57580a0e21cc585f8aa93ed' | |||||
'5a61d02b4f2ce9eb6a77fc4788a0b93c') | |||||
depends=('flif' 'dolphin') | |||||
package() { | |||||
mkdir -p ${pkgdir}/usr/share/kservices5/ServiceMenus/ | |||||
cp ${srcdir}/{flif-webp-conv.desktop,flif-conversion.sh,webp-conversion.sh} ${pkgdir}/usr/share/kservices5/ServiceMenus/ | |||||
chmod 755 ${pkgdir}/usr/share/kservices5/ServiceMenus/{flif-webp-conv.desktop,flif-conversion.sh,webp-conversion.sh} | |||||
} | |||||
@ -1,14 +1,18 @@ | |||||
[Desktop Entry] | [Desktop Entry] | ||||
Type=Service | Type=Service | ||||
ServiceTypes=KonqPopupMenu/Plugin | ServiceTypes=KonqPopupMenu/Plugin | ||||
MimeType=image/png | |||||
MimeType=image/* | |||||
Icon=image | Icon=image | ||||
Actions=flif_conversion; | |||||
Actions=flif_conversion;webp_conversion; | |||||
X-KDE-StartupNotify=false | X-KDE-StartupNotify=false | ||||
X-KDE-Priority=TopLevel | X-KDE-Priority=TopLevel | ||||
TryExec=flif | |||||
[Desktop Action flif_conversion] | [Desktop Action flif_conversion] | ||||
Name=Convert to FLIF format | Name=Convert to FLIF format | ||||
Icon=image | Icon=image | ||||
Exec=/usr/share/kservices5/ServiceMenus/flif-conversion.sh | Exec=/usr/share/kservices5/ServiceMenus/flif-conversion.sh | ||||
[Desktop Action webp_conversion] | |||||
Name=Convert to WebP format | |||||
Icon=image | |||||
Exec=/usr/share/kservices5/ServiceMenus/webp-conversion.sh |
@ -0,0 +1,8 @@ | |||||
#!/bin/env bash | |||||
while [ $# -gt 0 ]; do | |||||
OLDFORMAT=$1 | |||||
NEWFORMAT=$(echo " $OLDFORMAT" | sed 's/\.\w*$/.webp/') | |||||
convert $OLDFORMAT $NEWFORMAT | |||||
shift | |||||
done |
@ -1,22 +0,0 @@ | |||||
# Maintainer: Pekka Helenius <fincer89 [at] hotmail [dot] com> | |||||
pkgname=kde-servicemenus-flifconversion | |||||
pkgver=1 | |||||
pkgrel=1 | |||||
pkgdesc="Convert image files to FLIF format with Dolphin or Konqueror (KDE5 Dolphin action)" | |||||
arch=('any') | |||||
license=('GPL') | |||||
source=( | |||||
'flif-conversion.desktop' | |||||
'flif-conversion.sh' | |||||
) | |||||
depends=('flif' 'dolphin') | |||||
md5sums=('148108447aecfb7e7d60ce15a937d140' | |||||
'b67c8ad9e57580a0e21cc585f8aa93ed') | |||||
package() { | |||||
mkdir -p ${pkgdir}/usr/share/kservices5/ServiceMenus/ | |||||
cp ${srcdir}/{flif-conversion.desktop,flif-conversion.sh} ${pkgdir}/usr/share/kservices5/ServiceMenus/ | |||||
chmod 755 ${pkgdir}/usr/share/kservices5/ServiceMenus/{flif-conversion.desktop,flif-conversion.sh} | |||||
} |