Embedded Graphics in Bash Script

Moderator: Forum moderators

Post Reply
User avatar
glene77is
Posts: 61
Joined: Thu Aug 13, 2020 7:44 pm
Location: Univ of TN, Memphis,TN,USA
Has thanked: 49 times
Been thanked: 7 times
Contact:

Embedded Graphics in Bash Script

Post 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-Screensho-102.jpg
CDW-main-Screenshot-102.jpg (56.44 KiB) Viewed 378 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.

rc.z_CDW-sh-230206-1200.zip
Embedded Graphics example v.230206
(5.79 KiB) Downloaded 20 times

===

Last edited by glene77is on Tue Feb 07, 2023 12:53 am, edited 5 times in total.

*Just an old Apprentice caught Tinkering in the Master's WorkShop. *
Glen Ellis ( ͡° ͜ʖ ͡° ) K4KKQ , Electronic Engineering :ugeek:
Website: http://www.GeoCities.WS/glene77is :thumbup2:
Electrical Science , Memphis, TN

User avatar
MochiMoppel
Posts: 1222
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 20 times
Been thanked: 435 times

Re: Embedded Graphics in Bash Script

Post by MochiMoppel »

glene77is wrote: Fri Feb 03, 2023 8:14 pm

There 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?

User avatar
glene77is
Posts: 61
Joined: Thu Aug 13, 2020 7:44 pm
Location: Univ of TN, Memphis,TN,USA
Has thanked: 49 times
Been thanked: 7 times
Contact:

Re: Embedded Graphics in Bash Script

Post by glene77is »

rc.z_CDW-sh-230206-1200.zip
Embedded Graphics example, v.230206
(5.79 KiB) Downloaded 24 times

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.

===

Last edited by glene77is on Wed Feb 08, 2023 11:55 pm, edited 1 time in total.

*Just an old Apprentice caught Tinkering in the Master's WorkShop. *
Glen Ellis ( ͡° ͜ʖ ͡° ) K4KKQ , Electronic Engineering :ugeek:
Website: http://www.GeoCities.WS/glene77is :thumbup2:
Electrical Science , Memphis, TN

User avatar
MochiMoppel
Posts: 1222
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 20 times
Been thanked: 435 times

Re: Embedded Graphics in Bash Script

Post 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.

User avatar
glene77is
Posts: 61
Joined: Thu Aug 13, 2020 7:44 pm
Location: Univ of TN, Memphis,TN,USA
Has thanked: 49 times
Been thanked: 7 times
Contact:

Re: Embedded Graphics in Bash Script

Post 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. .

*Just an old Apprentice caught Tinkering in the Master's WorkShop. *
Glen Ellis ( ͡° ͜ʖ ͡° ) K4KKQ , Electronic Engineering :ugeek:
Website: http://www.GeoCities.WS/glene77is :thumbup2:
Electrical Science , Memphis, TN

Post Reply

Return to “Utilities”