/[public]/psiconv/trunk/formats/generate_xhtml.sh
ViewVC logotype

Annotation of /psiconv/trunk/formats/generate_xhtml.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 193 - (hide annotations)
Mon Feb 2 21:56:48 2004 UTC (20 years, 10 months ago) by frodo
File MIME type: application/x-sh
File size: 1474 byte(s)
(Frodo) Make the formats stuff work again

  * Amend the configure.in to select the right targets
  * Remove RTF support (it never worked anyway)
  * Update the links creation scripts

And in the psiconv program and library:
  * Some fixes to reduce compiler warnings
  * Emit tabs as spaces in the HTML4/XHTML generators

1 frodo 193 #! /bin/sh
2    
3     if test "$#" -lt 3 ; then
4     echo "Syntax: $0 psiconv_dir output_dir files..."
5     exit 1
6     fi
7    
8     if ! test -d "$1"/program/psiconv ; then
9     echo "First parameter should be base psiconv directory!"
10     exit 1
11     fi
12     basedir=`cd $1; pwd`
13    
14     if ! test -d "$2" ; then
15     echo "Output directory does not exist!"
16     exit 1
17     fi
18     outputdir=`cd $2; pwd`
19    
20    
21     shift
22     shift
23     echo "Generating xhtml docs..."
24    
25     libtool=$basedir/libtool
26     psiconv=$basedir/program/psiconv/psiconv
27     indexfile=$outputdir/index
28     tempdir=$outputdir/.temp
29     mkindex=$basedir/formats/index_html.sh
30     index=$tempdir/index
31     mkdef=$basedir/formats/html_links.sh
32    
33    
34     echo "Going to create the intermediate files..."
35     rm -rf $tempdir
36     mkdir $tempdir
37     for file in "$@"; do
38     echo "Going to process $file..."
39     outputfile=$tempdir/`basename $file|sed s,'.psi$','.html,'`
40     echo $libtool --mode=execute $psiconv -o $outputfile -Txhtml -eASCII $file
41     $libtool --mode=execute $psiconv -o $outputfile -Txhtml -eASCII $file
42     done
43    
44     echo "Going to produce the index..."
45     (
46     cd $tempdir
47     files=
48     for file in "$@"; do
49     files="$files `basename $file|sed s,'.psi$','.html',`"
50     done
51     $mkindex $index $files
52     )
53    
54     echo "Going to produce the final files..."
55     for file in "$@"; do
56     echo "Going to process $file..."
57     inputfile=$tempdir/`basename $file|sed s,'.psi$','.html,'`
58     outputfile=$outputdir/`basename $file|sed s,'.psi$','.html,'`
59     rm -f $outputfile
60     echo $mkdef $index $inputfile \> $outputfile
61     $mkdef $index $inputfile > $outputfile
62     done

Properties

Name Value
svn:executable *

frodo@frodo.looijaard.name
ViewVC Help
Powered by ViewVC 1.1.26