Develop and Download Open Source Software

Browse Subversion Repository

Contents of /htdocs/makehhc.rb

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations) (download)
Thu Jul 28 09:05:52 2011 UTC (12 years, 9 months ago) by kaityo
File size: 871 byte(s)
First Commit
1 def modline(line)
2 if line=~/a href=(.*)>(.*)<\/a/
3 label = $1
4 name = $2
5 label.gsub!(/\"/,"")
6 puts "<li><OBJECT type=\"text/sitemap\"><param name=\"Name\" value=\"#{name}\">"
7 puts "<param name=\"Local\" value=\"copalpro.html#{label}\">"
8 puts "</OBJECT>"
9 elsif line=~/<li>(.*)/
10 name = $1
11 puts "<li><OBJECT type=\"text/sitemap\"><param name=\"Name\" value=\"#{name}\">"
12 puts "</OBJECT>"
13 else
14 print line
15 end
16 end
17
18 def putheader
19 print <<EOS
20 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
21 <HTML>
22 <HEAD>
23 <meta name="GENERATOR" content="Microsoft&reg; HTML Help Workshop 4.1">
24 <!-- Sitemap 1.0 -->
25 </HEAD><BODY>
26 EOS
27 end
28
29 def putfooter
30 puts "</BODY></HTML>"
31 end
32
33 putheader
34
35 flag = false
36 while line=gets
37 if line=~/label-1/
38 flag = true
39 next
40 elsif line=~/h2/
41 putfooter
42 exit
43 end
44 modline(line) if flag
45 end
46

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26