Monday, January 3, 2011

tcl programming fun, making a html pic file from folder of jpg pics


$ cat p.tcl
#!/home/apps/tcl/bin/tclsh8.6
# build html file from pics
#me 28dec2010

set pics.html [open "pics.html" w+]
set pics [glob /home/g/etc/p/*.jpg]
foreach pic $pics {
puts ${pics.html} "< img src=\"$pic\" />"
}
close ${pics.html}

No comments: