deplate 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (145) hide show
  1. data/AUTHORS.TXT +26 -0
  2. data/CHANGES.TXT +177 -0
  3. data/LICENSE.TXT +340 -0
  4. data/NEWS.TXT +29 -0
  5. data/README.TXT +86 -0
  6. data/TODO.TXT +202 -0
  7. data/VERSION.TXT +1 -0
  8. data/bin/deplate +3 -0
  9. data/bin/deplate.bat +2 -0
  10. data/etc/deplate.ini +361 -0
  11. data/lib/deplate.rb +31 -0
  12. data/lib/deplate/abstract-class.rb +30 -0
  13. data/lib/deplate/builtin.rb +11 -0
  14. data/lib/deplate/cache.rb +59 -0
  15. data/lib/deplate/commands.rb +693 -0
  16. data/lib/deplate/common.rb +335 -0
  17. data/lib/deplate/converter.rb +99 -0
  18. data/lib/deplate/core.rb +2705 -0
  19. data/lib/deplate/css/article.css +545 -0
  20. data/lib/deplate/css/deplate.css +699 -0
  21. data/lib/deplate/css/heading-navbar.css +29 -0
  22. data/lib/deplate/css/layout-deplate-print.css +540 -0
  23. data/lib/deplate/css/layout-deplate.css +764 -0
  24. data/lib/deplate/css/sans-serif.css +160 -0
  25. data/lib/deplate/css/serif-e.css +170 -0
  26. data/lib/deplate/css/serif-rel.css +121 -0
  27. data/lib/deplate/css/serif.css +190 -0
  28. data/lib/deplate/css/slides.css +11 -0
  29. data/lib/deplate/css/tabbar-left.css +91 -0
  30. data/lib/deplate/css/tabbar-right-ie.css +14 -0
  31. data/lib/deplate/css/tabbar-right.css +118 -0
  32. data/lib/deplate/css/tabbar-top.css +64 -0
  33. data/lib/deplate/css/tabbar.css +81 -0
  34. data/lib/deplate/css/text-sans-serif.css +154 -0
  35. data/lib/deplate/css/text-serif.css +175 -0
  36. data/lib/deplate/define.rb +439 -0
  37. data/lib/deplate/docbook.rb +738 -0
  38. data/lib/deplate/elements.rb +1355 -0
  39. data/lib/deplate/etc.rb +199 -0
  40. data/lib/deplate/external.rb +135 -0
  41. data/lib/deplate/fmt/dbk-article-4.1.2.rb +21 -0
  42. data/lib/deplate/fmt/dbk-article.rb +46 -0
  43. data/lib/deplate/fmt/dbk-book.rb +46 -0
  44. data/lib/deplate/fmt/dbk-ref.rb +105 -0
  45. data/lib/deplate/fmt/dbk-slides.rb +47 -0
  46. data/lib/deplate/fmt/dbk-snippet.rb +21 -0
  47. data/lib/deplate/fmt/html-snippet.rb +21 -0
  48. data/lib/deplate/fmt/html.rb +1696 -0
  49. data/lib/deplate/fmt/htmlsite.rb +419 -0
  50. data/lib/deplate/fmt/htmlslides.rb +21 -0
  51. data/lib/deplate/fmt/htmlwebsite.rb +70 -0
  52. data/lib/deplate/fmt/latex-snippet.rb +22 -0
  53. data/lib/deplate/fmt/latex.rb +1242 -0
  54. data/lib/deplate/fmt/php.rb +19 -0
  55. data/lib/deplate/fmt/phpsite.rb +19 -0
  56. data/lib/deplate/fmt/plain.rb +598 -0
  57. data/lib/deplate/fmt/template.rb +34 -0
  58. data/lib/deplate/fmt/xhtml10t.rb +41 -0
  59. data/lib/deplate/formatter-snippet.rb +17 -0
  60. data/lib/deplate/formatter.rb +1210 -0
  61. data/lib/deplate/input.rb +492 -0
  62. data/lib/deplate/input/deplate-headings.rb +48 -0
  63. data/lib/deplate/input/deplate-restricted.rb +70 -0
  64. data/lib/deplate/input/deplate.rb +28 -0
  65. data/lib/deplate/input/rdoc.rb +277 -0
  66. data/lib/deplate/input/template.rb +29 -0
  67. data/lib/deplate/lib/latex/highlight-extra.sty +15 -0
  68. data/lib/deplate/lib/latex/highlight-typical.sty +15 -0
  69. data/lib/deplate/lib/tabmenu.js +146 -0
  70. data/lib/deplate/locale/de.latin1 +708 -0
  71. data/lib/deplate/locale/ru.koi8-r +48 -0
  72. data/lib/deplate/locale/zh_cn.gb2312 +35 -0
  73. data/lib/deplate/macros.rb +639 -0
  74. data/lib/deplate/messages.rb +120 -0
  75. data/lib/deplate/metadata.rb +77 -0
  76. data/lib/deplate/metadata/marshal.rb +24 -0
  77. data/lib/deplate/metadata/xml.rb +42 -0
  78. data/lib/deplate/metadata/yaml.rb +26 -0
  79. data/lib/deplate/mod/anyword.rb +56 -0
  80. data/lib/deplate/mod/babelfish.rb +27 -0
  81. data/lib/deplate/mod/code-gvim.rb +52 -0
  82. data/lib/deplate/mod/code-highlight.rb +91 -0
  83. data/lib/deplate/mod/colored-log.rb +17 -0
  84. data/lib/deplate/mod/de.rb +19 -0
  85. data/lib/deplate/mod/en.rb +17 -0
  86. data/lib/deplate/mod/endnotes.rb +60 -0
  87. data/lib/deplate/mod/fr.rb +46 -0
  88. data/lib/deplate/mod/html-asciimath.rb +40 -0
  89. data/lib/deplate/mod/html-deplate-button.rb +15 -0
  90. data/lib/deplate/mod/html-headings-navbar.rb +39 -0
  91. data/lib/deplate/mod/html-obfuscate-email.rb +47 -0
  92. data/lib/deplate/mod/html-sidebar.rb +232 -0
  93. data/lib/deplate/mod/htmlslides-navbar-fh.rb +32 -0
  94. data/lib/deplate/mod/iconv.rb +35 -0
  95. data/lib/deplate/mod/imgurl.rb +30 -0
  96. data/lib/deplate/mod/inlatex-compound.rb +69 -0
  97. data/lib/deplate/mod/koma.rb +109 -0
  98. data/lib/deplate/mod/latex-emph-table-head.rb +38 -0
  99. data/lib/deplate/mod/latex-styles.rb +461 -0
  100. data/lib/deplate/mod/latex-verbatim-small.rb +29 -0
  101. data/lib/deplate/mod/makefile.rb +194 -0
  102. data/lib/deplate/mod/mark-external-urls.rb +38 -0
  103. data/lib/deplate/mod/markup-1-warn.rb +37 -0
  104. data/lib/deplate/mod/markup-1.rb +41 -0
  105. data/lib/deplate/mod/navbar-png.rb +33 -0
  106. data/lib/deplate/mod/noindent.rb +32 -0
  107. data/lib/deplate/mod/numpara.rb +40 -0
  108. data/lib/deplate/mod/particle-math.rb +34 -0
  109. data/lib/deplate/mod/php-extra.rb +44 -0
  110. data/lib/deplate/mod/pstoedit.rb +71 -0
  111. data/lib/deplate/mod/recode.rb +57 -0
  112. data/lib/deplate/mod/ru_koi8-r.rb +20 -0
  113. data/lib/deplate/mod/smiley.rb +50 -0
  114. data/lib/deplate/mod/soffice.rb +23 -0
  115. data/lib/deplate/mod/symbols-latin1.rb +58 -0
  116. data/lib/deplate/mod/symbols-od-utf-8.rb +16 -0
  117. data/lib/deplate/mod/symbols-plain.rb +58 -0
  118. data/lib/deplate/mod/symbols-sgml.rb +97 -0
  119. data/lib/deplate/mod/symbols-utf-8.rb +81 -0
  120. data/lib/deplate/mod/symbols-xml.rb +34 -0
  121. data/lib/deplate/mod/syntax-region-alt.rb +37 -0
  122. data/lib/deplate/mod/utf8.rb +49 -0
  123. data/lib/deplate/mod/validate-html.rb +35 -0
  124. data/lib/deplate/mod/xmlrpc.rb +233 -0
  125. data/lib/deplate/mod/zh-cn-autospace.rb +108 -0
  126. data/lib/deplate/mod/zh-cn.rb +59 -0
  127. data/lib/deplate/once-method.rb +44 -0
  128. data/lib/deplate/output.rb +249 -0
  129. data/lib/deplate/particles.rb +815 -0
  130. data/lib/deplate/regions.rb +1076 -0
  131. data/lib/deplate/structured.rb +763 -0
  132. data/lib/deplate/template.rb +430 -0
  133. data/lib/deplate/templates/html-doc.html +28 -0
  134. data/lib/deplate/templates/html-left-tabbar-js.html +37 -0
  135. data/lib/deplate/templates/html-left-tabbar.html +31 -0
  136. data/lib/deplate/templates/html-tabbar-right-table.html +43 -0
  137. data/lib/deplate/templates/html-tabbar-right.html +23 -0
  138. data/lib/deplate/templates/html-tabbar-top.html +43 -0
  139. data/lib/deplate/templates/html-tabbar.html +31 -0
  140. data/lib/deplate/wiki-markup.rb +117 -0
  141. data/lib/deplate/xml.rb +109 -0
  142. data/lib/deplate/zh-cn.rb +59 -0
  143. data/lib/ps2ppm.rb +239 -0
  144. data/man/man1/deplate.1 +692 -0
  145. metadata +210 -0
