File:  [LON-CAPA] / doc / help / course_manual / buildTexxml.pl
Revision 1.1: download - view: text, annotated - select for diffs
Fri Dec 1 23:41:33 2006 UTC (17 years, 5 months ago) by felicia
Branches: MAIN
CVS tags: HEAD
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.

#!/usr/bin/perl

if ($#ARGV != 0) {
  print "Correct command usage: \n";
  print "   perl buildTexxml.pl all\n";
  print "Or \n";
  print "   perl buildTexxml.pl section\n";
}

$option = $ARGV[0]; 

@section = `cat section_order.txt`;
chomp @section;

if($option eq 'all') {
  foreach $section (@section) {
    $section='sections/'.$section;
    $section_list=$section_list.$section.' ';
  }
  `cat sections/start.texxml $section_list sections/end.texxml > course.manual.texxml`;
}

if($option eq 'section') {
  print "Choose from the following manual sections:\n";
  $num=0;
  foreach $section (@section) {
    print "$num - $section\n";
    $num++;
  }
  print "Enter a number 0 - $num for the section you want to print: ";
  $selection=<STDIN>;
  print "builing section...\n";
  `cat sections/start.texxml sections/$section[$selection] sections/end.texxml > section.manual.texxml`; 
}


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>