Class: Bookbinder::DitaCommandCreator
- Inherits:
-
Object
- Object
- Bookbinder::DitaCommandCreator
- Defined in:
- lib/bookbinder/dita_command_creator.rb
Constant Summary collapse
- MissingDitaOTFlagValue =
Class.new(RuntimeError)
Instance Method Summary collapse
- #convert_to_html_command(dita_section, dita_flags: nil, write_to: nil) ⇒ Object
-
#initialize(path_to_dita_ot_library) ⇒ DitaCommandCreator
constructor
A new instance of DitaCommandCreator.
Constructor Details
#initialize(path_to_dita_ot_library) ⇒ DitaCommandCreator
Returns a new instance of DitaCommandCreator.
5 6 7 |
# File 'lib/bookbinder/dita_command_creator.rb', line 5 def initialize(path_to_dita_ot_library) @path_to_dita_ot_library = path_to_dita_ot_library end |
Instance Method Details
#convert_to_html_command(dita_section, dita_flags: nil, write_to: nil) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/bookbinder/dita_command_creator.rb', line 9 def convert_to_html_command(dita_section, dita_flags: nil, write_to: nil) classpath = "#{path_to_dita_ot_library}/lib/xercesImpl.jar:" + "#{path_to_dita_ot_library}/lib/xml-apis.jar:" + "#{path_to_dita_ot_library}/lib/resolver.jar:" + "#{path_to_dita_ot_library}/lib/commons-codec-1.4.jar:" + "#{path_to_dita_ot_library}/lib/icu4j.jar:" + "#{path_to_dita_ot_library}/lib/saxon/saxon9-dom.jar:" + "#{path_to_dita_ot_library}/lib/saxon/saxon9.jar:target/classes:" + "#{path_to_dita_ot_library}:" + "#{path_to_dita_ot_library}/lib/:" + "#{path_to_dita_ot_library}/lib/dost.jar" "export CLASSPATH=#{classpath}; " + "ant -f #{path_to_dita_ot_library} " + unduplicated_flags( write_to: write_to, dita_flags: dita_flags, ditamap_path: dita_section.path_to_preprocessor_attribute('ditamap_location'), ditaval_path: dita_section.path_to_preprocessor_attribute('ditaval_location'), ) end |