PageRenderTime 60ms CodeModel.GetById 56ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/tools/Ruby/lib/ruby/1.8/rdoc/generators/template/chm/chm.rb

http://github.com/agross/netopenspace
Ruby | 87 lines | 77 code | 8 blank | 2 comment | 0 complexity | 1a545032941f080180e3a74309b9b2d3 MD5 | raw file
 1module RDoc
 2module Page
 3
 4require "rdoc/generators/template/html/html"
 5
 6# This is a nasty little hack, but hhc doesn't support the <?xml
 7# tag, so...
 8
 9BODY.sub!(/<\?xml.*\?>/, '')
10SRC_PAGE.sub!(/<\?xml.*\?>/, '')
11
12HPP_FILE = %{
13[OPTIONS]
14Auto Index = Yes
15Compatibility=1.1 or later
16Compiled file=%opname%.chm
17Contents file=contents.hhc
18Full-text search=Yes
19Index file=index.hhk
20Language=0x409 English(United States)
21Title=%title%
22
23[FILES]
24START:all_html_files
25%html_file_name%
26END:all_html_files
27}
28
29CONTENTS = %{
30<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
31<HTML>
32<HEAD>
33<meta name="GENERATOR" content="Microsoft&reg; HTML Help Workshop 4.1">
34<!-- Sitemap 1.0 -->
35</HEAD><BODY>
36<OBJECT type="text/site properties">
37	<param name="Foreground" value="0x80">
38	<param name="Window Styles" value="0x800025">
39	<param name="ImageType" value="Folder">
40</OBJECT>
41<UL>
42START:contents
43	<LI> <OBJECT type="text/sitemap">
44		<param name="Name" value="%c_name%">
45		<param name="Local" value="%ref%">
46		</OBJECT>
47IF:methods
48<ul>
49START:methods
50	<LI> <OBJECT type="text/sitemap">
51		<param name="Name" value="%name%">
52		<param name="Local" value="%aref%">
53		</OBJECT>
54END:methods
55</ul>
56ENDIF:methods
57        </LI>
58END:contents
59</UL>
60</BODY></HTML>
61}
62
63
64CHM_INDEX  = %{
65<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
66<HTML>
67<HEAD>
68<meta name="GENERATOR" content="Microsoft&reg; HTML Help Workshop 4.1">
69<!-- Sitemap 1.0 -->
70</HEAD><BODY>
71<OBJECT type="text/site properties">
72	<param name="Foreground" value="0x80">
73	<param name="Window Styles" value="0x800025">
74	<param name="ImageType" value="Folder">
75</OBJECT>
76<UL>
77START:index
78	<LI> <OBJECT type="text/sitemap">
79		<param name="Name" value="%name%">
80		<param name="Local" value="%aref%">
81		</OBJECT>
82END:index
83</UL>
84</BODY></HTML>
85}
86end
87end