!ディレクトリ内の元画像ファイルの拡張子が.jpgの場合
!for a in *.jpg; do convert -resize 120x90 $a `echo $a 
!| sed s/.jpg/_120.jpeg/g` ; done
!上記を一行で実行して、各画像ファイルのサムネイルを作成。
!ls *.jpg > lsjpg  で元画像だけのリストを作成
!ls -l -h *.jpg > lslh  で元画像のファイル情報のリストを作成
!lslhの中のいらない部分を箱選択で削除
!ls *.jpeg > lsjpeg でサムネイルのリストを作成
!cp lsjpg lshtml  でlsjpgをlshtmlにコピーして、viで開き
!冒頭に元画像ファイル数を書き込み、
!.jpgの拡張子を.htmlに置換する。
!
implicit real*8(a-h,o-z)
character a20h(1000)*20,a20je*20,a20j*20,html*20,a40l*40
nretu=6
open(1,file='lshtml')
read(1,*) n
open(2,file='lsjpeg')
open(3,file='lsjpg')
open(4,file='lslh')
open(7,file='index.html')
iretu=0
write(7,*) '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"'
write(7,*) '"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'
write(7,*) '<html xmlns="http://www.w3.org/1999/xhtml"'
write(7,*) 'xml:lang="ja" version="-//W3C//DTD XHTML 1.1//EN">'
write(7,*) '<head>'
write(7,*) '<meta http-equiv="Content-type" content="application/xhtml+xml;'
write(7,*) 'charset=utf-8" />'
write(7,*) '<meta http-equiv="Content-Style-Type" content="text/css" />'
write(7,*) '<link rel="stylesheet" href="./webhtml.css" '
write(7,*) 'type="text/css" />'
write(7,*) '<title>画像アルバム</title>'
write(7,*) '</head>'
write(7,*) '<body>'
write(7,*) '<table>'
do i=1,n
read(1,*) a20h(i)
end do
do i=1,n
if(iretu==0) then
write(7,*) '<tr>'
end if
iretu=iretu+1
read(2,*) a20je
read(4,'(a40)') a40l
write(7,*) '<td>'
write(7,*) ' <a href=\"',a20h(i),'"><img src="',a20je,'\" /></a><br />'
write(7,*) '  <p>'
write(7,*) '  <small>'
write(7,*) '   資料番号：',i,'<br />'
write(7,'(a40)') a40l
write(7,*) '  </small>'
write(7,*) '  </p>'
write(7,*) '</td>'
if(iretu==nretu) then
write(7,*) '</tr>'
iretu=0
end if
!
open(8,file=a20h(i))
read(3,*) a20j
write(8,*) '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"'
write(8,*) '"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'
write(8,*) '<html xmlns="http://www.w3.org/1999/xhtml"'
write(8,*) 'xml:lang="ja" version="-//W3C//DTD XHTML 1.1//EN">'
write(8,*) '<head>'
write(8,*) '<meta http-equiv="Content-type" content="application/xhtml+xml;'
write(8,*) 'charset=utf-8" />'
write(8,*) '<meta http-equiv="Content-Style-Type" content="text/css" />'
write(8,*) '<link rel="stylesheet" href="./webhtml.css" '
write(8,*) 'type="text/css" />'
write(8,*) '<title>',a20j,'</title>'
write(8,*) '</head>'
write(8,*) '<body>'
write(8,*) '<p>'
write(8,*) '<a href="./index.html">上</a><br />'
write(8,*) '<a href="',a20h(i-1),'">前</a>'
write(8,*) '<a href=\"',a20j,'"><img src="',a20j,'" width="600" \" /></a>'
write(8,*) '<a href="',a20h(i+1),'">次</a><br />'
write(8,'(a40)')    a40l
write(8,*) '</p>'
write(8,*) '<ul>'
write(8,*) ' <li>資料番号：',i,'</li>'
write(8,*) ' <li>画像種別：</li>'
write(8,*) ' <li>紙種：</li>'
write(8,*) ' <li>年代：</li>'
write(8,*) ' <li>キーワード：</li>'
write(8,*) '</ul>'
write(8,*) '</body>'
write(8,*) '</html>'
close(8)
!
end do
write(7,*) '</tr>'
write(7,*) '</table>'
write(7,*) '</body>'
write(7,*) '</html>'
close(1)
close(2)
close(3)
close(4)
close(7)
end
