Is the plugin "User Shell Script" working ?

Maik Qualmann metzpinguin at gmail.com
Wed Sep 20 21:10:44 BST 2023


The user shell script is designed to rework images or change metadata using 
external shell programs.
The BQM assumes that a new file is always created for $OUTPUT. If not, $INPUT 
must first be copied to $OUTPUT and the changes must be made to $OUTPUT.
The $ "variables" are not, they are replaced with real values in the script. 
So $INPUT becomes "/home/use/pictures/tempxxx.jpg" and $OUTPUT becomes "/home/
user/pictures/tempyyy.jpg" as example. The paths are automatically provided 
with quotation marks. In the same way, the other "variables" are replaced with 
real numbers.

Maik

Am Mittwoch, 20. September 2023, 21:54:19 CEST schrieb Filipe Miguel Veloza:
> Hi,
> 
> I'll try answer all points raised and include the actual code to avoid
> additional questions.
>  * "What's your shell by default in your computer ? BASH ?"
> digikam was launched from terminal with bash to access de digikam debug
> information, so I assume the answer would be yes.
> But just in case and to confirm what you mean, when you refer default,
> can you identify where to confirm ?
>  * "Your mistake is that you escaped $INPUT and $OUTPUT"
> What you mean "escaped"?
> Initially I simply copy & paste the example on the plugin
> documentation. Then I made some changes for additional debugging.
> If you notice the debug output, all information except INPUT & OUTPUT
> were returned correctly.
> 
> Below the current code and output with changes to increase testing:
> #!/bin/bash
> 
> $INPUT="TESTE123"
> 
> echo "INPUT FILE: [ $INPUT ]"
> echo "OUTPUT FILE: [ " $OUTPUT " ] "
> 
> echo "TITLE: $TITLE"
> echo "COMMENT: $COMMENTS"
> echo "COLORLABEL: $COLORLABEL"
> echo "PICKLABEL: $PICKLABEL"
> echo "RATING: $RATING"
> echo "TAGSPATH: $TAGSPATH"
> 
> exit $?
> 
> Debug Output:
> "digikam.dplugin.bqm: Script stdout "INPUT FILE: [  ]\nOUTPUT FILE: [
> ] \nTITLE: Arabian_Senses\nCOMMENT: Date : 2011 & Location : United
> Kingdom\nCOLORLABEL: 0\nPICKLABEL: 0\nRATING: -1\nTAGSPATH:
> Portofolio/Abstract/Shape_Forms\n"
> digikam.dplugin.bqm: Script stderr
> "/home/yinyang/programacao/Shellscript/DigikamScript_Testing.sh: line
> 3: =TESTE123: command not found\n"
> digikam.dplugin.bqm: Script exit code: 0"
> 
> If you notice the $INTPUT replacemente is happenning, but happarently
> leaving blank, not with the input file.
> 
> BTW : At this time I removed the cp command as INPUT and OUTPUT
> information is not reliable.






More information about the Digikam-users mailing list