[juneau-lug] Opening X apps in the background.
- From: James Zuelow <e5z8652@xxxxxxxxxx>
- To: jlug <juneau-lug@xxxxxxxxxxxxx>
- Date: Wed, 28 Jul 2004 18:49:00 -0800
OK - remember my resizing script was inspired as a way to help me save time
putting images up on our (my family's, not the lug's) website. As a follow on,
I wrote a bash script to generate slideshow pages quickly & easily.
The process goes like this - get the digital images, resize them and name them
so they sort appropriately - image01.jpg, image02.jpg, etc., and then place
them in pwd/Resources, where pwd is a scratch directory. Run the following,
and slideshow type pages are quickly generated.
The script is below, and you can see some output by going to http://zuelow.net
- cringe at the "last updated" date on it, and then click on Phoenie's page and
see the photos of her birthday. These are not Pulitzer prize winning photos,
they're intended for Grandparents and other relatives, all of which are between
one and three thousand miles away. But I digress...
Anyway, here's my problem. As the script runs, it opens xslideshow to view the
image and then reads a string in for the photo caption in the web page. But
when it does this, xslideshow gets the focus and I have to click on the
terminal window to enter the comment. I don't want to click, I just want to
type, press enter, and see the next photo.
Any clues as to how I can get xslideshow to open without taking the focus away
from my terminal window?
Cheers,
James
----------------------------------
Script Below - watch out for wrapped lines.
----------------------------------
#!/bin/bash
##########################################################
# pagegen.sh
# HTML slideshow page generator with zuelow.net colorscheme
# Depends on images already scanned & resized, with images
# in jpeg format ,named to sort into a series and alone in the
# Resources dir.
#
# Move HTML & jpegs manually to site directory after creation & testing..
#
# James Zuelow // Juneau Linux Users Group
# $Log: pagegen.sh,v $
# Revision 1.1 2004/07/29 02:47:39 james
# Initial revision
#
#
##########################################################
i=0
echo -n "Enter series (filename) title: "
read PGtitle
echo -n "Enter descriptive (human) title: "
read PGhtitle
echo "Select the pageup target:"
select pageup in phoenpg.html calvinpg.html photopg.html
do
PGup=$pageup
break
done
h=`find ./Resources -name "*.jpg" | wc -l`
for PGimage in `find ./ -name "*.jpg" | cut -c 3-`
do
(( i = i + 1 ))
(( j = i - 1 ))
(( k = i + 1 ))
(( l = h - i ))
if [ $i -gt 1 ]
then
PvPG="<A HREF=\"${PGtitle}${j}.html\">Previous Photo</A> "
else
PvPG=""
fi
if [ $i -lt $h ]
then
NxPG=" <A HREF=\"${PGtitle}${k}.html\">Next Photo</A>"
RePG="<META HTTP-EQUIV=\"refresh\" CONTENT=\"30;
url=${PGtitle}${k}.html\">"
else
NxPG=""
RePG=""
fi
echo "<HTML>" > ${PGtitle}${i}.html
echo "<HEAD>" >> ${PGtitle}${i}.html
echo "<META NAME=\"GENERATOR\" CONTENT=\"Bash 2.05b scripting by James Zuelow,
Juneau Linux Users Group\">" >> ${PGtitle}${i}.html
echo "<TITLE>${PGhtitle} No.${i}</TITLE>" >> ${PGtitle}${i}.html
echo $RePG >> ${PGtitle}${i}.html
echo "</HEAD>" >> ${PGtitle}${i}.html
echo "<BODY TEXT=\"#ffffcc\" BGCOLOR=\"#000000\" LINK=\"#ffcc66\"
ALINK=\"#ff9900\" VLINK=\"#cc9933\">" >> ${PGtitle}${i}.html
echo "<P><CENTER>${PvPG}<A HREF=\"${PGup}\">Photo Page</A>${NxPG}</CENTER></P>"
>> ${PGtitle}${i}.html
echo "<P><CENTER><IMG SRC=\"${PGimage}\" ALT=\"${PGhtitle} No.${i}\"
ALIGN=\"BOTTOM\" BORDER=\"0\" NATURALSIZEFLAG=\"3\"></CENTER></P>" >>
${PGtitle}${i}.html
xslideshow ${PGimage} &
echo -n "Enter image description: "
read PGimageDESC
killall xslideshow
echo "<P><CENTER><FONT COLOR=\"#ffffe1\">${PGimageDESC}</FONT></CENTER>" >>
${PGtitle}${i}.html
echo "</BODY>" >> ${PGtitle}${i}.html
echo "</HTML>" >> ${PGtitle}${i}.html
done
exit 0
------------------------------------
This is the Juneau-LUG mailing list.
To unsubscribe, send an e-mail to juneau-lug-request@xxxxxxxxxxxxx with the
word unsubscribe in the subject header.
- Follow-Ups:
- [juneau-lug] Re: Opening X apps in the background.
- From: Jeremy C. Hansen
Other related posts:
- » [juneau-lug] Opening X apps in the background.
- » [juneau-lug] Re: Opening X apps in the background.
- [juneau-lug] Re: Opening X apps in the background.
- From: Jeremy C. Hansen