Open amunhoz opened 3 years ago
so what the problem? every time you clicked on link you get the value of href attribute on stdout
The option --print-uri supose to give some feedback about links clicked in the html inside the dialog, correct? In my test, there was no feedback in stdout, only the execution of the url with the system browser (default behaviour without the option 'print-uri').
Version: 10.90 (GTK+ 3.22.30)
@amunhoz Example is working in Debian 11 libwebkit2gtk-4.0-dev: 2.32.3-1 yad: 10.90 (GTK+ 3.24.24)
Have you tried to do apply line buffering? stdbuf -oL -eL yad --width=400 --height=250 --html --uri=dialog.html --print-uri
@amunhoz He's a simple example save dialog.html
<!DOCTYPE html>
<html>
<head>
<body class="body">
<a href="one">One</a>
<a href="two">Two</a>
<a href="three">Three</a>
</body>
</html>
Then run
stdbuf -oL -eL yad --width=400 --height=250 --html --uri=dialog.html --print-uri | while read -r line;
do
case ${line##*/} in
one) yad --text="one" ;;
two) yad --text="two" ;;
three) yad --text="three" ;;
*) : ;;
esac
done
I'm trying to get stdout from a html uri with this command:
yad --width=400 --height=250 --html --uri=dialog.html --print-uri
The html is from this example: https://gist.github.com/Misko-2083/227b53efa059f888f27bf6135b03b86b
But i did not understand how to get the information.
Thanks in advance