]> git.lizzy.rs Git - plan9front.git/blob - sys/man/1/mothra
d9f5c480c96a3a5880c5820ef94c1cde02818721
[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 -va
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://9front.org/
25 https://code.9front.org/hg/plan9front/
26 http://cat-v.org/
27 .EE
28 .PP
29 The part up to the first colon gives the protocol for
30 retrieving the file.
31 .BR http: ,
32 Hyper-Text Transfer
33 Protocol, is the usual way of accessing web files.
34 .PD
35 .PP
36 .B //
37 begins the Internet address of the server where the file resides.
38 The address may contain a colon and a TCP port
39 number, which overrides the 
40 default port number for the service.  Next comes a
41 file name.  Finally, the file name may be followed by
42 .B #
43 and a string giving a label within the file where the
44 display should begin.
45 .PP
46 .I Mothra
47 starts with the
48 .I url
49 given on the command line, defaulting to
50 the environment variable
51 .BR $url .
52 .PP
53 There are a number of options:
54 .TP
55 .B -a
56 Alt display. Starts in alt display mode, see menu
57 commands table below.
58 .TP
59 .B -k
60 Kill images. Don't fetch/display images.
61 .TP
62 .B -m
63 Specify the
64 .IR webfs (4)
65 mountpoint with
66 .BR -m
67 .I mtpt.
68 The default is
69 .B /mnt/web.
70 .TP
71 .B -v
72 Verbose mode. Causes HTML errors to be printed
73 on file-descriptor 2.
74 .PP
75 The display contains the last message from
76 .I mothra,
77 a box where typed commands appear,
78 a scrollable list of previously visited files,
79 the title and URL of the current file,
80 and the scrollable text of the current file.
81 .PP
82 Button 1 selects and displays a file, either from the list
83 of previously visited pages or from a link (indicated
84 by underlined text or a boxed image) in the
85 current file.  Button 2 shows the URL of a file,
86 but does not retrieve or display it.
87 Button 3 pops up a menu of commands:
88 .TF alt\ display
89 .TP
90 .B alt display
91 Collapse or expand the navigation boxes at the top of the browser window.
92 .TP
93 .B moth mode
94 Enter moth mode and switch to the moth cursor. If the HREF of an image
95 link is different from the URL of the image itself, a link to the HREF will be
96 printed on the right side of the image. Clicking an image or link with mouse
97 button 1 prompts the user to save a copy of the file in the current directory.
98 Clicking mouse button 2 sets the target as the current URL.
99 Clicking the
100 .B moth mode
101 menu option again exits moth mode.
102 .TP
103 .B snarf
104 Copy the current entry text or selected page text to snarf buffer.
105 If nothing is selected, the current URL is copied.
106 .TP
107 .B paste
108 Paste the snarf buffer to the current text entry.
109 .TP
110 .B search
111 Search for a regular expression in the current page.
112 .TP
113 .B save hit
114 Save the current URL to the hit list.
115 .TP
116 .B hit list
117 Retrieve and display the hit list.
118 .TP
119 .B exit
120 Ask for confirmation and quit.
121 .PD
122 .PP
123 The typed commands are:
124 .TF typed\ commands
125 .TP
126 .B a
127 Toggle alt display.
128 .TP
129 .BI g " url
130 Go to the page with the given URL.
131 .TP
132 .BI j " n
133 Jump to page
134 .I n
135 from the list of previously viewed pages.
136 .TP
137 .BI k
138 Toggle killing of images.
139 .TP
140 .BI m
141 Enter or exit moth mode.
142 .TP
143 .B r
144 Reload the current page.
145 .TP
146 .BI s " file
147 Save the current page in the given
148 .I file.
149 .TP
150 .BI W " file
151 Capture a screenshot of the entire browser window in the given
152 .I file.
153 .TP
154 .BI w " file
155 Capture a screenshot of the content area in the given
156 .I file.
157 .TP
158 .B q
159 Quit.
160 .PD
161 .PP
162 When
163 .I mothra
164 retrieves a direct link to a file that is not an
165 HTML document (for example a GIF or JPEG
166 image), it will start up an appropriate viewer, for example
167 .B page
168 (see
169 .IR page (1))
170 for most image files.
171 .SH FILES
172 .B $home/lib/mothra/hit.html 
173 the hit list
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.
191 .SH HISTORY
192 .I Mothra
193 first appeared in Plan 9 from Bell Labs (1995). It was later modified for inclusion in
194 9front (September, 2011).