Class: Tex2Rtf
- Includes:
- FileUtils
- Defined in:
- lib/rakeutils/tex2rtf.rb
Overview
Implements programmatic control of the Tex2Rtf application.
Constant Summary collapse
- APP_PATH =
"M:/Tex2RTF/tex2rtf.exe"
Instance Method Summary collapse
-
#generateHelpFiles(srcPath, destPath) ⇒ Object
Generate help files.
-
#initialize ⇒ Tex2Rtf
constructor
Constructor.
Methods inherited from CLApp
#execute, #normalize_dir_path, #quote_all_values, #quote_value, #rubyize_path, #windowize_path
Constructor Details
Instance Method Details
#generateHelpFiles(srcPath, destPath) ⇒ Object
Generate help files.
- srcPath
-
Source file [.tex]. Path must use forward slashes.
- destPath
-
Destination file. Path must use forward slashes.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/rakeutils/tex2rtf.rb', line 34 def generateHelpFiles(srcPath, destPath) srcDir = File.dirname( File.( srcPath ) ) srcFile = File.basename( srcPath ) destPath = File.( destPath ) destDir = File.dirname( destPath ) puts "srcDir: #{srcDir}" puts "srcPath: #{srcPath}" puts "destDir: #{destDir}" puts "destPath: #{destPath}" if( !File.exists?( destDir ) ) # Create the destination dir if it doesn't exits. File.makedirs( destDir, true ) end cmdLine = "#{srcFile} #{destPath} -checkcurleybraces -checksyntax -html" curDir = pwd cd( srcDir ) begin execute( cmdLine, false ) rescue # do nothing end cd( curDir ) end |