[RESOLVED]
[SOLUTION]
I'm an idiot and typed in the wrong filename for output.... solution is to check the filenames.
I'm hoping I'm missing something stupid.... i've written an insanely simple shell script to create an HTML page from a directory full of JPGs. It literally just displays the image and some parsed output from exiftool. I can see the output of the script looks fine from the terminal, yet when viewed in firefox, it doesn't render correctly. the <pre> tag is gone. I've tried using just <br> but to no avail either.
left is what firefox is reading, and on the right is a "cat test.html" from the server..... something isn't lining up.
[SOLUTION]
I'm an idiot and typed in the wrong filename for output.... solution is to check the filenames.
I'm hoping I'm missing something stupid.... i've written an insanely simple shell script to create an HTML page from a directory full of JPGs. It literally just displays the image and some parsed output from exiftool. I can see the output of the script looks fine from the terminal, yet when viewed in firefox, it doesn't render correctly. the <pre> tag is gone. I've tried using just <br> but to no avail either.
left is what firefox is reading, and on the right is a "cat test.html" from the server..... something isn't lining up.
Code:
#!/bin/bash
arra1=(*.JPG)
#echo ${#arra1[@]}
#echo ${arra1[@]}
echo '<html><head><title>Test</title></head><body>'
echo '<h1>Testing script</h1>'
for file in *.JPG
do convert $file -auto-orient -limit memory 4MB -limit map 8MB -resize 40% $file
done
chmod 705 *.JPG
for (( idx=${#arra1[@]}-1 ; idx>=0 ; idx-- ))
do
echo '<img src="'${arra1[idx]}'"><p>'
cameramodel=$(exiftool ${arra1[idx]} | grep "Camera Model Name")
lensid=$(exiftool ${arra1[idx]} | grep "Lens ID")
focallength=$(exiftool ${arra1[idx]} | grep "Focal Length")
aperture=$(exiftool ${arra1[idx]} | grep "Aperture")
shutterspeed=$(exiftool ${arra1[idx]} | grep "Shutter Speed")
isosetting=$(exiftool ${arra1[idx]} | grep "ISO Setting")
echo '<pre>'
echo "$cameramodel"
echo "$lensid"
echo "$focallength"
echo "$isosetting"
echo "$shutterspeed"
echo "$aperture<br>"
echo '</pre><hr>'
done
echo '</body>'
echo '</html>'
Last edited:
