Browse Source

Add QNapi KDE5/Dolphin service menu

master
Fincer 7 years ago
parent
commit
dfdd0f68de
4 changed files with 54 additions and 0 deletions
  1. +9
    -0
      Readme.md
  2. +25
    -0
      kde-servicemenus-qnapi/PKGBUILD
  3. +13
    -0
      kde-servicemenus-qnapi/qnapi-downloadsub.desktop
  4. +7
    -0
      kde-servicemenus-qnapi/qnapi-downloadsub.sh

+ 9
- 0
Readme.md View File

@ -109,6 +109,15 @@ This script can be used for multiple files at the same time but is developed for
FORMAT: Arch Linux PKGBUILD script.
**kde-servicemenus-qnapi**
--------------
Plasma 5 Dolphin service menu script for downloading video subtitles.
Requires qnapi.
FORMAT: Arch Linux PKGBUILD script + source files.
**kde-servicemenus-searchactions**
--------------


+ 25
- 0
kde-servicemenus-qnapi/PKGBUILD View File

@ -0,0 +1,25 @@
pkgname=kde-servicemenus-qnapi
pkgver=1
pkgrel=1
pkgdesc="Download subtitles for a video file using QNapi (KDE5 Dolphin action)"
url=""
arch=('any')
license=('BSD')
install=''
source=(
qnapi-downloadsub.desktop
qnapi-downloadsub.sh
)
depends=('dolphin' 'konsole' 'qnapi')
optdepends=()
conflicts=()
#provides=''
makedepends=()
package() {
mkdir -p $pkgdir/usr/share/kservices5/ServiceMenus/
cp $srcdir/{qnapi-downloadsub.desktop,qnapi-downloadsub.sh} $pkgdir/usr/share/kservices5/ServiceMenus/
chmod 755 $pkgdir/usr/share/kservices5/ServiceMenus/{qnapi-downloadsub.desktop,qnapi-downloadsub.sh}
}
md5sums=('a5a6d1c01a89239695de7d8c29c1c470'
'1d58fafdf1f8858a65214d64b3056bbf')

+ 13
- 0
kde-servicemenus-qnapi/qnapi-downloadsub.desktop View File

@ -0,0 +1,13 @@
[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=video/*
Icon=qnapi
Actions=qnapi-downloadsub;
X-KDE-StartupNotify=false
X-KDE-Priority=TopLevel
[Desktop Action qnapi-downloadsub]
Name=Download subtitles
Icon=qnapi
Exec=konsole --workdir $(pwd) -p "tabtitle=Download subtitles" -e /usr/share/kservices5/ServiceMenus/qnapi-downloadsub.sh

+ 7
- 0
kde-servicemenus-qnapi/qnapi-downloadsub.sh View File

@ -0,0 +1,7 @@
#!/bin/bash
while [ $# -gt 0 ]; do
VIDEO=$1
qnapi -c "$VIDEO"
shift
done

Loading…
Cancel
Save