deplate 0.8 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS.TXT +19 -16
- data/CHANGES.TXT +214 -248
- data/NEWS.TXT +47 -30
- data/README.TXT +0 -1
- data/TODO.TXT +93 -20
- data/VERSION.TXT +1 -1
- data/bin/deplate.exy +192 -0
- data/etc/deplate.ini +70 -9
- data/lib/action_view/helpers/deplate.rb +33 -33
- data/lib/deplate.rb +2 -2
- data/lib/deplate/bib.rb +72 -41
- data/lib/deplate/builtin.rb +1 -1
- data/lib/deplate/cache.rb +1 -1
- data/lib/deplate/commands.rb +161 -102
- data/lib/deplate/common.rb +93 -7
- data/lib/deplate/converter.rb +10 -4
- data/lib/deplate/core.rb +215 -108
- data/lib/deplate/counters.rb +23 -8
- data/lib/deplate/css/article.css +9 -5
- data/lib/deplate/css/deplate.css +37 -3
- data/lib/deplate/css/heading-navbar.css +1 -1
- data/lib/deplate/css/highstep.css +18 -0
- data/lib/deplate/css/htmldoc.css +43 -0
- data/lib/deplate/css/layout-deplate-print.css +1 -1
- data/lib/deplate/css/layout-deplate.css +1 -1
- data/lib/deplate/css/play.css +101 -0
- data/lib/deplate/css/sans-serif.css +1 -1
- data/lib/deplate/css/serif-e.css +1 -1
- data/lib/deplate/css/serif-rel.css +1 -1
- data/lib/deplate/css/serif.css +1 -1
- data/lib/deplate/css/slides.css +1 -1
- data/lib/deplate/css/styles.css +4 -0
- data/lib/deplate/css/tabbar-right.css +54 -8
- data/lib/deplate/css/tabbar-top.css +28 -9
- data/lib/deplate/css/text-sans-serif.css +1 -1
- data/lib/deplate/css/text-serif.css +1 -1
- data/lib/deplate/define.rb +71 -38
- data/lib/deplate/deplate-string.rb +3 -3
- data/lib/deplate/docbook.rb +9 -9
- data/lib/deplate/elements.rb +173 -84
- data/lib/deplate/etc.rb +6 -8
- data/lib/deplate/external.rb +9 -5
- data/lib/deplate/fmt/dbk-article-4.1.2.rb +4 -3
- data/lib/deplate/fmt/dbk-article.rb +9 -8
- data/lib/deplate/fmt/dbk-book.rb +4 -3
- data/lib/deplate/fmt/dbk-ref.rb +5 -4
- data/lib/deplate/fmt/dbk-slides.rb +4 -3
- data/lib/deplate/fmt/dbk-snippet.rb +4 -3
- data/lib/deplate/fmt/html-snippet.rb +1 -1
- data/lib/deplate/fmt/html.rb +186 -46
- data/lib/deplate/fmt/htmlsite.rb +19 -9
- data/lib/deplate/fmt/htmlslides.rb +1 -1
- data/lib/deplate/fmt/htmlwebsite.rb +1 -1
- data/lib/deplate/fmt/latex-dramatist.rb +175 -0
- data/lib/deplate/fmt/latex-snippet.rb +1 -1
- data/lib/deplate/fmt/latex.rb +132 -80
- data/lib/deplate/fmt/null.rb +1 -1
- data/lib/deplate/fmt/php.rb +1 -1
- data/lib/deplate/fmt/phpsite.rb +1 -1
- data/lib/deplate/fmt/plain.rb +16 -9
- data/lib/deplate/fmt/template.rb +1 -1
- data/lib/deplate/fmt/xhtml10t.rb +1 -1
- data/lib/deplate/formatter-snippet.rb +1 -1
- data/lib/deplate/formatter.rb +272 -81
- data/lib/deplate/guesslanguage.rb +57 -0
- data/lib/deplate/input.rb +205 -50
- data/lib/deplate/input/deplate-headings.rb +9 -11
- data/lib/deplate/input/deplate-restricted.rb +3 -23
- data/lib/deplate/input/deplate.rb +1 -1
- data/lib/deplate/input/play.rb +208 -0
- data/lib/deplate/input/rdoc.rb +37 -15
- data/lib/deplate/input/template.rb +6 -11
- data/lib/deplate/lib/Makefile.config +53 -4
- data/lib/deplate/lib/html/parbreak +3 -0
- data/lib/deplate/lib/javascript/StepwiseNextPage.js +8 -0
- data/lib/deplate/lib/javascript/StepwiseNextPage_confirm.js +8 -0
- data/lib/deplate/lib/latex/deplate.sty +36 -0
- data/lib/deplate/lib/latex/parbreak +6 -0
- data/lib/deplate/lib/php/page-comment.inc.php +5 -5
- data/lib/deplate/lib/plain/parbreak +6 -0
- data/lib/deplate/locale/de.latin1 +87 -15
- data/lib/deplate/locale/de.latin1_data +60 -0
- data/lib/deplate/locale/en.latin1_data +46 -0
- data/lib/deplate/locale/fr.latin1_data +74 -0
- data/lib/deplate/locale/ru.koi8-r_data +63 -0
- data/lib/deplate/locale/{zh_cn.gb2312 → zh_CN.GB2312} +0 -0
- data/lib/deplate/macros.rb +106 -32
- data/lib/deplate/messages.rb +22 -8
- data/lib/deplate/metadata.rb +1 -1
- data/lib/deplate/metadata/marshal.rb +1 -1
- data/lib/deplate/metadata/xml.rb +1 -1
- data/lib/deplate/metadata/yaml.rb +1 -1
- data/lib/deplate/mod/anyword.rb +4 -4
- data/lib/deplate/mod/babelfish.rb +1 -1
- data/lib/deplate/mod/code-gvim.rb +14 -8
- data/lib/deplate/mod/code-gvim71.rb +52 -0
- data/lib/deplate/mod/code-highlight.rb +35 -19
- data/lib/deplate/mod/colored-log.rb +1 -1
- data/lib/deplate/mod/endnotes.rb +1 -1
- data/lib/deplate/mod/guesslanguage.rb +75 -0
- data/lib/deplate/mod/html-asciimath.rb +1 -1
- data/lib/deplate/mod/html-deplate-button.rb +1 -1
- data/lib/deplate/mod/html-headings-navbar.rb +1 -1
- data/lib/deplate/mod/html-highstep.rb +43 -0
- data/lib/deplate/mod/html-jsmath.rb +1 -1
- data/lib/deplate/mod/html-obfuscate-email.rb +1 -1
- data/lib/deplate/mod/html-sidebar.rb +1 -1
- data/lib/deplate/mod/iconv.rb +1 -1
- data/lib/deplate/mod/imgurl.rb +1 -1
- data/lib/deplate/mod/inlatex-compound.rb +1 -1
- data/lib/deplate/mod/koma.rb +4 -4
- data/lib/deplate/mod/{de.rb → lang-de.rb} +1 -1
- data/lib/deplate/mod/{en.rb → lang-en.rb} +1 -1
- data/lib/deplate/mod/{ru_koi8-r.rb → lang-ru-koi8-r.rb} +1 -1
- data/lib/deplate/mod/lang-ru.rb +9 -0
- data/lib/deplate/mod/{zh-cn-autospace.rb → lang-zh_CN-autospace.rb} +3 -3
- data/lib/deplate/mod/{zh-cn.rb → lang-zh_CN.rb} +8 -8
- data/lib/deplate/mod/latex-emph-table-head.rb +1 -1
- data/lib/deplate/mod/latex-styles.rb +6 -6
- data/lib/deplate/mod/latex-verbatim-small.rb +1 -1
- data/lib/deplate/mod/linkmap.rb +128 -0
- data/lib/deplate/mod/makefile.rb +23 -22
- data/lib/deplate/mod/mark-external-urls.rb +13 -7
- data/lib/deplate/mod/markup-1-warn.rb +1 -1
- data/lib/deplate/mod/markup-1.rb +1 -1
- data/lib/deplate/mod/navbar-png.rb +5 -4
- data/lib/deplate/mod/noindent.rb +1 -1
- data/lib/deplate/mod/numpara.rb +1 -1
- data/lib/deplate/mod/particle-math.rb +1 -1
- data/lib/deplate/mod/php-extra.rb +1 -1
- data/lib/deplate/mod/pstoedit.rb +1 -1
- data/lib/deplate/mod/recode.rb +1 -1
- data/lib/deplate/mod/smart-dash.rb +1 -1
- data/lib/deplate/mod/smiley.rb +1 -1
- data/lib/deplate/mod/soffice.rb +1 -1
- data/lib/deplate/mod/symbols-latin1.rb +1 -1
- data/lib/deplate/mod/symbols-od-utf-8.rb +1 -1
- data/lib/deplate/mod/symbols-plain.rb +1 -1
- data/lib/deplate/mod/symbols-sgml.rb +1 -1
- data/lib/deplate/mod/symbols-utf-8.rb +1 -1
- data/lib/deplate/mod/symbols-xml.rb +1 -1
- data/lib/deplate/mod/syntax-region-alt.rb +1 -1
- data/lib/deplate/mod/utf8.rb +1 -1
- data/lib/deplate/mod/validate-html.rb +1 -1
- data/lib/deplate/mod/xmlrpc.rb +37 -36
- data/lib/deplate/nukumi2.rb +4 -4
- data/lib/deplate/once-method.rb +1 -1
- data/lib/deplate/output.rb +12 -4
- data/lib/deplate/particles.rb +52 -22
- data/lib/deplate/regions.rb +160 -90
- data/lib/deplate/skeletons.rb +4 -3
- data/lib/deplate/structured.rb +19 -13
- data/lib/deplate/template.rb +17 -9
- data/lib/deplate/templates/html-doc.html +8 -11
- data/lib/deplate/templates/html-tabbar-right.html +1 -1
- data/lib/deplate/templates/html-tabbar-top.html +3 -3
- data/lib/deplate/variables.rb +25 -9
- data/lib/deplate/wiki-markup.rb +14 -3
- data/lib/deplate/xml.rb +3 -4
- data/lib/deplate/{zh-cn.rb → zh_CN.rb} +16 -16
- data/man/man1/deplate.1 +80 -65
- metadata +72 -48
- data/lib/deplate/mod/fr.rb +0 -46
@@ -1,17 +1,12 @@
|
|
1
|
-
# deplate-
|
2
|
-
# @Author: Thomas Link (
|
1
|
+
# deplate-headings.rb
|
2
|
+
# @Author: Thomas Link (micathom AT gmail com)
|
3
3
|
# @Website: http://deplate.sf.net/
|
4
4
|
# @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
|
5
5
|
# @Created: 10-M�r-2005.
|
6
|
-
# @Last Change:
|
7
|
-
# @Revision: 0.
|
8
|
-
#
|
9
|
-
# = Description
|
10
|
-
# = Usage
|
11
|
-
# = TODO
|
12
|
-
# = CHANGES
|
6
|
+
# @Last Change: 2007-03-31.
|
7
|
+
# @Revision: 0.42
|
13
8
|
|
14
|
-
# require ''
|
9
|
+
# require 'deplate/input/deplate.rb'
|
15
10
|
|
16
11
|
# Deplate: Headings only
|
17
12
|
class Deplate::Input::DeplateHeadings < Deplate::Input
|
@@ -40,7 +35,10 @@ end
|
|
40
35
|
|
41
36
|
class Deplate::Core
|
42
37
|
def input_initialize_deplate
|
43
|
-
@
|
38
|
+
unless @variables['inputFormat']
|
39
|
+
@options.input_class = Deplate::Input::DeplateHeadings
|
40
|
+
@variables['inputFormat'] = @options.input_class.myname
|
41
|
+
end
|
44
42
|
end
|
45
43
|
end
|
46
44
|
|
@@ -1,17 +1,10 @@
|
|
1
1
|
# deplate-restricted.rb
|
2
|
-
# @Author: Thomas Link (
|
2
|
+
# @Author: Thomas Link (micathom AT gmail com)
|
3
3
|
# @Website: http://deplate.sf.net/
|
4
4
|
# @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
|
5
5
|
# @Created: 10-M�r-2005.
|
6
|
-
# @Last Change:
|
7
|
-
# @Revision: 0.
|
8
|
-
#
|
9
|
-
# = Description
|
10
|
-
# = Usage
|
11
|
-
# = TODO
|
12
|
-
# = CHANGES
|
13
|
-
|
14
|
-
# require ''
|
6
|
+
# @Last Change: 2007-03-31.
|
7
|
+
# @Revision: 0.44
|
15
8
|
|
16
9
|
# Deplate: Standard input
|
17
10
|
class Deplate::Input::DeplateRestricted < Deplate::Input
|
@@ -49,19 +42,6 @@ class Deplate::Input::DeplateRestricted < Deplate::Input
|
|
49
42
|
args[:onthefly_particles] ||= false
|
50
43
|
super
|
51
44
|
end
|
52
|
-
|
53
|
-
def remove_named_elements(hash, field, default, elements)
|
54
|
-
arr = hash[field] ||= default
|
55
|
-
for e in elements
|
56
|
-
case e
|
57
|
-
when String
|
58
|
-
arr.delete(e)
|
59
|
-
else
|
60
|
-
i = arr.index(e)
|
61
|
-
arr.delete(i) if i
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
65
45
|
|
66
46
|
def allow_set_variable(var)
|
67
47
|
var && var[0..0] == '_'
|
@@ -0,0 +1,208 @@
|
|
1
|
+
# play.rb
|
2
|
+
# @Author: Thomas Link (micathom AT gmail com)
|
3
|
+
# @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
|
4
|
+
# @Created: 2007-03-31.
|
5
|
+
# @Last Change: 2007-09-30.
|
6
|
+
# @Revision: 0.213
|
7
|
+
|
8
|
+
# require 'deplate/input/deplate.rb'
|
9
|
+
|
10
|
+
class Deplate::Input::Play < Deplate::Input
|
11
|
+
self.myname = 'play'
|
12
|
+
|
13
|
+
class << self
|
14
|
+
def styled_text(style, text)
|
15
|
+
"{text style=#{style}: #{Deplate::Core.escape_characters(text, :esc => '{}')}}"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def initialize(deplate, args)
|
20
|
+
# deplate.log('WARNING: The play class is in flux and will most likely change', :anyway)
|
21
|
+
args_fill_with_default(args)
|
22
|
+
args[:elements] = [
|
23
|
+
Deplate::Element::Command,
|
24
|
+
Deplate::Element::Region,
|
25
|
+
Deplate::Input::Play::Heading,
|
26
|
+
Deplate::Input::Play::Directive,
|
27
|
+
Deplate::Input::Play::Dialog,
|
28
|
+
Deplate::Element::Anchor,
|
29
|
+
Deplate::Element::Table,
|
30
|
+
Deplate::Element::Whitespace,
|
31
|
+
]
|
32
|
+
args[:commands] = Deplate::Command.commands
|
33
|
+
args[:commands]['ACT'] = Deplate::Input::Play::ACT
|
34
|
+
args[:commands]['CAST'] = Deplate::Input::Play::CAST
|
35
|
+
|
36
|
+
# args[:particles] = Deplate::Particle.particles + [
|
37
|
+
# Deplate::Input::Play::Direct,
|
38
|
+
# ]
|
39
|
+
args[:particles] = [
|
40
|
+
Deplate::Input::Play::Direct,
|
41
|
+
] + Deplate::Particle.particles
|
42
|
+
args[:paragraph_class] = Deplate::Input::Play::General
|
43
|
+
super
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
|
48
|
+
class Deplate::Input::Play::ACT < Deplate::Command
|
49
|
+
register_as 'ACT'
|
50
|
+
set_formatter :format_ACT
|
51
|
+
end
|
52
|
+
|
53
|
+
|
54
|
+
class Deplate::Input::Play::CAST < Deplate::Command
|
55
|
+
register_as 'CAST'
|
56
|
+
set_formatter :format_CAST
|
57
|
+
end
|
58
|
+
|
59
|
+
|
60
|
+
class Deplate::Input::Play::Direct < Deplate::SimpleParticle
|
61
|
+
set_rx(/^\[([^\[].*?)\]/)
|
62
|
+
# set_rx(/^\(\((.*?)\)\)/)
|
63
|
+
def_get :text, 1
|
64
|
+
set_formatter :format_direct
|
65
|
+
end
|
66
|
+
|
67
|
+
class Deplate::Input::Play::Heading < Deplate::Element::Heading
|
68
|
+
def finish
|
69
|
+
# m = /^((.*?)\s*::\s*)?(.*?)(\s*--\s*((I|E|X|INT.?|EXT.?|\<|\>)\/)?(.*?))\s*?$/.match(@accum.join)
|
70
|
+
m = /^((.*?)\s*::\s*)?(.*?)(\s*--\s*((.*?)\/)?(.*?))?\s*?$/.match(@accum.join)
|
71
|
+
# @args['plain'] = true
|
72
|
+
@args['playScene'] = m[2]
|
73
|
+
@args['playLocation'] = m[3]
|
74
|
+
@args['playIntExt'] = m[6] || ''
|
75
|
+
@args['playTime'] = m[7] || ''
|
76
|
+
# style = @deplate.variables['playStyle'] || @deplate.variables['class'] || 'hollywood'
|
77
|
+
style = @deplate.variables['playStyle'] || 'hollywood'
|
78
|
+
meth = "style_#{style}"
|
79
|
+
if respond_to?(meth)
|
80
|
+
@accum = send(meth)
|
81
|
+
else
|
82
|
+
log(['Unknown style', style], :error)
|
83
|
+
@accum = []
|
84
|
+
end
|
85
|
+
update_styles(['play'])
|
86
|
+
# self.html_args = [self.html_args, 'class="play"'].join(' ')
|
87
|
+
# "{text style=play-intext: #{}" unless .empty?
|
88
|
+
# "{text style=play-location: #{m[2].gsub(/[{}]/, '\\\\\\0')}}",
|
89
|
+
# "{text style=play-time: #{m[3].gsub(/[{}]/, '\\\\\\0')}}",
|
90
|
+
super
|
91
|
+
end
|
92
|
+
|
93
|
+
def style_hollywood
|
94
|
+
intext = get_intext()
|
95
|
+
accum = []
|
96
|
+
accum << Deplate::Input::Play.styled_text('play-intext', intext) unless intext.empty?
|
97
|
+
accum << Deplate::Input::Play.styled_text('play-location', @args['playLocation'])
|
98
|
+
if (time = get_time)
|
99
|
+
accum << Deplate::Input::Play.styled_text('play-flexsep', '--') <<
|
100
|
+
Deplate::Input::Play.styled_text('play-right', time)
|
101
|
+
end
|
102
|
+
[accum.join(' ')]
|
103
|
+
end
|
104
|
+
|
105
|
+
def style_austria
|
106
|
+
intext = get_intext('AUSSEN', 'INNEN')
|
107
|
+
accum = []
|
108
|
+
accum << Deplate::Input::Play.styled_text('play-location', @args['playLocation'])
|
109
|
+
accum << Deplate::Input::Play.styled_text('play-flexsep', '--')
|
110
|
+
accum << Deplate::Input::Play.styled_text('play-right', [intext, '/', get_time].join)
|
111
|
+
[accum.join(' ')]
|
112
|
+
end
|
113
|
+
|
114
|
+
def get_intext(ext='EXT.', int='INT.')
|
115
|
+
intext = @args['playIntExt']
|
116
|
+
case intext.upcase
|
117
|
+
when 'I', 'INT', 'INT.', '<'
|
118
|
+
intext = @deplate.variables['int'] || int
|
119
|
+
when 'X', 'E', 'EXT', 'EXT.', '>', 'A'
|
120
|
+
intext = @deplate.variables['ext'] || ext
|
121
|
+
# else
|
122
|
+
# intext = @deplate.variables['int'] || int
|
123
|
+
end
|
124
|
+
intext
|
125
|
+
end
|
126
|
+
|
127
|
+
def get_time
|
128
|
+
ti = @args['playTime']
|
129
|
+
case ti.upcase
|
130
|
+
when 'D', 'T'
|
131
|
+
@deplate.msg('Day')
|
132
|
+
when 'N'
|
133
|
+
@deplate.msg('Night')
|
134
|
+
when 'M'
|
135
|
+
@deplate.msg('Morning')
|
136
|
+
when 'A', 'E'
|
137
|
+
@deplate.msg('Evening')
|
138
|
+
else
|
139
|
+
ti
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
class Deplate::Input::Play::Directive < Deplate::List::Itemize
|
145
|
+
# register_element
|
146
|
+
set_rx(/^(([[:blank:]]+)([-+])[[:blank:]]+)(.+)$/)
|
147
|
+
self.listtype = 'Itemize'
|
148
|
+
|
149
|
+
def finish_elt
|
150
|
+
# update_styles(['play-directive'])
|
151
|
+
update_styles(['play'])
|
152
|
+
super
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
class Deplate::Input::Play::Dialog < Deplate::List::Description
|
157
|
+
# register_element
|
158
|
+
# set_rx(/^(([[:blank:]]+)(.+?)[[:blank:]]+::[[:blank:]])(.*)$/)
|
159
|
+
self.listtype = 'Description'
|
160
|
+
|
161
|
+
def finish_item
|
162
|
+
# sp_alias = @deplate.variables['alias']
|
163
|
+
# if sp_alias
|
164
|
+
# @item.sub!(/^[[:upper:]]+/) do |text|
|
165
|
+
# sp_alias[text] || text
|
166
|
+
# end
|
167
|
+
# end
|
168
|
+
# m = /^(.+?)\s+\[(.+?)\]$/.match(@item)
|
169
|
+
# p = nil
|
170
|
+
# if m
|
171
|
+
# p = m[1]
|
172
|
+
# acc = [Deplate::Input::Play.styled_text('play-character', m[1])]
|
173
|
+
# acc << '{nl}' << Deplate::Input::Play.styled_text('play-direct', m[2]) if m[2]
|
174
|
+
# @item = acc.join
|
175
|
+
# else
|
176
|
+
p = @item.match(/^\S+/)[0]
|
177
|
+
@item = Deplate::Input::Play.styled_text('play-character', @item)
|
178
|
+
@args['tag'] = [@args['tag'], "#{Deplate::Core.clean_name(p, :extra => ' ')}_speaks"].compact.join(',')
|
179
|
+
# update_styles('play')
|
180
|
+
super
|
181
|
+
end
|
182
|
+
|
183
|
+
def process
|
184
|
+
if @args['cast'] or tagged_as?('cast')
|
185
|
+
push_styles(['play-cast'])
|
186
|
+
else
|
187
|
+
push_styles(['play-dialog'])
|
188
|
+
end
|
189
|
+
super
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
class Deplate::Input::Play::General < Deplate::Element::Paragraph
|
194
|
+
def setup
|
195
|
+
update_styles(['play-description'])
|
196
|
+
super
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
class Deplate::Core
|
201
|
+
def input_initialize_play
|
202
|
+
# unless @variables['inputFormat']
|
203
|
+
@options.input_class = Deplate::Input::Play
|
204
|
+
# @variables['inputFormat'] = @options.input_class.myname
|
205
|
+
# end
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
data/lib/deplate/input/rdoc.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# rdoc.rb
|
2
|
-
# @Author: Thomas Link (
|
2
|
+
# @Author: Thomas Link (micathom AT gmail com)
|
3
3
|
# @Website: http://deplate.sf.net/
|
4
4
|
# @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
|
5
5
|
# @Created: 10-M�r-2005.
|
6
|
-
# @Last Change:
|
7
|
-
# @Revision: 0.
|
6
|
+
# @Last Change: 2007-09-01.
|
7
|
+
# @Revision: 0.298
|
8
8
|
#
|
9
9
|
# = Description
|
10
10
|
# Based upon Programming Ruby 2, 190ff
|
@@ -18,7 +18,7 @@ class Deplate::Input::Rdoc < Deplate::Input
|
|
18
18
|
self.myname = 'rdoc'
|
19
19
|
|
20
20
|
def initialize(deplate, args)
|
21
|
-
args[:elements]
|
21
|
+
args[:elements] = [
|
22
22
|
Deplate::Input::Rdoc::Directive,
|
23
23
|
Deplate::Input::Wiki::HeadingPrefixEqual,
|
24
24
|
Deplate::Input::Wiki::OrderedNotIndented,
|
@@ -32,8 +32,8 @@ class Deplate::Input::Rdoc < Deplate::Input
|
|
32
32
|
# Deplate::Input::Rdoc::NoProcess,
|
33
33
|
Deplate::Element::Whitespace,
|
34
34
|
]
|
35
|
-
args[:particles]
|
36
|
-
Deplate::Particle::Escaped,
|
35
|
+
args[:particles] = [
|
36
|
+
# Deplate::Particle::Escaped,
|
37
37
|
Deplate::Input::Rdoc::LabelledLink2,
|
38
38
|
Deplate::Input::Rdoc::LabelledLink,
|
39
39
|
Deplate::Input::Wiki::ImgUrl,
|
@@ -47,19 +47,19 @@ class Deplate::Input::Rdoc < Deplate::Input
|
|
47
47
|
Deplate::Input::Rdoc::Bold2,
|
48
48
|
Deplate::Input::Rdoc::Typewriter2,
|
49
49
|
]
|
50
|
-
args[:particles_ext]
|
51
|
-
args[:commands]
|
50
|
+
args[:particles_ext] = []
|
51
|
+
args[:commands] = {
|
52
52
|
'include' => Deplate::Input::Rdoc::Include,
|
53
53
|
'title' => Deplate::Input::Rdoc::Title,
|
54
54
|
'maketitle' => Deplate::Command::MAKETITLE,
|
55
55
|
'author' => Deplate::Command::AUTHOR,
|
56
56
|
}
|
57
|
-
args[:regions]
|
58
|
-
args[:macros]
|
59
|
-
args[:onthefly_particles]
|
60
|
-
args[:paragraph_class]
|
61
|
-
args[:comment_class]
|
62
|
-
args[:command_class]
|
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
63
|
super
|
64
64
|
end
|
65
65
|
end
|
@@ -70,6 +70,14 @@ class Deplate::Input::Rdoc::ParagraphOrVerbatim < Deplate::Input::Wiki::Paragrap
|
|
70
70
|
super
|
71
71
|
@args['wrap'] ||= @deplate.variables['verbatimMargin'] || '72'
|
72
72
|
end
|
73
|
+
|
74
|
+
def to_be_continued?(line, klass, match)
|
75
|
+
if klass == Deplate::Element::Whitespace
|
76
|
+
return line.size > 0
|
77
|
+
else
|
78
|
+
super
|
79
|
+
end
|
80
|
+
end
|
73
81
|
end
|
74
82
|
|
75
83
|
class Deplate::Input::Rdoc::Italic2 < Deplate::Particle::Emphasize
|
@@ -171,7 +179,21 @@ class Deplate::Input::Wiki::OrderedSharpNotIndented < Deplate::List::Ordered
|
|
171
179
|
end
|
172
180
|
|
173
181
|
class Deplate::Input::Rdoc::Description1 < Deplate::Input::Wiki::AbstractDescription
|
174
|
-
set_rx(/^(()(\S.*?)\b::[ \t]+)(.*)$/)
|
182
|
+
# set_rx(/^(()(\S.*?)\b::[ \t]+)(.*)$/)
|
183
|
+
set_rx(/^(()(\S.*?)::)(([ \t]+)(.*))?$/)
|
184
|
+
def_get :text, 6
|
185
|
+
|
186
|
+
def to_be_continued?(line, klass, match)
|
187
|
+
unless @accum.empty?
|
188
|
+
return false
|
189
|
+
end
|
190
|
+
case klass
|
191
|
+
when Deplate::Input::Rdoc::ParagraphOrVerbatim
|
192
|
+
return line =~ /^\s+/
|
193
|
+
else
|
194
|
+
super
|
195
|
+
end
|
196
|
+
end
|
175
197
|
end
|
176
198
|
|
177
199
|
class Deplate::Input::Rdoc::Description2 < Deplate::Input::Wiki::AbstractDescription
|
@@ -1,21 +1,16 @@
|
|
1
1
|
# template.rb
|
2
|
-
# @Author: Thomas Link (
|
2
|
+
# @Author: Thomas Link (micathom AT gmail com)
|
3
3
|
# @Website: http://deplate.sf.net/
|
4
4
|
# @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
|
5
5
|
# @Created: 10-M�r-2005.
|
6
|
-
# @Last Change:
|
7
|
-
# @Revision: 0.
|
8
|
-
#
|
9
|
-
# = Description
|
10
|
-
# = Usage
|
11
|
-
# = TODO
|
12
|
-
# = CHANGES
|
13
|
-
|
14
|
-
# require ''
|
6
|
+
# @Last Change: 2007-09-01.
|
7
|
+
# @Revision: 0.125
|
15
8
|
|
16
9
|
class Deplate::Input::Template < Deplate::Input
|
10
|
+
self.myname = 'template'
|
11
|
+
|
17
12
|
def initialize(deplate, args)
|
18
|
-
args.update(Deplate::Template.deplate_options)
|
13
|
+
args.update(Deplate::Template.deplate_options.dup)
|
19
14
|
super
|
20
15
|
@deplate.options.keep_whitespace = true
|
21
16
|
end
|
@@ -1,5 +1,5 @@
|
|
1
|
-
BASE={arg: base0}
|
2
1
|
FILE={arg: base}
|
2
|
+
BASE=$(basename ${FILE})
|
3
3
|
OTHER={arg: files}
|
4
4
|
|
5
5
|
DEPLATE=deplate
|
@@ -7,13 +7,14 @@ DEPLATE=deplate
|
|
7
7
|
DFLAGS={arg: options}
|
8
8
|
|
9
9
|
HTML_DIR=html
|
10
|
-
|
10
|
+
HTML_PLUS=
|
11
|
+
HTML_DFLAGS=$\{HTML_PLUS\} -d $\{HTML_DIR\} -f html
|
11
12
|
|
12
13
|
WEBSITE_DIR=website
|
13
|
-
WEBSITE_DFLAGS
|
14
|
+
WEBSITE_DFLAGS=$\{HTML_PLUS\} -d $\{WEBSITE_DIR\} -f htmlsite
|
14
15
|
|
15
16
|
PHP_DIR=php
|
16
|
-
PHP_DFLAGS
|
17
|
+
PHP_DFLAGS=$\{HTML_PLUS\} -d $\{PHP_DIR\} -f phpsite
|
17
18
|
|
18
19
|
TEX_DIR=tex
|
19
20
|
TEX_DFLAGS=-d $\{TEX_DIR\} -f latex
|
@@ -27,3 +28,51 @@ DBK_DFLAGS=-d $\{DBK_DIR\} -f dbk-article
|
|
27
28
|
REF_DIR=$\{DBK_DIR\}
|
28
29
|
REF_DFLAGS=-d $\{REF_DIR\} -f dbk-ref
|
29
30
|
|
31
|
+
LATEX_FLAGS=-interaction=nonstopmode
|
32
|
+
PDFLATEX_FLAGS=$\{LATEX_FLAGS\}
|
33
|
+
BIBTEX_FLAGS=
|
34
|
+
|
35
|
+
copy_images=if ls *.{jpg,jpeg,png,gif} 2> /dev/null; then cp -uv *.{jpg,jpeg,png,gif} $(1); fi
|
36
|
+
copy_css=if ls *.css 2> /dev/null; then cp -vu *.css $(1); fi
|
37
|
+
|
38
|
+
.PHONY: view show cleantex website makefile pdfclean dviclean \
|
39
|
+
dbk html pdf tex text man \
|
40
|
+
prepare_website prepare_html prepare_text prepare_php prepare_dbk \
|
41
|
+
prepare_tex prepare_ref prepare_dvi prepare_pdf
|
42
|
+
|
43
|
+
default: html
|
44
|
+
|
45
|
+
prepare_website:
|
46
|
+
mkdir -p $\{WEBSITE_DIR\}
|
47
|
+
$(call copy_images,"$\{WEBSITE_DIR\}")
|
48
|
+
$(call copy_css,"$\{WEBSITE_DIR\}")
|
49
|
+
|
50
|
+
prepare_html:
|
51
|
+
mkdir -p $\{HTML_DIR\}
|
52
|
+
$(call copy_images,"$\{HTML_DIR\}")
|
53
|
+
$(call copy_css,"$\{HTML_DIR\}")
|
54
|
+
|
55
|
+
prepare_text:
|
56
|
+
mkdir -p $\{TEXT_DIR\}
|
57
|
+
|
58
|
+
prepare_php:
|
59
|
+
mkdir -p $\{PHP_DIR\}
|
60
|
+
$(call copy_images,"$\{PHP_DIR\}")
|
61
|
+
$(call copy_css,"$\{PHP_DIR\}")
|
62
|
+
|
63
|
+
prepare_dbk:
|
64
|
+
mkdir -p $\{DBK_DIR\}cp -uv *.{jpg,jpeg,png,gif} $(1) || echo ... ignore errorcp -uv *.{jpg,jpeg,png,gif} $(1) || echo ... ignore error
|
65
|
+
$(call copy_images,"$\{DBG_DIR\}")
|
66
|
+
|
67
|
+
prepare_tex:
|
68
|
+
mkdir -p $\{TEX_DIR\}
|
69
|
+
$(call copy_images,"$\{TEX_DIR\}")
|
70
|
+
|
71
|
+
prepare_ref:
|
72
|
+
mkdir -p $\{REF_DIR\}
|
73
|
+
|
74
|
+
prepare_dvi:
|
75
|
+
|
76
|
+
prepare_pdf:
|
77
|
+
|
78
|
+
|