hello all,
I'm new to YAD and i want to build some application which finds all JPG files (or other) in a folder and its subfolders, display the found file names in a YAD dialog (i'm using --list for this) and perform some string filtering functions on each file name to finally build an SQL statement : this SQL will be written to a file, which the user later can execute to insert these file names (and their dates/sizes/etc) into a database. I somewhat succeeded : the finding process is indeed shown in a YAD list by this script :
#! /bin/bash
myNR=0
fcAmp(){
sed 's/&/&/g' # sanitize ampersand char (due to yad error message)
}
fcMY(){
while read data; do
echo "$myNR$data"
myNR=$((myNR + 1)) # file counter prefix number
done
}
find /home/roelof/Desktop/FBset/ -name '*.jpg' | \
fcAmp | \
fcMY | \
yad \
--notebook \
--list \
--column "Files" \
--title "Some App Title" \
--fontname "mono 10" \
--width 600 \
--height 300 & \
yad --progress --pulsate --auto-close --auto-kill --button gtk-cancel:1
#---------------------
However, the last line doesn't work properly : i expect the progress bar displays the real progress (of the list-building, while finding files), but it shows "0 %" all the time .. I also wonder how to get such progress bar into the "notebook"; my script gives a second YAD window.