summaryrefslogtreecommitdiff
path: root/scripts/context/ruby/newtexutil.rb
blob: b8cc99ccfcfed7fc0074893cd522dca92c61ac71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require 'base/logger'
require 'base/texutil'

logger = Logger.new('TeXUtil')

filename = ARGV[0] || 'tuitest'

if tu = TeXUtil::Converter.new(logger) and tu.loaded(filename) then
    tu.saved if tu.processed
end

# if     ($UnknownOptions   ) { ShowHelpInfo     } # not yet done
# elsif  ($ProcessReferences) { HandleReferences }
# elsif  ($ProcessFigures   ) { HandleFigures    }
# elsif  ($ProcessLogFile   ) { HandleLogFile    }
# elsif  ($PurgeFiles       ) { my $args = @ARGV.join(' ') ; system("texmfstart ctxtools --purge    $args") }
# elsif  ($PurgeAllFiles    ) { my $args = @ARGV.join(' ') ; system("texmfstart ctxtools --purgeall $args") }
# elsif  ($ProcessDocuments ) { my $args = @ARGV.join(' ') ; system("texmfstart ctxtools --document $args") }
# elsif  ($AnalyzeFile      ) { my $args = @ARGV.join(' ') ; system("texmfstart pdftools --analyze  $args") }
# elsif  ($FilterPages      ) { my $args = @ARGV.join(' ') ; system("texmfstart ctxtools --filter   $args") }
# elsif  ($ProcessHelp      ) { ShowHelpInfo     } # redundant
# else                        { ShowHelpInfo     }