Return to buildTexxml.pl CVS log | Up to [LON-CAPA] / doc / help / course_manual |
new perl script to build the course.manual.texxml file. Also can create a section.manual.texxml file from section of the manual. It is still up to the developer to move either of these files to /loncapa/doc/help as course.manual.texxml and run /loncapa/loncom/build/buildHelp.sh. Hopefully I can combine the functionality from buildHelp.sh into this script as the next step.
1: #!/usr/bin/perl 2: 3: if ($#ARGV != 0) { 4: print "Correct command usage: \n"; 5: print " perl buildTexxml.pl all\n"; 6: print "Or \n"; 7: print " perl buildTexxml.pl section\n"; 8: } 9: 10: $option = $ARGV[0]; 11: 12: @section = `cat section_order.txt`; 13: chomp @section; 14: 15: if($option eq 'all') { 16: foreach $section (@section) { 17: $section='sections/'.$section; 18: $section_list=$section_list.$section.' '; 19: } 20: `cat sections/start.texxml $section_list sections/end.texxml > course.manual.texxml`; 21: } 22: 23: if($option eq 'section') { 24: print "Choose from the following manual sections:\n"; 25: $num=0; 26: foreach $section (@section) { 27: print "$num - $section\n"; 28: $num++; 29: } 30: print "Enter a number 0 - $num for the section you want to print: "; 31: $selection=<STDIN>; 32: print "builing section...\n"; 33: `cat sections/start.texxml sections/$section[$selection] sections/end.texxml > section.manual.texxml`; 34: } 35: