]> Softwares of Agnibho - imagecap.git/commitdiff
Use zenity to edit text master
authorAgnibho Mondal <mondal@agnibho.com>
Thu, 1 Mar 2018 01:18:49 +0000 (06:48 +0530)
committerAgnibho Mondal <mondal@agnibho.com>
Thu, 1 Mar 2018 01:18:49 +0000 (06:48 +0530)
README
imagecap

diff --git a/README b/README
index 47a40ec1107b452d1174980e81f7a3309fbef703..fba1aa06df17bd0a7941749f05b2fd5dc4867e63 100644 (file)
--- a/README
+++ b/README
@@ -17,7 +17,7 @@ Latest release of ImageCap can be downloaded from http://code.agnibho.com/imagec
 Dependencies
 ------------
 
-ImageCap depends on: bash, coreutils, sed, exiftool, feh, xdg-open.
+ImageCap depends on: bash, coreutils, sed, exiftool, feh, zenity.
 
 Installation
 ------------
index a5a8f1231ef63d63907b85a0b902a9e99e88c00d..eec547e6f81eae4e185b68308471cde6b21642fb 100755 (executable)
--- a/imagecap
+++ b/imagecap
@@ -29,12 +29,11 @@ if [ -n "$ARG" ];then
 fi
 
 function update(){
-       TEMP=$(mktemp);
-       exiftool -S -s -b -comment "$1">$TEMP;
-       ls -l $TEMP;
-       xdg-open $TEMP;
-       exiftool -overwrite_original_in_place "-comment<=$TEMP" "$1";
-       rm $TEMP;
+       DATA=$(exiftool -S -s -b -comment "$1");
+       DATA=$(echo -n "$DATA"|zenity --text-info --editable --title="Edit Caption" --ok-label="Update");
+       if [ "$?" = "0" ];then
+               exiftool -overwrite_original_in_place -comment="$DATA" "$1";
+       fi
 }
 
 function view(){