Page 1 of 1
Embedded Graphics in Bash Script
Posted: Fri Feb 03, 2023 8:14 pm
by glene77is
Embedded Graphics in Bash Script
Attached is a little workup I did to begin exploring
the use of embedded graphics, xpm and svg
Version 1.01, 230205
with the intent of not having dependency on system graphic files.
seminal idea by Don570,
a very useful graphic code method
which releases any dependency on the current system having specific images.
All required images can be "Embedded" in the script.
This is a second work-up exploring and prototyping this method
of cutting the dependecies on system graphics,
by Embedding SVG and XPM graphics within the main BASH script.
I have already upgraded several of my projects to include this method.
I found there are minor differences in the XML code model I used
and the one Don570 used, so try your hand.
I have coded graphics for "JUG" and "APPLE" and "HASH" shapes, in four colors each.
Check the front screen picture below.
.
- CDW-main-Screensho-102.jpg
- CDW-main-Screenshot-102.jpg (56.44 KiB) Viewed 381 times
These prototyped Bash script examples appear stable,
within the XML written , based on Don570 XML code methods ,
and have worked well in my own XML methods used in other applications.
I have tested CDW program in uPupJJ, uPupBB, uPupFF, Slacko7.
I have 10 different running Puppy OS on my system, and test in all.
===
Re: Embedded Graphics in Bash Script
Posted: Sat Feb 04, 2023 2:58 am
by MochiMoppel
glene77is wrote: ↑Fri Feb 03, 2023 8:14 pmThere are quirks in both BASH and gtkdialog that come to the front ,
wherein some small functions interact (conflict).
.
. If the <button> has an <input file> ,
. then <action> 'EXIT:'QUIT' </action> fails .
Works perfectly. What quirk? And what has this to do with the input file?
Re: Embedded Graphics in Bash Script
Posted: Tue Feb 07, 2023 12:46 am
by glene77is
to MochiMoppel ,
Thanks for the comment.
I am happy that you do not experience a fault.
I changed Don570 original code to this:
<button>
<input file>"'/tmp/CDW-img-quit-rednnn.svg'"</input>
<label>"'Big-QUIT-Button'"</label>
<action>EXIT:''</action>
</button>
and simply let EXIT:"" fall-thru to end of program
where I trap with
if [ "${EXIT}" = "" ] ; then
The intent of this program was to demonstrate "Embedded Graphics"
which can eliminate dependency on the Puppy system graphics.
===
Re: Embedded Graphics in Bash Script
Posted: Tue Feb 07, 2023 5:33 am
by MochiMoppel
glene77is wrote: ↑Tue Feb 07, 2023 12:46 am
rc.z_CDW-sh-230206-1200.zip to MochiMoppel ,
Thanks for the comment.
I am happy that you do not experience a fault.
You still haven't explained what fault you experience.
Re: Embedded Graphics in Bash Script
Posted: Wed Feb 08, 2023 12:11 pm
by glene77is
to MochiMoppel
The intent of this program was to demonstrate "Embedded Graphics"
which can eliminate dependency on the Puppy system graphics.
I apologize for getting off-topic with any comments about Bash, as a language.
Analytic discourse on Bash, as a language, should be done in a "language" topic,
with properly developed examples. .