Class: TracWiki::Exporter
- Inherits:
-
Object
- Object
- TracWiki::Exporter
- Defined in:
- lib/trac-export-wiki.rb
Constant Summary collapse
- ELEMENTS_TO_REMOVE =
common HTML elements to remove (expressed with css selectors)
["html > head > link", "html > head > style", "html > head > script", "html > body > script", "div#banner", "div#header", "div#search", "div#ctxtnav", "div#metanav", "div#mainnav", "div.buttons", "div#altlinks", "div#footer", "h3#tkt-changes-hdr", "ul.tkt-chg-list"]
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
Instance Method Summary collapse
- #export ⇒ Object
-
#initialize(config = DefaultConfiguration) ⇒ Exporter
constructor
A new instance of Exporter.
Constructor Details
#initialize(config = DefaultConfiguration) ⇒ Exporter
Returns a new instance of Exporter.
97 98 99 |
# File 'lib/trac-export-wiki.rb', line 97 def initialize(config = DefaultConfiguration) self.config = config end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
95 96 97 |
# File 'lib/trac-export-wiki.rb', line 95 def config @config end |
Instance Method Details
#export ⇒ Object
101 102 103 104 |
# File 'lib/trac-export-wiki.rb', line 101 def export write_pages unless config.only_index generate_index unless config.no_index end |