]> git.lizzy.rs Git - plan9front.git/blob - sys/man/1/mothra
71a7e1eca60b1d6c84ecd10afa652b4a4adaf65b
[plan9front.git] / sys / man / 1 / mothra
1 .TH MOTHRA 1
2 .SH NAME
3 mothra \- retrieve and display World-Wide Web files
4 .SH SYNOPSIS
5 .B mothra
6 [
7 .B -dv
8 ]
9 [
10 .B -m
11 .I mtpt
12 ] [
13 .I url
14 ]
15 .SH DESCRIPTION
16 .I Mothra
17 uses
18 .IR webfs (4)
19 to retrieve and display files from the World-Wide Web,
20 by name or through hypertext links.
21 Web names, called URLs, have a peculiar syntax:
22 .IP
23 .EX
24 http://netlib.att.com/netlib/1127/www/1127.html
25 http://akebono.stanford.edu:80/yahoo/
26 http://www.teleport.com/~crowell/
27 ftp://ftp.gmd.de/music/scores/harrington/Harrington.readme
28 .EE
29 .PP
30 The part up to the first colon gives the protocol for
31 retrieving the file.
32 .BR http: ,
33 Hyper-Text Transfer
34 Protocol, is the usual way of accessing web files.
35 .B ftp:
36 and
37 .B gopher:
38 are standard Internet services.
39 .PD
40 .PP
41 .B //
42 begins the Internet address of the server where the file resides.
43 The address may contain a colon and a TCP port
44 number, which overrides the 
45 default port number for the service.  Next comes a
46 file name.  Finally, the file name may be followed by
47 .B #
48 and a string giving a label within the file where the
49 display should begin.
50 .PP
51 .I Mothra
52 starts with the
53 .I url
54 given on the command line, defaulting to
55 the environment variable
56 .BR $url .
57 .PP
58 There are a number of options:
59 .TP
60 .B  -d
61 Debug mode.
62 .TP
63 .B -m
64 Specify the
65 .IR webfs (4)
66 mountpoint with
67 .BR -m
68 .I mtpt.
69 The default is
70 .B /mnt/web.
71 .TP
72 .B -v
73 Verbose mode. Causes HTML errors to appear in
74 .B $home/lib/mothra/mothra.err
75 .PP
76 The display contains the last message from
77 .I mothra,
78 a box where typed commands appear,
79 a scrollable list of previously visited files,
80 the title and URL of the current file,
81 and the scrollable text of the current file.
82 .PP
83 Button 1 selects and displays a file, either from the list
84 of previously visited pages or from a link (indicated
85 by underlined text or a boxed image) in the
86 current file.  Button 2 shows the URL of a file,
87 but does not retrieve or display it.
88 Button 3 pops up a menu of commands:
89 .TF alt\ display
90 .TP
91 .B alt display
92 Collapse or expand the navigation boxes at the top of the browser window.
93 .TP
94 .B moth mode
95 Enter moth mode and switch to the moth cursor. If the HREF of an image
96 link is different from the URL of the image itself, a link to the HREF will be
97 printed on the right side of the image. Clicking an image or link with mouse
98 button 1 saves a copy of the file in the current directory. Clicking mouse
99 button 2 sets the target as the current URL.
100 Clicking the
101 .B moth mode
102 menu option again exits moth mode.
103 .TP
104 .B snarf url
105 Copy the current URL to the snarf buffer.
106 .TP
107 .B paste
108 Paste the current snarf buffer at the current cursor position.
109 .TP
110 .B save hit
111 Save the current URL to the hit list.
112 .TP
113 .B hit list
114 Retrieve and display the hit list.
115 .TP
116 .B exit
117 Ask for confirmation and quit.
118 .PD
119 .PP
120 The typed commands are:
121 .TF typed\ commands
122 .TP
123 .B a
124 Collapse or expand the navigation boxes at the top of the browser window.
125 .TP
126 .BI g " url
127 Get the page with the given URL.
128 .TP
129 .BI j " n
130 Jump to page
131 .I n
132 from the list of previously viewed pages.
133 .TP
134 .BI m
135 Enter or exit moth mode.
136 .TP
137 .B r
138 Reload the current page.
139 .TP
140 .BI s " file
141 Save the current page in the given
142 .I file.
143 .TP
144 .BI W " file
145 Capture a screenshot of the entire browser window in the given
146 .I file.
147 .TP
148 .BI w " file
149 Capture a screenshot of the content area in the given
150 .I file.
151 .TP
152 .B q
153 Quit.
154 .PD
155 .PP
156 When
157 .I mothra
158 retrieves a file that is not an
159 HTML document (for example a GIF or JPEG
160 image), it will start up an appropriate viewer, for example
161 .B page
162 (see
163 .IR page (1))
164 for most image files.
165 .SH FILES
166 .B $home/lib/mothra/hit.html 
167 the hit list
168 .br
169 .B $home/lib/mothra/mothra.url
170 log of visited URLs
171 .br
172 .B $home/lib/mothra/mothra.err
173 log of error messages, including HTML syntax errors
174 .SH SOURCE
175 .B /sys/src/cmd/mothra
176 .SH "SEE ALSO"
177 .IR webfs (4)
178 .SH BUGS
179 Files are saved in the form received,
180 not in the form suggested by the name in an
181 .B s
182 command. A directory index saved from moth mode may be written in
183 the local directory as a file named
184 .B index.
185 Sanitizing remote file names for the local file system is imperfect.
186 .PP
187 .I Mothra
188 is distributed in a preliminary state; it has more than its share of bugs. Note that
189 .I mothra,
190 like the other Guardian Monsters, has no particular concern for humanity.