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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 193 - (hide annotations)
Mon Feb 2 21:56:48 2004 UTC (20 years, 1 month ago) by frodo
File MIME type: application/x-sh
File size: 883 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 149 #! /bin/sh
2 frodo 2
3 frodo 149 generate_links()
4 frodo 2 {
5 frodo 149 #local index_file name file lineno
6 frodo 2
7     index_file="$1"
8    
9     command='sed '
10     {
11     while read file lineno name; do
12     command="$command -e "\''s,\['"$name"'\],<A NAME="'"$name"'">,g'\'
13 frodo 193 command="$command -e "\''s,&#xab;'"$name"'&#xbb;,<A HREF="'"$file"\#"$name"'">'"$name"'</A>,g'\'
14 frodo 2 done
15     } < "$index_file"
16    
17     eval "$command"
18     }
19    
20 frodo 149 generate_headers()
21 frodo 2 {
22 frodo 149 # local index_file name this_file
23 frodo 2
24 frodo 149 index_file_generate_headers="$1"
25     this_file_generate_headers=`echo $2 | sed 's,.*/,,' | sed 's,\..*$,,'`
26 frodo 2
27 frodo 149 name_generate_headers=`grep "^$this_file_generate_headers" "$index_file_generate_headers" | head -1 | sed s,'^[^ ]* [^ ]* ,,'`
28 frodo 193 sed -e 's,<TITLE>.*</TITLE>,<TITLE>'"$name_generate_headers"'</TITLE>,' \
29     -e 's,<title>.*</title>,<title>'"$name_generate_headers"'</title>,'
30 frodo 2 }
31    
32    
33     cat "$2" | generate_links "$1" | generate_headers "$1" "$2"

Properties

Name Value
svn:executable *

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