File: java2html.1

package info (click to toggle)
java2html 0.9.2-2
  • links: PTS
  • area: main
  • in suites: sarge, woody
  • size: 232 kB
  • ctags: 55
  • sloc: ansic: 565; lex: 466; sh: 152; makefile: 140
file content (172 lines) | stat: -rw-r--r-- 4,180 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
.TH JAVA2HTML 1 \" -*- nroff -*-
.SH NAME
java2html \- generates highlighted html-files from Java or C++ source
.SH SYNOPSIS
.B java2html
[options] [filename...]
.br
.SH DESCRIPTION
This manual page
documents how to use
.BR java2html .
If no arguments are given on the command line of
.BR java2html ,
it 
reads from stdin and writes to stdout.

If invoked with filenames as arguments
.B java2html
will write it's output into new files. Names of output
files  are  generated by appending ".html" to the 
corresponding input filename. 
.SS Installing as a CGI program
.B java2html
can be installed as a CGI program and convert source files on the
fly. In order to set this up for apache the webmaster has to add the
two lines

.RS
 AddType text/x-java .java
 Action text/x-java /cgi-bin/java2html
.RE

to the webserver configuration file.
.B java2html
depends on the webserver properly setting environment variable
PATH_TRANSLATED to the pathname of the source file.
If 
.B java2html
has been compiled with option -DCOMPRESSION=1 then it will invoke
.B gzip
to compress the generated HTML before sending it to the requesting
browser. Of course
.B java2html
takes care to check if the browser accepts gzip encoding.
.SS OPTIONS
.TP
.I "--"
Interpret all following arguments on the command line as filenames.
This is useful, if you want to convert files beginning with a '-'.
.TP
.I "-b filename"
Insert the file 'filename' after converted data and before
HTML footer. See also the
.I "-s"
option.
.TP
.I "-c"
Turns off CGI-script detection and HTTP header generation.
This is needed to use
.B java2html
as a subcommand in another CGI script.
.TP
.I "-h filename"
Insert the file 'filename' after the HTML headers and before
the converted data. See also the
.I "-s"
option.
.TP
.I "-i"
Generate an index only. This will generate a list of references (HREF's)
to 
the labels that
.B java2html
creates for your source file. The references are created as list items 
(<li>) in an HTML list. Each line has the form
.br
<li><a href="#name">prototype()</a></li>
.br
so they can be used directly as an index list, or further parsed by
another script. 
.br
If you want the index at the top of the source file, you will need a 
wrapper script like this one:
\"
.br
  #! /bin/sh
.br
  echo "Content-type: text/html"
.br
  echo ""
.br
  echo "<html>"
.br
  echo "<head><title>$PATH_TRANSLATED</title>"
.br 
  echo "<meta name=\\"generator\\""
.br
  echo "content=\\"\`java2html -V\`\\">"
.br
  echo "</head>"
.br
  echo "<body>"
.br
  echo "<h1>Source of $PATH_TRANSLATED</h1>"
.br
  echo "<ul>Structures and functions"
.br
  cat $PATH_TRANSLATED | java2html -isc
.br
  echo "</ul>"
.br
  echo "<hr></hr>"
.br
  cat $PATH_TRANSLATED | java2html -sc
.br
  echo "</body></html>"
.br
  exit
.br
.TP
.I "-n"
Number lines and label them with 'line' followed by the line
number. Empty lines get no label, but the linecounter will count 
them nevertheless. With this feature you can refer to special
lines of code from other parts of the generated file 
or from external files with a line like this:

<A HREF="foo.java.html#line301">Go to line 301</A>
.TP
.I "-s"
With this option you can suppress the generation of HTML headers.
This is especially useful together with options
.I "-b file" 
and 
.IR "-h file" .
.TP
.I "-t title"
Set the title to 'title'. The default is the filename you 
converted or "stdin" if reading from stdin. This option is only
used if
.I "-s"
is not set.
.TP 
.I "-u"
Print usage information.
.TP
.I "-w width"
sets the WIDTH attribute for HTML tag <PRE>. If this option is not
used a default of 80 is assumed.  (Currently most browsers are
ignoring this attribute).
.TP
.I -V
reports the version number of
.BR java2html .
.SH EXIT STATUS
.B java2html
returns 0 on success, 1 if input files are not existing/readable, 2 if
output files are not creatable/writable, 3 if invoked with illegal
options and 4 if
.B gzip
cannot be invoked.
.SH AUTHORS
Florian Schintke <schintke@cs.tu-berlin.de>
.br
Martin Kammerhofer <mkamm@gmx.net> wrote the CGI feature.
.br
Rob Ewan <rob@ewan.com> wrote the indexing feature.
.SH SEE ALSO
.BR c2html (1),
.BR pas2html (1),
.BR perl2html (1).