2011-09-05 01:55:47 +00:00
|
|
|
.TH MOTHRA 1
|
|
|
|
.SH NAME
|
2011-09-24 03:54:03 +00:00
|
|
|
mothra \- retrieve and display World-Wide Web files
|
2011-09-05 01:55:47 +00:00
|
|
|
.SH SYNOPSIS
|
|
|
|
.B mothra
|
|
|
|
[
|
2020-03-10 17:09:34 +00:00
|
|
|
.B -dvak
|
2011-10-02 02:30:12 +00:00
|
|
|
]
|
|
|
|
[
|
2011-09-05 01:55:47 +00:00
|
|
|
.B -m
|
|
|
|
.I mtpt
|
|
|
|
] [
|
|
|
|
.I url
|
|
|
|
]
|
|
|
|
.SH DESCRIPTION
|
|
|
|
.I Mothra
|
2011-10-02 02:30:12 +00:00
|
|
|
uses
|
|
|
|
.IR webfs (4)
|
|
|
|
to retrieve and display files from the World-Wide Web,
|
2011-09-05 01:55:47 +00:00
|
|
|
by name or through hypertext links.
|
|
|
|
Web names, called URLs, have a peculiar syntax:
|
|
|
|
.IP
|
|
|
|
.EX
|
2013-12-27 21:22:05 +00:00
|
|
|
http://9front.org/
|
2016-03-22 00:57:18 +00:00
|
|
|
https://code.9front.org/hg/plan9front/
|
2013-12-27 21:22:05 +00:00
|
|
|
http://cat-v.org/
|
2011-09-05 01:55:47 +00:00
|
|
|
.EE
|
|
|
|
.PP
|
|
|
|
The part up to the first colon gives the protocol for
|
|
|
|
retrieving the file.
|
|
|
|
.BR http: ,
|
|
|
|
Hyper-Text Transfer
|
|
|
|
Protocol, is the usual way of accessing web files.
|
|
|
|
.PD
|
|
|
|
.PP
|
|
|
|
.B //
|
|
|
|
begins the Internet address of the server where the file resides.
|
|
|
|
The address may contain a colon and a TCP port
|
|
|
|
number, which overrides the
|
|
|
|
default port number for the service. Next comes a
|
|
|
|
file name. Finally, the file name may be followed by
|
|
|
|
.B #
|
|
|
|
and a string giving a label within the file where the
|
|
|
|
display should begin.
|
|
|
|
.PP
|
|
|
|
.I Mothra
|
|
|
|
starts with the
|
|
|
|
.I url
|
|
|
|
given on the command line, defaulting to
|
|
|
|
the environment variable
|
|
|
|
.BR $url .
|
|
|
|
.PP
|
2011-09-24 03:54:03 +00:00
|
|
|
There are a number of options:
|
|
|
|
.TP
|
2013-07-18 09:18:31 +00:00
|
|
|
.B -a
|
|
|
|
Alt display. Starts in alt display mode, see menu
|
|
|
|
commands table below.
|
|
|
|
.TP
|
2018-06-27 17:20:28 +00:00
|
|
|
.B -k
|
|
|
|
Kill images. Don't fetch/display images.
|
2018-08-21 13:39:35 +00:00
|
|
|
.TP
|
2011-10-02 02:30:12 +00:00
|
|
|
.B -m
|
|
|
|
Specify the
|
|
|
|
.IR webfs (4)
|
|
|
|
mountpoint with
|
|
|
|
.BR -m
|
|
|
|
.I mtpt.
|
|
|
|
The default is
|
|
|
|
.B /mnt/web.
|
|
|
|
.TP
|
2011-09-24 03:54:03 +00:00
|
|
|
.B -v
|
2013-12-06 23:51:19 +00:00
|
|
|
Verbose mode. Causes HTML errors to be printed
|
|
|
|
on file-descriptor 2.
|
2020-03-10 17:09:34 +00:00
|
|
|
.TP
|
|
|
|
.B -d
|
|
|
|
Enables debug mode.
|
2011-09-24 03:54:03 +00:00
|
|
|
.PP
|
2011-09-05 01:55:47 +00:00
|
|
|
The display contains the last message from
|
|
|
|
.I mothra,
|
|
|
|
a box where typed commands appear,
|
|
|
|
a scrollable list of previously visited files,
|
|
|
|
the title and URL of the current file,
|
|
|
|
and the scrollable text of the current file.
|
|
|
|
.PP
|
|
|
|
Button 1 selects and displays a file, either from the list
|
|
|
|
of previously visited pages or from a link (indicated
|
|
|
|
by underlined text or a boxed image) in the
|
|
|
|
current file. Button 2 shows the URL of a file,
|
|
|
|
but does not retrieve or display it.
|
|
|
|
Button 3 pops up a menu of commands:
|
2011-09-23 03:45:47 +00:00
|
|
|
.TF alt\ display
|
|
|
|
.TP
|
|
|
|
.B alt display
|
|
|
|
Collapse or expand the navigation boxes at the top of the browser window.
|
|
|
|
.TP
|
2011-10-02 02:30:12 +00:00
|
|
|
.B moth mode
|
2011-10-14 20:06:29 +00:00
|
|
|
Enter moth mode and switch to the moth cursor. If the HREF of an image
|
|
|
|
link is different from the URL of the image itself, a link to the HREF will be
|
|
|
|
printed on the right side of the image. Clicking an image or link with mouse
|
2012-05-31 14:29:55 +00:00
|
|
|
button 1 prompts the user to save a copy of the file in the current directory.
|
|
|
|
Clicking mouse button 2 sets the target as the current URL.
|
2011-10-02 20:05:49 +00:00
|
|
|
Clicking the
|
|
|
|
.B moth mode
|
|
|
|
menu option again exits moth mode.
|
2011-10-02 02:30:12 +00:00
|
|
|
.TP
|
2012-09-23 18:14:47 +00:00
|
|
|
.B snarf
|
|
|
|
Copy the current entry text or selected page text to snarf buffer.
|
|
|
|
If nothing is selected, the current URL is copied.
|
2011-09-05 01:55:47 +00:00
|
|
|
.TP
|
2011-09-23 03:45:47 +00:00
|
|
|
.B paste
|
2012-09-23 18:14:47 +00:00
|
|
|
Paste the snarf buffer to the current text entry.
|
2011-09-05 01:55:47 +00:00
|
|
|
.TP
|
2020-04-22 01:14:26 +00:00
|
|
|
.B plumb
|
|
|
|
Plumb the current URL.
|
|
|
|
.TP
|
2013-12-28 20:48:53 +00:00
|
|
|
.B search
|
|
|
|
Search for a regular expression in the current page.
|
|
|
|
.TP
|
2011-09-23 03:45:47 +00:00
|
|
|
.B save hit
|
|
|
|
Save the current URL to the hit list.
|
2011-09-05 01:55:47 +00:00
|
|
|
.TP
|
2011-09-23 03:45:47 +00:00
|
|
|
.B hit list
|
|
|
|
Retrieve and display the hit list.
|
2011-09-05 01:55:47 +00:00
|
|
|
.TP
|
|
|
|
.B exit
|
|
|
|
Ask for confirmation and quit.
|
|
|
|
.PD
|
|
|
|
.PP
|
|
|
|
The typed commands are:
|
2011-09-23 16:04:08 +00:00
|
|
|
.TF typed\ commands
|
|
|
|
.TP
|
|
|
|
.B a
|
2012-05-31 14:29:55 +00:00
|
|
|
Toggle alt display.
|
2011-09-05 01:55:47 +00:00
|
|
|
.TP
|
2021-03-02 07:21:56 +00:00
|
|
|
.BI d " text
|
|
|
|
Search for the given
|
|
|
|
.I text
|
2021-03-03 03:56:58 +00:00
|
|
|
at DuckDuckGo.
|
2021-03-02 07:21:56 +00:00
|
|
|
.TP
|
2011-09-05 01:55:47 +00:00
|
|
|
.BI g " url
|
2012-05-31 14:29:55 +00:00
|
|
|
Go to the page with the given URL.
|
2011-09-05 01:55:47 +00:00
|
|
|
.TP
|
2011-09-24 03:54:03 +00:00
|
|
|
.BI j " n
|
|
|
|
Jump to page
|
|
|
|
.I n
|
|
|
|
from the list of previously viewed pages.
|
|
|
|
.TP
|
2012-06-06 21:49:29 +00:00
|
|
|
.BI k
|
2018-06-27 17:20:28 +00:00
|
|
|
Toggle killing of images.
|
2012-06-06 21:49:29 +00:00
|
|
|
.TP
|
2012-03-22 18:05:47 +00:00
|
|
|
.BI m
|
|
|
|
Enter or exit moth mode.
|
|
|
|
.TP
|
2011-09-23 03:45:47 +00:00
|
|
|
.B r
|
|
|
|
Reload the current page.
|
|
|
|
.TP
|
2011-09-05 01:55:47 +00:00
|
|
|
.BI s " file
|
2011-09-23 03:45:47 +00:00
|
|
|
Save the current page in the given
|
2011-09-05 01:55:47 +00:00
|
|
|
.I file.
|
|
|
|
.TP
|
2011-09-23 03:45:47 +00:00
|
|
|
.BI W " file
|
|
|
|
Capture a screenshot of the entire browser window in the given
|
|
|
|
.I file.
|
2011-09-05 01:55:47 +00:00
|
|
|
.TP
|
2011-09-23 03:45:47 +00:00
|
|
|
.BI w " file
|
|
|
|
Capture a screenshot of the content area in the given
|
|
|
|
.I file.
|
2011-09-05 01:55:47 +00:00
|
|
|
.TP
|
2011-09-23 03:45:47 +00:00
|
|
|
.B q
|
|
|
|
Quit.
|
2011-09-05 01:55:47 +00:00
|
|
|
.PD
|
|
|
|
.PP
|
|
|
|
When
|
|
|
|
.I mothra
|
2012-05-31 14:29:55 +00:00
|
|
|
retrieves a direct link to a file that is not an
|
2011-09-05 01:55:47 +00:00
|
|
|
HTML document (for example a GIF or JPEG
|
|
|
|
image), it will start up an appropriate viewer, for example
|
2011-09-28 14:06:37 +00:00
|
|
|
.B page
|
2011-09-05 01:55:47 +00:00
|
|
|
(see
|
2011-09-28 14:06:37 +00:00
|
|
|
.IR page (1))
|
|
|
|
for most image files.
|
2011-09-05 01:55:47 +00:00
|
|
|
.SH FILES
|
2011-09-23 03:45:47 +00:00
|
|
|
.B $home/lib/mothra/hit.html
|
|
|
|
the hit list
|
2011-09-05 01:55:47 +00:00
|
|
|
.SH SOURCE
|
|
|
|
.B /sys/src/cmd/mothra
|
|
|
|
.SH "SEE ALSO"
|
|
|
|
.IR webfs (4)
|
|
|
|
.SH BUGS
|
|
|
|
Files are saved in the form received,
|
|
|
|
not in the form suggested by the name in an
|
|
|
|
.B s
|
2011-10-02 02:30:12 +00:00
|
|
|
command. A directory index saved from moth mode may be written in
|
|
|
|
the local directory as a file named
|
|
|
|
.B index.
|
|
|
|
Sanitizing remote file names for the local file system is imperfect.
|
|
|
|
.PP
|
2011-09-05 01:55:47 +00:00
|
|
|
.I Mothra
|
2011-10-02 02:30:12 +00:00
|
|
|
is distributed in a preliminary state; it has more than its share of bugs. Note that
|
|
|
|
.I mothra,
|
|
|
|
like the other Guardian Monsters, has no particular concern for humanity.
|
2013-12-27 21:22:05 +00:00
|
|
|
.SH HISTORY
|
|
|
|
.I Mothra
|
|
|
|
first appeared in Plan 9 from Bell Labs (1995). It was later modified for inclusion in
|
|
|
|
9front (September, 2011).
|