[system] / trunk / xmlrpc / daemon / MathTranslators.pm Repository:
ViewVC logotype

Diff of /trunk/xmlrpc/daemon/MathTranslators.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 786 Revision 787
13use WeBWorK::PG::Translator; 13use WeBWorK::PG::Translator;
14use WeBWorK::PG::IO; 14use WeBWorK::PG::IO;
15use Benchmark; 15use Benchmark;
16use MIME::Base64 qw( encode_base64 decode_base64); 16use MIME::Base64 qw( encode_base64 decode_base64);
17 17
18my $debugOn =0; 18my $debugOn =1;
19my $PASSWORD = 'geometry'; 19my $PASSWORD = $Global::PASSWORD;
20 20
21 21
22my $TEMPDIRECTORY = '/ww/htdocs/tmp/daemon/'; 22my $TEMPDIRECTORY = $Global::TEMPDIRECTORY;
23my $TEMP_BASE_URL = 'http://webwork-db.math.rochester.edu/tmp/daemon/'; 23my $TEMP_BASE_URL = $Global::TEMP_BASE_URL;
24my $externalLatexPath = "/usr/local/bin/latex"; 24my $externalLatexPath = $Global::externalLatexPath;
25my $externalDvipsPath = "/usr/local/bin/dvips"; 25my $externalDvipsPath = $Global::externalDvipsPath;
26my $externalpdflatexPath = "/usr/local/bin/pdflatex"; 26my $externalpdflatexPath = $Global::externalpdflatexPath;
27my $externalGsPath = "/usr/local/bin/gs"; 27my $externalGsPath = $Global::externalGsPath;
28 28
29 29
30# variables formerly set in Global 30# variables formerly set in Global
31my $tmp_directory_permission = 0775; 31my $tmp_directory_permission = $Global::tmp_directory_permission;
32my $numericalGroupID='1005'; # group ID for webadmin 32my $numericalGroupID = $Global::numericalGroupID; # group ID for webadmin
33 33
34sub tex2pdf { 34sub tex2pdf {
35 35
36 my $rh = shift; 36 my $rh = shift;
37 local($|)=1; 37 local($|)=1;
87 # print "psCommandLine: $psCommandLine\n"; 87 # print "psCommandLine: $psCommandLine\n";
88 # print "pdfCommandLine: $pdfCommandLine\n"; 88 # print "pdfCommandLine: $pdfCommandLine\n";
89 #print "execute pdflatex", `$externalpdflatexPath $texFileBasePath.tex`, "\n"; 89 #print "execute pdflatex", `$externalpdflatexPath $texFileBasePath.tex`, "\n";
90 #print "done $externalpdflatexPath $texFileBasePath.tex\n"; 90 #print "done $externalpdflatexPath $texFileBasePath.tex\n";
91 # Change to the working directory and create the pdf files. 91 # Change to the working directory and create the pdf files.
92 my $wd = $TEMPDIRECTORY.join("/",@pathElements); 92 my $wd = $TEMPDIRECTORY.join("/",@pathElements); # working directory
93 #print "---cd $wd && $externalpdflatexPath $fileName.tex\n"; 93 # print "---cd $wd && $externalpdflatexPath $fileName.tex\n";
94 94
95 system "cd $wd && $externalpdflatexPath $fileName.tex"; 95 system "cd $wd && $externalpdflatexPath $fileName.tex";
96 chmod 0777, "$texFileBasePath.pdf"; 96 chmod 0777, "$texFileBasePath.pdf";
97 unless ($debugOn) { 97 unless ($debugOn) {
98 unlink("$texFileBasePath.tex","$texFileBasePath.log","$texFileBasePath.aux", 98 unlink("$texFileBasePath.tex","$texFileBasePath.log","$texFileBasePath.aux",

Legend:
Removed from v.786  
changed lines
  Added in v.787

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9