/[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 2 - (hide annotations)
Sun Oct 3 21:10:47 1999 UTC (25 years, 1 month ago) by frodo
File MIME type: application/x-sh
File size: 731 byte(s)
Imported sources

1 frodo 2 #!/bin/sh
2    
3     function generate_links
4     {
5     local index_file name file lineno
6    
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     command="$command -e "\''s,&laquo;'"$name"'&raquo;,<A HREF="'"$file"\#"$name"'">'"$name"'</A>,g'\'
14     done
15     } < "$index_file"
16    
17     eval "$command"
18     }
19    
20     function generate_headers
21     {
22     local index_file name this_file
23    
24     index_file="$1"
25     this_file=`echo $2 | sed 's,.*/,,' | sed 's,\..*$,,'`
26    
27     name=`grep "^$this_file" "$index_file" | head -1 | sed s,'^[^ ]* [^ ]* ,,'`
28     sed 's,<HTML>,<HTML>\
29     <HEAD>\
30     <TITLE>'"$name"'</TITLE>\
31     </HEAD>,'
32     }
33    
34    
35     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