Is the plugin "User Shell Script" working ?

Filipe Miguel Veloza filipe.veloza at ist.utl.pt
Wed Sep 20 20:54:19 BST 2023


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