webgen 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ChangeLog +224 -0
- data/Rakefile +2 -3
- data/TODO +18 -1
- data/VERSION +1 -1
- data/doc/plugin/clidesc.rb +35 -0
- data/doc/plugin/extension.rb +73 -0
- data/doc/src/about.page +2 -1
- data/doc/src/default.css +5 -1
- data/doc/src/default.template +9 -0
- data/doc/src/documentation/cli.page +12 -0
- data/doc/src/documentation/gettingstarted.page +150 -0
- data/doc/src/documentation/index.page +1 -19
- data/doc/src/documentation/{contenthandler → plugins/contenthandler}/html.page +0 -0
- data/doc/src/documentation/{contenthandler → plugins/contenthandler}/index.page +0 -0
- data/doc/src/documentation/{contenthandler → plugins/contenthandler}/markdown.page +0 -0
- data/doc/src/documentation/{contenthandler → plugins/contenthandler}/rdoc.page +0 -0
- data/doc/src/documentation/{contenthandler → plugins/contenthandler}/textile.page +0 -0
- data/doc/src/documentation/plugins/filehandler/backing.page +33 -0
- data/doc/src/documentation/{filehandler → plugins/filehandler}/copy.page +0 -0
- data/doc/src/documentation/{filehandler → plugins/filehandler}/directory.page +1 -2
- data/doc/src/documentation/{filehandler → plugins/filehandler}/galleryhandler.page +1 -1
- data/doc/src/documentation/{filehandler → plugins/filehandler}/index.page +0 -0
- data/doc/src/documentation/{filehandler → plugins/filehandler}/pagehandler.page +0 -0
- data/doc/src/documentation/{filehandler → plugins/filehandler}/template.page +0 -0
- data/doc/src/documentation/{gallerylayouter → plugins/gallerylayouter}/defaultlayouter.page +0 -0
- data/doc/src/documentation/{gallerylayouter → plugins/gallerylayouter}/index.page +0 -0
- data/doc/src/documentation/{htmlvalidator → plugins/htmlvalidator}/index.page +0 -0
- data/doc/src/documentation/{htmlvalidator → plugins/htmlvalidator}/xmllint.page +0 -0
- data/doc/src/documentation/plugins/index.page +20 -0
- data/doc/src/documentation/plugins/system/configuration.page +12 -0
- data/doc/src/documentation/plugins/system/index.page +7 -0
- data/doc/src/documentation/plugins/system/logging.page +13 -0
- data/doc/src/documentation/{tags → plugins/tags}/date.page +0 -0
- data/doc/src/documentation/{tags → plugins/tags}/executecommand.page +0 -1
- data/doc/src/documentation/{tags → plugins/tags}/includefile.page +0 -0
- data/doc/src/documentation/{tags → plugins/tags}/index.page +2 -2
- data/doc/src/documentation/{tags → plugins/tags}/langbar.de.page +0 -0
- data/doc/src/documentation/{tags → plugins/tags}/langbar.page +1 -1
- data/doc/src/documentation/{tags → plugins/tags}/menu.de.page +1 -0
- data/doc/src/documentation/{tags → plugins/tags}/menu.page +1 -1
- data/doc/src/documentation/{tags → plugins/tags}/meta.page +0 -0
- data/doc/src/documentation/{tags → plugins/tags}/multilang.de.page +0 -0
- data/doc/src/documentation/{tags → plugins/tags}/multilang.fr.page +0 -0
- data/doc/src/documentation/{tags → plugins/tags}/multilang.page +0 -0
- data/doc/src/documentation/{tags → plugins/tags}/navbar.page +0 -0
- data/doc/src/documentation/{tags → plugins/tags}/relocatable.page +0 -0
- data/doc/src/documentation/{tags → plugins/tags}/sitemap.page +0 -0
- data/doc/src/documentation/{tags → plugins/tags}/wikilink.page +0 -0
- data/doc/src/download.page +1 -0
- data/doc/src/index.page +26 -8
- data/doc/src/meta.info +13 -18
- data/install.rb +1 -1
- data/lib/webgen/configuration.rb +6 -153
- data/lib/webgen/logging.rb +38 -10
- data/lib/webgen/node.rb +26 -6
- data/lib/webgen/plugin.rb +168 -0
- data/lib/webgen/plugins/filehandler/backing.rb +11 -56
- data/lib/webgen/plugins/filehandler/directory.rb +8 -8
- data/lib/webgen/plugins/filehandler/filecopy.rb +2 -2
- data/lib/webgen/plugins/filehandler/filehandler.rb +5 -9
- data/lib/webgen/plugins/filehandler/page.rb +40 -79
- data/lib/webgen/plugins/filehandler/picturegallery.rb +3 -3
- data/lib/webgen/plugins/filehandler/template.rb +2 -2
- data/lib/webgen/plugins/tags/langbar.rb +2 -2
- data/lib/webgen/plugins/tags/menu.rb +5 -13
- data/lib/webgen/plugins/tags/relocatable.rb +2 -2
- data/lib/webgen/plugins/tags/sitemap.rb +2 -2
- data/lib/webgen/plugins/tags/wikilink.rb +4 -3
- data/lib/webgen/webgen.rb +262 -57
- data/testsite/src/default.template +1 -1
- data/testsite/src/images/bghack.png +0 -0
- data/testsite/src/meta.info +7 -10
- metadata +65 -44
- data/doc/extension.config +0 -60
- data/doc/src/documentation/extloader.page +0 -20
- data/doc/src/documentation/filehandler/backing.page +0 -16
- data/lib/webgen/plugins/extloader.rb +0 -88
|
Binary file
|
data/testsite/src/meta.info
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
home.html:
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
inMenu: true
|
|
1
|
+
home.de.html:
|
|
2
|
+
title: Neuer Titel
|
|
3
|
+
inMenu: true
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
home.html:
|
|
6
|
+
title: Home page menu
|
|
8
7
|
|
|
9
8
|
index.html:
|
|
10
|
-
|
|
11
|
-
directoryName: ''
|
|
9
|
+
directoryName: ''
|
|
12
10
|
|
|
13
11
|
noindex/noindex.html:
|
|
14
|
-
|
|
15
|
-
title: Title by backing file
|
|
12
|
+
title: Title by backing file
|
metadata
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
|
-
rubygems_version: 0.8.
|
|
2
|
+
rubygems_version: 0.8.6
|
|
3
3
|
specification_version: 1
|
|
4
4
|
name: webgen
|
|
5
5
|
version: !ruby/object:Gem::Version
|
|
6
|
-
version: 0.3.
|
|
7
|
-
date: 2005-
|
|
6
|
+
version: 0.3.3
|
|
7
|
+
date: 2005-04-21
|
|
8
8
|
summary: Webgen is a templated based static website generator.
|
|
9
9
|
require_paths:
|
|
10
10
|
- lib
|
|
@@ -41,8 +41,8 @@ files:
|
|
|
41
41
|
- lib/webgen/configuration.rb
|
|
42
42
|
- lib/webgen/node.rb
|
|
43
43
|
- lib/webgen/logging.rb
|
|
44
|
+
- lib/webgen/plugin.rb
|
|
44
45
|
- lib/webgen/webgen.rb
|
|
45
|
-
- lib/webgen/plugins/extloader.rb
|
|
46
46
|
- lib/webgen/plugins/treewalker.rb
|
|
47
47
|
- lib/webgen/plugins/tags/date.rb
|
|
48
48
|
- lib/webgen/plugins/tags/executecommand.rb
|
|
@@ -81,6 +81,7 @@ files:
|
|
|
81
81
|
- testsite/src/rdoc.page
|
|
82
82
|
- testsite/src/pictures
|
|
83
83
|
- testsite/src/index.page
|
|
84
|
+
- testsite/src/images
|
|
84
85
|
- testsite/src/default.template
|
|
85
86
|
- testsite/src/noindex
|
|
86
87
|
- testsite/src/meta.info
|
|
@@ -91,6 +92,7 @@ files:
|
|
|
91
92
|
- testsite/src/home.en.page
|
|
92
93
|
- testsite/src/redcloth.page
|
|
93
94
|
- testsite/src/pictures/index.page
|
|
95
|
+
- testsite/src/images/bghack.png
|
|
94
96
|
- testsite/src/noindex/noindex.page
|
|
95
97
|
- testsite/src/projects/05.project3.page
|
|
96
98
|
- testsite/src/projects/index.page
|
|
@@ -101,7 +103,7 @@ files:
|
|
|
101
103
|
- testsite/src/projects/subproj/index.page
|
|
102
104
|
- testsite/src/projects/subproj/project3.page
|
|
103
105
|
- doc/src
|
|
104
|
-
- doc/
|
|
106
|
+
- doc/plugin
|
|
105
107
|
- doc/src/designs
|
|
106
108
|
- doc/src/default.css
|
|
107
109
|
- doc/src/features.page
|
|
@@ -116,45 +118,54 @@ files:
|
|
|
116
118
|
- doc/src/designs/curdesign.png
|
|
117
119
|
- doc/src/designs/nostyle.png
|
|
118
120
|
- doc/src/designs/old.png
|
|
119
|
-
- doc/src/documentation/
|
|
120
|
-
- doc/src/documentation/contenthandler
|
|
121
|
-
- doc/src/documentation/extloader.page
|
|
121
|
+
- doc/src/documentation/gettingstarted.page
|
|
122
122
|
- doc/src/documentation/index.page
|
|
123
|
-
- doc/src/documentation/
|
|
124
|
-
- doc/src/documentation/
|
|
125
|
-
- doc/src/documentation/
|
|
126
|
-
- doc/src/documentation/
|
|
127
|
-
- doc/src/documentation/
|
|
128
|
-
- doc/src/documentation/
|
|
129
|
-
- doc/src/documentation/
|
|
130
|
-
- doc/src/documentation/
|
|
131
|
-
- doc/src/documentation/
|
|
132
|
-
- doc/src/documentation/tags/
|
|
133
|
-
- doc/src/documentation/tags/
|
|
134
|
-
- doc/src/documentation/tags/
|
|
135
|
-
- doc/src/documentation/tags/
|
|
136
|
-
- doc/src/documentation/tags/
|
|
137
|
-
- doc/src/documentation/tags/
|
|
138
|
-
- doc/src/documentation/tags/
|
|
139
|
-
- doc/src/documentation/tags/
|
|
140
|
-
- doc/src/documentation/tags/
|
|
141
|
-
- doc/src/documentation/tags/
|
|
142
|
-
- doc/src/documentation/
|
|
143
|
-
- doc/src/documentation/
|
|
144
|
-
- doc/src/documentation/
|
|
145
|
-
- doc/src/documentation/
|
|
146
|
-
- doc/src/documentation/
|
|
147
|
-
- doc/src/documentation/
|
|
148
|
-
- doc/src/documentation/
|
|
149
|
-
- doc/src/documentation/
|
|
150
|
-
- doc/src/documentation/
|
|
151
|
-
- doc/src/documentation/
|
|
152
|
-
- doc/src/documentation/
|
|
153
|
-
- doc/src/documentation/filehandler/
|
|
154
|
-
- doc/src/documentation/
|
|
155
|
-
- doc/src/documentation/
|
|
156
|
-
- doc/src/documentation/
|
|
157
|
-
- doc/src/documentation/
|
|
123
|
+
- doc/src/documentation/cli.page
|
|
124
|
+
- doc/src/documentation/plugins
|
|
125
|
+
- doc/src/documentation/plugins/tags
|
|
126
|
+
- doc/src/documentation/plugins/contenthandler
|
|
127
|
+
- doc/src/documentation/plugins/index.page
|
|
128
|
+
- doc/src/documentation/plugins/filehandler
|
|
129
|
+
- doc/src/documentation/plugins/system
|
|
130
|
+
- doc/src/documentation/plugins/gallerylayouter
|
|
131
|
+
- doc/src/documentation/plugins/htmlvalidator
|
|
132
|
+
- doc/src/documentation/plugins/tags/multilang.fr.page
|
|
133
|
+
- doc/src/documentation/plugins/tags/multilang.page
|
|
134
|
+
- doc/src/documentation/plugins/tags/menu.page
|
|
135
|
+
- doc/src/documentation/plugins/tags/relocatable.page
|
|
136
|
+
- doc/src/documentation/plugins/tags/date.page
|
|
137
|
+
- doc/src/documentation/plugins/tags/executecommand.page
|
|
138
|
+
- doc/src/documentation/plugins/tags/menu.de.page
|
|
139
|
+
- doc/src/documentation/plugins/tags/index.page
|
|
140
|
+
- doc/src/documentation/plugins/tags/langbar.page
|
|
141
|
+
- doc/src/documentation/plugins/tags/navbar.page
|
|
142
|
+
- doc/src/documentation/plugins/tags/sitemap.page
|
|
143
|
+
- doc/src/documentation/plugins/tags/multilang.de.page
|
|
144
|
+
- doc/src/documentation/plugins/tags/meta.page
|
|
145
|
+
- doc/src/documentation/plugins/tags/langbar.de.page
|
|
146
|
+
- doc/src/documentation/plugins/tags/wikilink.page
|
|
147
|
+
- doc/src/documentation/plugins/tags/includefile.page
|
|
148
|
+
- doc/src/documentation/plugins/contenthandler/html.page
|
|
149
|
+
- doc/src/documentation/plugins/contenthandler/rdoc.page
|
|
150
|
+
- doc/src/documentation/plugins/contenthandler/index.page
|
|
151
|
+
- doc/src/documentation/plugins/contenthandler/textile.page
|
|
152
|
+
- doc/src/documentation/plugins/contenthandler/markdown.page
|
|
153
|
+
- doc/src/documentation/plugins/filehandler/template.page
|
|
154
|
+
- doc/src/documentation/plugins/filehandler/directory.page
|
|
155
|
+
- doc/src/documentation/plugins/filehandler/galleryhandler.page
|
|
156
|
+
- doc/src/documentation/plugins/filehandler/index.page
|
|
157
|
+
- doc/src/documentation/plugins/filehandler/pagehandler.page
|
|
158
|
+
- doc/src/documentation/plugins/filehandler/copy.page
|
|
159
|
+
- doc/src/documentation/plugins/filehandler/backing.page
|
|
160
|
+
- doc/src/documentation/plugins/system/index.page
|
|
161
|
+
- doc/src/documentation/plugins/system/logging.page
|
|
162
|
+
- doc/src/documentation/plugins/system/configuration.page
|
|
163
|
+
- doc/src/documentation/plugins/gallerylayouter/defaultlayouter.page
|
|
164
|
+
- doc/src/documentation/plugins/gallerylayouter/index.page
|
|
165
|
+
- doc/src/documentation/plugins/htmlvalidator/index.page
|
|
166
|
+
- doc/src/documentation/plugins/htmlvalidator/xmllint.page
|
|
167
|
+
- doc/plugin/clidesc.rb
|
|
168
|
+
- doc/plugin/extension.rb
|
|
158
169
|
test_files: []
|
|
159
170
|
rdoc_options:
|
|
160
171
|
- "--line-numbers"
|
|
@@ -165,4 +176,14 @@ executables:
|
|
|
165
176
|
- webgen
|
|
166
177
|
extensions: []
|
|
167
178
|
requirements: []
|
|
168
|
-
dependencies:
|
|
179
|
+
dependencies:
|
|
180
|
+
- !ruby/object:Gem::Dependency
|
|
181
|
+
name: cmdparse
|
|
182
|
+
version_requirement:
|
|
183
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
|
184
|
+
requirements:
|
|
185
|
+
-
|
|
186
|
+
- ">="
|
|
187
|
+
- !ruby/object:Gem::Version
|
|
188
|
+
version: 1.0.1
|
|
189
|
+
version:
|
data/doc/extension.config
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# -*- ruby -*-
|
|
2
|
-
|
|
3
|
-
simple_tag( 'version' ) do |tag, node, refNode|
|
|
4
|
-
Webgen::VERSION.join( '.' )
|
|
5
|
-
end
|
|
6
|
-
|
|
7
|
-
class DescribeTag < Tags::DefaultTag
|
|
8
|
-
|
|
9
|
-
summary "Shows options for the specified file handler"
|
|
10
|
-
add_param 'plugin', nil, 'The plugin which should be described'
|
|
11
|
-
set_mandatory 'plugin', true
|
|
12
|
-
|
|
13
|
-
def initialize
|
|
14
|
-
super
|
|
15
|
-
@processOutput = false
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def process_tag( tag, node, refNode )
|
|
19
|
-
filehandler = get_param( 'plugin' )
|
|
20
|
-
self.logger.debug { "Describing tag #{filehandler}" }
|
|
21
|
-
plugin = Webgen::Plugin.config.find {|k,v| v.plugin == filehandler }
|
|
22
|
-
self.logger.warn { "Could not describe plugin '#{filehandler}' as it does not exist" } if plugin.nil?
|
|
23
|
-
( plugin.nil? ? '' : format_data( plugin[1] ) )
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def format_data( data )
|
|
27
|
-
s = "<table>"
|
|
28
|
-
row = lambda {|desc, value| "<tr style='vertical-align: top'><td style='font-weight:bold'>#{CGI::escapeHTML( desc )}:</td><td>#{value}</td></tr>" }
|
|
29
|
-
|
|
30
|
-
[['Plugin Name', 'plugin'], ['Summary', 'summary'], ['Description', 'description']].each do |desc, name|
|
|
31
|
-
s += row[desc, CGI::escapeHTML( data.send( name ) )] if eval( "data.#{name}" )
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
s += row['Dependencies', CGI::escapeHTML( data.dependencies.join( ', ') )] if data.dependencies
|
|
35
|
-
|
|
36
|
-
unless data.params.nil?
|
|
37
|
-
params = data.params.collect do |k,v|
|
|
38
|
-
"<span style='color: red'>#{v.name}</span>" + \
|
|
39
|
-
( v.mandatory.nil? \
|
|
40
|
-
? " = <span style='color: blue'>#{CGI::escapeHTML( v.default.inspect )}</span>" \
|
|
41
|
-
: " (=" + ( v.mandatoryDefault ? "default " : "" ) + "mandatory parameter)" ) + \
|
|
42
|
-
": #{CGI::escapeHTML( v.description )}"
|
|
43
|
-
end
|
|
44
|
-
s += row['Parameters', params.join( "<br />\n" )]
|
|
45
|
-
end
|
|
46
|
-
s += row['Name of tag', (data.tag == :default ? "Default tag" : data.tag)] if data.tag
|
|
47
|
-
s += row['File extension', data.extension.inspect.gsub(/"/, '')] if data.extension
|
|
48
|
-
|
|
49
|
-
# Show all registered handlers
|
|
50
|
-
data.table.keys.find_all {|k| /^registered_/ =~ k.to_s }.each do |k|
|
|
51
|
-
s += row[k.to_s.sub( /^registered_/, '' ).capitalize + " name", data.send( k )]
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
s += "</table>"
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
register_tag( 'describe', DescribeTag.new )
|
|
60
|
-
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Extension Loader
|
|
3
|
-
inMenu: true
|
|
4
|
-
---
|
|
5
|
-
h2. Information
|
|
6
|
-
|
|
7
|
-
<notextile>{describe: ExtensionLoader}</notextile>
|
|
8
|
-
|
|
9
|
-
h2. Description
|
|
10
|
-
|
|
11
|
-
The extension loader is used to load website specific extension plugins. Sometimes it is not useful
|
|
12
|
-
to extend webgen itself to support a new file format or another tag because the created plugins are
|
|
13
|
-
only useful for one specific site. So one can define these extensions in a configuration file and
|
|
14
|
-
then they are only available for the current website.
|
|
15
|
-
|
|
16
|
-
h2. The Configuration File
|
|
17
|
-
|
|
18
|
-
The configuration file for the extension loader has to be a file with valid Ruby code. Have a look
|
|
19
|
-
at the <a href="{relocatable: /api.page}">API</a> documentation to see which special methods you can
|
|
20
|
-
use in the configuration file.
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Backing File Handler
|
|
3
|
-
inMenu: true
|
|
4
|
-
---
|
|
5
|
-
h2. Information
|
|
6
|
-
|
|
7
|
-
<notextile>{describe: BackingFileHandler}</notextile>
|
|
8
|
-
|
|
9
|
-
h2. Description
|
|
10
|
-
|
|
11
|
-
The backing file handler is used to set meta information for other files. It can be used to set
|
|
12
|
-
additional meta information for page description files. However, its main purpose is to add virtual
|
|
13
|
-
pages and directories.
|
|
14
|
-
|
|
15
|
-
For more information have a look at the <a href="{relocatable: /api.page}">API
|
|
16
|
-
documentation</a>.
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
#--
|
|
3
|
-
#
|
|
4
|
-
# $Id: extloader.rb 203 2005-02-21 18:42:04Z thomas $
|
|
5
|
-
#
|
|
6
|
-
# webgen: template based static website generator
|
|
7
|
-
# Copyright (C) 2004 Thomas Leitner
|
|
8
|
-
#
|
|
9
|
-
# This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
|
10
|
-
# General Public License as published by the Free Software Foundation; either version 2 of the
|
|
11
|
-
# License, or (at your option) any later version.
|
|
12
|
-
#
|
|
13
|
-
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
|
|
14
|
-
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
15
|
-
# General Public License for more details.
|
|
16
|
-
#
|
|
17
|
-
# You should have received a copy of the GNU General Public License along with this program; if not,
|
|
18
|
-
# write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
19
|
-
#
|
|
20
|
-
#++
|
|
21
|
-
#
|
|
22
|
-
|
|
23
|
-
require 'webgen/plugins/tags/tags'
|
|
24
|
-
require 'webgen/plugins/filehandler/filehandler'
|
|
25
|
-
|
|
26
|
-
module Webgen
|
|
27
|
-
|
|
28
|
-
# Loads website specific extensions.
|
|
29
|
-
class ExtensionLoader < Plugin
|
|
30
|
-
|
|
31
|
-
summary "Loads extensions from a configuration file"
|
|
32
|
-
depends_on 'Tags', 'FileHandler'
|
|
33
|
-
add_param 'extconfig', 'extension.config', 'Configuration file for extensions'
|
|
34
|
-
|
|
35
|
-
def parse_config_file
|
|
36
|
-
file = get_param( 'extconfig' )
|
|
37
|
-
if File.exists?( file )
|
|
38
|
-
begin
|
|
39
|
-
instance_eval( File.read( file ), file )
|
|
40
|
-
rescue Exception => e
|
|
41
|
-
self.logger.error { "Error parsing file <#{file}>: #{e.message}" }
|
|
42
|
-
end
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
def simple_tag( name, processOutput = true, &block )
|
|
47
|
-
register_tag( name, Tags::SimpleTag.new( processOutput, block ) )
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
def register_tag( name, processor )
|
|
51
|
-
Plugin['Tags'].tags[name] = processor
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
def register_filehandler( name, processor )
|
|
55
|
-
Plugin['FileHandler'].extensions[name] = processor
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
module Tags
|
|
64
|
-
|
|
65
|
-
class SimpleTag < DefaultTag
|
|
66
|
-
|
|
67
|
-
VIRTUAL = true
|
|
68
|
-
|
|
69
|
-
summary "Used by the Tag Loader, provides the interface used by the Tags class"
|
|
70
|
-
|
|
71
|
-
def initialize( processOutput, block )
|
|
72
|
-
super()
|
|
73
|
-
@processOutput = processOutput
|
|
74
|
-
@block = block
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
def process_tag( tag, node, refNode )
|
|
78
|
-
begin
|
|
79
|
-
@block.call( tag, node, refNode )
|
|
80
|
-
rescue Exception => e
|
|
81
|
-
self.logger.error { "Error executing extension code: #{e.message}" }
|
|
82
|
-
return ''
|
|
83
|
-
end
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
end
|