plan9fox/sys/man/1/mothra

206 lines
4.4 KiB
Plaintext
Executable file

.TH MOTHRA 1
.SH NAME
mothra \- retrieve and display World-Wide Web files
.SH SYNOPSIS
.B mothra
[
.B -dvak
]
[
.B -m
.I mtpt
] [
.I url
]
.SH DESCRIPTION
.I Mothra
uses
.IR webfs (4)
to retrieve and display files from the World-Wide Web,
by name or through hypertext links.
Web names, called URLs, have a peculiar syntax:
.IP
.EX
http://9front.org/
https://code.9front.org/hg/plan9front/
http://cat-v.org/
.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
There are a number of options:
.TP
.B -a
Alt display. Starts in alt display mode, see menu
commands table below.
.TP
.B -k
Kill images. Don't fetch/display images.
.TP
.B -m
Specify the
.IR webfs (4)
mountpoint with
.BR -m
.I mtpt.
The default is
.B /mnt/web.
.TP
.B -v
Verbose mode. Causes HTML errors to be printed
on file-descriptor 2.
.TP
.B -d
Enables debug mode.
.PP
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:
.TF alt\ display
.TP
.B alt display
Collapse or expand the navigation boxes at the top of the browser window.
.TP
.B moth mode
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
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.
Clicking the
.B moth mode
menu option again exits moth mode.
.TP
.B snarf
Copy the current entry text or selected page text to snarf buffer.
If nothing is selected, the current URL is copied.
.TP
.B paste
Paste the snarf buffer to the current text entry.
.TP
.B plumb
Plumb the current URL.
.TP
.B search
Search for a regular expression in the current page.
.TP
.B save hit
Save the current URL to the hit list.
.TP
.B hit list
Retrieve and display the hit list.
.TP
.B exit
Ask for confirmation and quit.
.PD
.PP
The typed commands are:
.TF typed\ commands
.TP
.B a
Toggle alt display.
.TP
.BI d " text
Search for the given
.I text
at DuckDuckGo.
.TP
.BI g " url
Go to the page with the given URL.
.TP
.BI j " n
Jump to page
.I n
from the list of previously viewed pages.
.TP
.BI k
Toggle killing of images.
.TP
.BI m
Enter or exit moth mode.
.TP
.B r
Reload the current page.
.TP
.BI s " file
Save the current page in the given
.I file.
.TP
.BI W " file
Capture a screenshot of the entire browser window in the given
.I file.
.TP
.BI w " file
Capture a screenshot of the content area in the given
.I file.
.TP
.B q
Quit.
.PD
.PP
When
.I mothra
retrieves a direct link to a file that is not an
HTML document (for example a GIF or JPEG
image), it will start up an appropriate viewer, for example
.B page
(see
.IR page (1))
for most image files.
.SH FILES
.B $home/lib/mothra/hit.html
the hit list
.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
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
.I Mothra
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.
.SH HISTORY
.I Mothra
first appeared in Plan 9 from Bell Labs (1995). It was later modified for inclusion in
9front (September, 2011).