@@ -0,0 +1,48 @@
1
+ # deplate-restricted.rb
2
+ # @Author: Thomas Link (samul AT web.de)
3
+ # @Website: http://deplate.sf.net/
4
+ # @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
5
+ # @Created: 10-M�r-2005.
6
+ # @Last Change: 23-Okt-2005.
7
+ # @Revision: 0.36
8
+ #
9
+ # = Description
10
+ # = Usage
11
+ # = TODO
12
+ # = CHANGES
13
+
14
+ # require ''
15
+
16
+ # Deplate: Headings only
17
+ class Deplate::Input::DeplateHeadings < Deplate::Input
18
+ self.myname = 'deplate-headings'
19
+
20
+ def initialize(deplate, args)
21
+ args[:elements] ||= [
22
+ Deplate::Element::Heading,
23
+ ]
24
+ args[:commands] ||= []
25
+ args[:regions] ||= []
26
+ args[:onthefly_particles] ||= false
27
+ args[:paragraph_class] ||= Deplate::Element::Swallowed
28
+ args[:command_class] ||= nil
29
+ super
30
+ end
31
+ end
32
+
33
+ class Deplate::Element::Swallowed < Deplate::Element::Paragraph
34
+ @formatter = :format_paragraph
35
+ @rx = /^([ \t]*)(.*)[ \t]*$/
36
+ def finish
37
+ nil
38
+ end
39
+ end
40
+
41
+ class Deplate::Core
42
+ # declare_input_format(Deplate::Input::DeplateHeadings)
43
+
44
+ def input_initialize_deplate
45
+ @options.input_class = Deplate::Input::DeplateHeadings
46
+ end
47
+ end
48
+
@@ -0,0 +1,70 @@
1
+ # deplate-restricted.rb
2
+ # @Author: Thomas Link (samul AT web.de)
3
+ # @Website: http://deplate.sf.net/
4
+ # @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
5
+ # @Created: 10-M�r-2005.
6
+ # @Last Change: 23-Okt-2005.
7
+ # @Revision: 0.27
8
+ #
9
+ # = Description
10
+ # = Usage
11
+ # = TODO
12
+ # = CHANGES
13
+
14
+ # require ''
15
+
16
+ # Deplate: Standard input
17
+ class Deplate::Input::DeplateRestricted < Deplate::Input
18
+ self.myname = 'deplate-restricted'
19
+
20
+ def initialize(deplate, args)
21
+ remove_named_elements(args, :elements, Deplate::Element.elements, [])
22
+ remove_named_elements(args, :commands, Deplate::Command.commands, [
23
+ Deplate::Command::INC,
24
+ # Deplate::Command::IMG,
25
+ Deplate::Command::MODULE,
26
+ "WITH", "ABBREV",
27
+ ])
28
+ remove_named_elements(args, :regions, Deplate::Region.regions, [
29
+ Deplate::Regions::DefCommand,
30
+ Deplate::Regions::DefCommandN,
31
+ Deplate::Regions::DefRegion,
32
+ Deplate::Regions::DefRegionN,
33
+ Deplate::Regions::DefMacro,
34
+ Deplate::Regions::DefMacroN,
35
+ "Native", "Inlatex", "Img", "R", "Ruby",
36
+ ])
37
+ remove_named_elements(args, :macros, Deplate::Macro.macros, [
38
+ Deplate::Macro::Insert,
39
+ Deplate::Macro::Latex,
40
+ Deplate::Macro::Math,
41
+ Deplate::Macro::Ruby,
42
+ ])
43
+ # remove_named_elements(args, :particles, Deplate::Particle.particles, [])
44
+ # remove_named_elements(args, :particles_ext, Deplate::Particle.particles_ext, [])
45
+ args[:onthefly_particles] ||= false
46
+ super
47
+ end
48
+
49
+ def remove_named_elements(hash, field, default, elements)
50
+ arr = hash[field] ||= default
51
+ for e in elements
52
+ case e
53
+ when String
54
+ arr.delete(e)
55
+ else
56
+ i = arr.index(e)
57
+ arr.delete(e) if i
58
+ end
59
+ end
60
+ end
61
+ end
62
+
63
+ class Deplate::Core
64
+ # declare_input_format(Deplate::Input::DeplateRestricted)
65
+
66
+ def input_initialize_deplate
67
+ @options.input_class = Deplate::Input::DeplateRestricted
68
+ end
69
+ end
70
+
@@ -0,0 +1,28 @@
1
+ # deplate.rb
2
+ # @Author: Thomas Link (samul AT web.de)
3
+ # @Website: http://deplate.sf.net/
4
+ # @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
5
+ # @Created: 10-M�r-2005.
6
+ # @Last Change: 23-Okt-2005.
7
+ # @Revision: 0.15
8
+ #
9
+ # = Description
10
+ # = Usage
11
+ # = TODO
12
+ # = CHANGES
13
+
14
+ # require ''
15
+
16
+ # Deplate: Standard input
17
+ class Deplate::Input::VikiDeplate < Deplate::Input
18
+ self.myname = 'deplate'
19
+ end
20
+
21
+ class Deplate::Core
22
+ # declare_input_format(Deplate::Input::VikiDeplate)
23
+
24
+ def input_initialize_deplate
25
+ @options.input_class = Deplate::Input
26
+ end
27
+ end
28
+
@@ -0,0 +1,277 @@
1
+ # rdoc.rb
2
+ # @Author: Thomas Link (samul AT web.de)
3
+ # @Website: http://deplate.sf.net/
4
+ # @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
5
+ # @Created: 10-M�r-2005.
6
+ # @Last Change: 23-Okt-2005.
7
+ # @Revision: 0.251
8
+ #
9
+ # = Description
10
+ # Based upon Programming Ruby 2, 190ff
11
+ # = TODO
12
+ # The :main: and :callseq: directives are not implemented yet.
13
+
14
+ require 'deplate/wiki-markup'
15
+
16
+ # Deplate: rdoc input
17
+ class Deplate::Input::Rdoc < Deplate::Input
18
+ self.myname = 'rdoc'
19
+
20
+ def initialize(deplate, args)
21
+ args[:elements] ||= [
22
+ Deplate::Input::Rdoc::Directive,
23
+ Deplate::Input::Wiki::HeadingPrefixEqual,
24
+ Deplate::Input::Wiki::NumberedNotIndented,
25
+ Deplate::Input::Wiki::NumberedSharpNotIndented,
26
+ Deplate::Input::Wiki::ItemizeNotIndented,
27
+ Deplate::Input::Rdoc::Description4,
28
+ Deplate::Input::Rdoc::Description3,
29
+ Deplate::Input::Rdoc::Description2,
30
+ Deplate::Input::Rdoc::Description1,
31
+ Deplate::Input::Wiki::Break3Hyphens,
32
+ # Deplate::Input::Rdoc::NoProcess,
33
+ Deplate::Element::Whitespace,
34
+ ]
35
+ args[:particles] ||= [
36
+ Deplate::Particle::Escaped,
37
+ Deplate::Input::Rdoc::LabelledLink2,
38
+ Deplate::Input::Rdoc::LabelledLink,
39
+ Deplate::Input::Rdoc::ImgUrl,
40
+ Deplate::Input::Rdoc::Link,
41
+ Deplate::HyperLink::Url,
42
+ Deplate::Input::Wiki::ItalicWordSingleUnderscore,
43
+ Deplate::Input::Wiki::BoldWordSingleAsterisk,
44
+ Deplate::Input::Wiki::TypewriterWordSinglePlus,
45
+ Deplate::Input::Rdoc::Italic2,
46
+ Deplate::Input::Rdoc::Italic3,
47
+ Deplate::Input::Rdoc::Bold2,
48
+ Deplate::Input::Rdoc::Typewriter2,
49
+ ]
50
+ args[:particles_ext] ||= []
51
+ args[:commands] ||= {
52
+ 'include' => Deplate::Input::Rdoc::Include,
53
+ 'title' => Deplate::Input::Rdoc::Title,
54
+ 'maketitle' => Deplate::Command::MAKETITLE,
55
+ 'author' => Deplate::Command::AUTHOR,
56
+ }
57
+ args[:regions] ||= {}
58
+ args[:macros] ||= {}
59
+ args[:onthefly_particles] ||= false
60
+ args[:paragraph_class] ||= Deplate::Input::Rdoc::ParagraphOrVerbatim
61
+ args[:comment_class] ||= Deplate::Input::Rdoc::NoProcess
62
+ args[:command_class] ||= Deplate::Input::Rdoc::Directive
63
+ super
64
+ end
65
+ end
66
+
67
+ class Deplate::Input::Rdoc::ParagraphOrVerbatim < Deplate::Input::Wiki::ParagraphIndentedVerbatim
68
+ @rx = Deplate::Input::Wiki::ParagraphIndentedVerbatim.rx
69
+ def setup
70
+ super
71
+ @args['wrap'] ||= @deplate.variables['verbatimMargin'] || '72'
72
+ end
73
+ end
74
+
75
+ class Deplate::Input::Rdoc::Italic2 < Deplate::Particle::Emphasize
76
+ @rx = /^<em>(.+?)<\/em>/
77
+ end
78
+
79
+ class Deplate::Input::Rdoc::Italic3 < Deplate::Particle::Emphasize
80
+ @rx = /^<i>(.+?)<\/i>/
81
+ end
82
+
83
+ class Deplate::Input::Rdoc::Bold2 < Deplate::Particle::Emphasize
84
+ @rx = /^<b>(.+?)<\/b>/
85
+ end
86
+
87
+ class Deplate::Input::Rdoc::Typewriter2 < Deplate::Particle::Code
88
+ @rx = /^<tt>(.+?)<\/tt>/
89
+ end
90
+
91
+ class Deplate::Input::Rdoc::ImgUrl < Deplate::Input::Wiki::AbstractImgUrl
92
+ @rx = /^((file|https?|mailto|ftps?|www):(\S+?)\.(png|jpg|jpeg|gif|bmp))/
93
+ end
94
+
95
+ class Deplate::Input::Rdoc::Link < Deplate::HyperLink::Extended
96
+ @rx = /^link:([^+*&<>,.\t :!?#]+(\.\w+)?)(#([^+*?&<>\\\/,.:!?]+?))?/
97
+
98
+ def get_destination
99
+ @match[1]
100
+ end
101
+
102
+ def get_anchor
103
+ @match[4]
104
+ end
105
+
106
+ def get_name
107
+ nil
108
+ end
109
+
110
+ def get_modifier
111
+ nil
112
+ end
113
+ end
114
+
115
+ class Deplate::Input::Rdoc::LabelledLink < Deplate::HyperLink::Extended
116
+ @rx = /^(\S+)\[((file|https?|mailto|ftps?|www):.*?)(#(.+))?\]/
117
+
118
+ def get_destination
119
+ @match[2]
120
+ end
121
+
122
+ def get_anchor
123
+ @match[5]
124
+ end
125
+
126
+ def get_name
127
+ @match[1]
128
+ end
129
+
130
+ def get_modifier
131
+ nil
132
+ end
133
+ end
134
+
135
+ class Deplate::Input::Rdoc::LabelledLink2 < Deplate::HyperLink::Extended
136
+ @rx = /^\{(.+?)\}\[((file|https?|mailto|ftps?|www):.*?)(#(.+))?\]/
137
+
138
+ def get_destination
139
+ @match[2]
140
+ end
141
+
142
+ def get_anchor
143
+ @match[5]
144
+ end
145
+
146
+ def get_name
147
+ @match[1]
148
+ end
149
+
150
+ def get_modifier
151
+ nil
152
+ end
153
+ end
154
+
155
+ class Deplate::Input::Wiki::NumberedSharpNotIndented < Deplate::List::Numbered
156
+ include Deplate::Input::Wiki::ListExtra
157
+ @formatter = :format_list
158
+ @name = "Numbered"
159
+ @rx = /^(()(#)[ \t]+)(.+)$/
160
+ end
161
+
162
+ class Deplate::Input::Rdoc::Description1 < Deplate::Input::Wiki::AbstractDescription
163
+ @rx = /^(()(\S.*?)\b::[ \t]+)(.*)$/
164
+ @formatter = :format_list
165
+ @name = "Description"
166
+ end
167
+
168
+ class Deplate::Input::Rdoc::Description2 < Deplate::Input::Wiki::AbstractDescription
169
+ @rx = /^(()\+(.*?)\+::[ \t]+)(.*)$/
170
+ @formatter = :format_list
171
+ @name = "Description"
172
+ end
173
+
174
+ class Deplate::Input::Rdoc::Description3 < Deplate::Input::Wiki::AbstractDescription
175
+ @rx = /^(()\[(.+?)\][ \t]+)(.*)$/
176
+ @formatter = :format_list
177
+ @name = "Description"
178
+ end
179
+
180
+ class Deplate::Input::Rdoc::Description4 < Deplate::Input::Wiki::AbstractDescription
181
+ @rx = /^(()\[\+(.+?)\+\][ \t]+)(.*)$/
182
+ @formatter = :format_list
183
+ @name = "Description"
184
+ end
185
+
186
+ class Deplate::Input::Rdoc::NoProcess < Deplate::Element
187
+ @rx = /^(\s*)#--/
188
+
189
+ def setup
190
+ @endRx = /^(\s*)#\+\+/
191
+ end
192
+
193
+ def finish
194
+ end
195
+ end
196
+
197
+ class Deplate::Input::Rdoc::Directive < Deplate::Element::Command
198
+ @rx = /^\s*:(call-seq|include|title|main|stopdoc|startdoc|enddoc|maketitle|author):\s*(.*?)\s*$/
199
+ @enddoc = false
200
+
201
+ class << self
202
+ def is_volatile?(match)
203
+ case match[1]
204
+ when "title"
205
+ true
206
+ else
207
+ false
208
+ end
209
+ end
210
+
211
+ def accumulate(src, array, deplate, text, match)
212
+ cmd = match[1]
213
+ Deplate::Core.log(["New element", cmd, text], :debug)
214
+ begin
215
+ args = {}
216
+ text = match[2]
217
+ case cmd
218
+ when "stopdoc"
219
+ deplate.switches << true
220
+ when "startdoc"
221
+ unless @enddoc
222
+ deplate.switches.pop until deplate.switches.empty?
223
+ end
224
+ when "enddoc"
225
+ deplate.switches << true
226
+ @enddoc = true
227
+ else
228
+ if !deplate.switches.last
229
+ cc = deplate.input.commands[cmd]
230
+ if cc
231
+ cc.do_accumulate(src, array, deplate, text, match, args, cmd)
232
+ else
233
+ Deplate::Core.log(["Unknown or unhandled directive", cmd, match[0]], :error, src)
234
+ end
235
+ end
236
+ end
237
+ rescue Deplate::DontFormatException
238
+ Deplate::Core.log(["Dropping", match[0]], nil, src)
239
+ end
240
+ end
241
+ end
242
+ end
243
+
244
+ class Deplate::Input::Rdoc::Include < Deplate::Command
245
+ def self.accumulate(src, array, deplate, text, match, args, cmd)
246
+ Deplate::Core.log("%s: %s" % [cmd, text], :debug)
247
+ if File.exists?(text)
248
+ deplate.include_file(array, text)
249
+ else
250
+ Deplate::Core.log(["File not found", text], :error, src)
251
+ end
252
+ end
253
+ end
254
+
255
+ class Deplate::Input::Rdoc::Title < Deplate::Command
256
+ def self.accumulate(*args)
257
+ Deplate::Command::TITLE.accumulate(*args)
258
+ Deplate::Command::MAKETITLE.accumulate(*args)
259
+ end
260
+ end
261
+
262
+ # <+TBD+>
263
+ # :call-seq:
264
+ # lines. . .
265
+ # :main: name
266
+
267
+ class Deplate::Core
268
+ # declare_input_format(Deplate::Input::Rdoc)
269
+
270
+ def input_initialize_rdoc
271
+ unless @variables['inputFormat']
272
+ @options.input_class = Deplate::Input::Rdoc
273
+ @variables['inputFormat'] = Deplate::Input::Rdoc.myname
274
+ end
275
+ end
276
+ end
277
+
@@ -0,0 +1,29 @@
1
+ # template.rb
2
+ # @Author: Thomas Link (samul AT web.de)
3
+ # @Website: http://deplate.sf.net/
4
+ # @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
5
+ # @Created: 10-M�r-2005.
6
+ # @Last Change: 23-Okt-2005.
7
+ # @Revision: 0.119
8
+ #
9
+ # = Description
10
+ # = Usage
11
+ # = TODO
12
+ # = CHANGES
13
+
14
+ # require ''
15
+
16
+ class Deplate::Input::Template < Deplate::Input
17
+ def initialize(deplate, args)
18
+ args.update(Deplate::Template.deplate_options)
19
+ super
20
+ @deplate.options.keep_whitespace = true
21
+ end
22
+ end
23
+
24
+ class Deplate::Core
25
+ def input_initialize_deplate
26
+ @options.input_class = Deplate::Input::Template
27
+ end
28
+ end
29
+