wok-6.x view yandex-disk/stuff/usr/libexec/yandex-disk/unpublish @ rev 19523
Add yandex-disk (with custom desktop integration)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sun Nov 27 18:29:04 2016 +0200 (2016-11-27) |
parents | |
children |
line source
1 #!/bin/sh
2 # Unpublish file from Yandex.Disk: revoke sharing of the selected file
3 # Aleksei Bobylev <al.bobylev@gmail.com>, 2016
5 # i18n
6 _() { gettext 'yandex-disk-helper' "$1"; }
8 title="$(_ 'Yandex.Disk')"
9 name=$(basename "$1")
11 # Unpublish file/folder using yandex-disk CLI
12 answer=$(yandex-disk unpublish "$1")
14 # Display localized notification
15 notify-send -i 'yandex-disk' "$title" "$name:\n$answer"
17 # Reset GVFS attributes
18 gvfs-set-attribute "$1" -t stringv metadata::emblems none
19 gvfs-set-attribute "$1" -t string metadata::yandex-disk-uri ''