This is the cl-gopher Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 04:59:56 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
cl-gopher
Gopher protocol library
Kyle Nusbaum
BSD 2-Clause
usocket
(system).
flexi-streams
(system).
drakma
(system).
bordeaux-threads
(system).
quri
(system).
cl-gopher-package.lisp
(file).
cl-gopher.lisp
(file).
client.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
cl-gopher/cl-gopher.asd
cl-gopher/cl-gopher-package.lisp
cl-gopher/cl-gopher.lisp
cl-gopher/client.lisp
cl-gopher/cl-gopher.lisp
cl-gopher-package.lisp
(file).
cl-gopher
(system).
bad-submenu-error
(condition).
bad-uri-error
(condition).
binary-file
(class).
binary-file-contents
(class).
binhex-file
(class).
ccso-nameserver
(class).
content-array
(reader method).
(setf content-array)
(writer method).
content-string
(reader method).
(setf content-string)
(writer method).
convert-to-text-line
(function).
copy-gopher-line
(generic function).
display-contents
(generic function).
display-line
(generic function).
display-lines
(function).
display-string
(reader method).
(setf display-string)
(writer method).
dos-file
(class).
download-file
(function).
error-code
(class).
file-name
(reader method).
(setf file-name)
(writer method).
get-line-contents
(generic function).
gif
(class).
gopher-line
(class).
gopher-line-from-alist
(function).
gopher-line-to-alist
(generic function).
gopher-lines-from-alist
(function).
gopher-lines-to-alist
(function).
hostname
(reader method).
(setf hostname)
(writer method).
html-file
(class).
html-file-contents
(class).
image
(class).
info-message
(class).
line-type
(function).
lines
(reader method).
lines
(reader method).
(setf lines)
(writer method).
(setf lines)
(writer method).
mirror
(class).
parse-gopher-uri
(function).
png
(class).
port
(reader method).
(setf port)
(writer method).
print-object
(method).
print-object
(method).
read-gopher-line
(function).
search-line
(class).
selector
(reader method).
(setf selector)
(writer method).
selector-contents
(class).
sound-file
(class).
submenu
(class).
submenu-contents
(class).
telnet
(class).
telnet-3270
(class).
terms
(reader method).
(setf terms)
(writer method).
text-file
(class).
text-file-contents
(class).
unknown
(class).
uri-for-gopher-line
(function).
uuencoded-file
(class).
write-gopher-line
(generic function).
class-for-type
(function).
compute-item-type
(function).
compute-selector
(function).
make-unknown
(function).
retrieve-submenu-contents
(function).
type-character
(generic function).
type-for-character
(function).
uri
(reader method).
with-gopher-socket-for-selector
(macro).
cl-gopher/client.lisp
cl-gopher.lisp
(file).
cl-gopher
(system).
network-browser
(function).
text-browser
(function).
*allow-downloads*
(special variable).
get-client-response
(function).
handle-contents
(generic function).
handle-line-selection
(generic function).
hangup-error
(condition).
pause-line
(function).
quit-condition
(condition).
write-help
(function).
Packages are listed by definition order.
cl-gopher
cl-gopher is a Common Lisp library for interacting with
the Gopher protocol. It is suitable for building both
clients and servers, and provides a sample client.
See (describe ’cl-gopher:text-browser) and
(describe ’cl-gopher:network-browser)
cl-gopher has been tested and confirmed to work with:
SBCL 1.4.6
ClozureCL Version 1.11.5/v1.11.5
ECL 16.1.3
Most classes and functions have documentation associated with them, and can be shown with the DESCRIBE function.
For a brief overview, look at the readme distributed with the source, or available at https://github.com/knusbaum/cl-gopher/blob/master/README.md
common-lisp
.
bad-submenu-error
(condition).
bad-uri-error
(condition).
binary-file
(class).
binary-file-contents
(class).
binhex-file
(class).
ccso-nameserver
(class).
content-array
(generic reader).
(setf content-array)
(generic writer).
content-string
(generic reader).
(setf content-string)
(generic writer).
convert-to-text-line
(function).
copy-gopher-line
(generic function).
display-contents
(generic function).
display-line
(generic function).
display-lines
(function).
display-string
(generic reader).
(setf display-string)
(generic writer).
dos-file
(class).
download-file
(function).
error-code
(class).
file-name
(generic reader).
(setf file-name)
(generic writer).
get-line-contents
(generic function).
gif
(class).
gopher-line
(class).
gopher-line-from-alist
(function).
gopher-line-to-alist
(generic function).
gopher-lines-from-alist
(function).
gopher-lines-to-alist
(function).
hostname
(generic reader).
(setf hostname)
(generic writer).
html-file
(class).
html-file-contents
(class).
image
(class).
info-message
(class).
line-type
(function).
lines
(generic reader).
(setf lines)
(generic writer).
mirror
(class).
network-browser
(function).
parse-gopher-uri
(function).
png
(class).
port
(generic reader).
(setf port)
(generic writer).
read-gopher-line
(function).
search-line
(class).
selector
(generic reader).
(setf selector)
(generic writer).
selector-contents
(class).
sound-file
(class).
submenu
(class).
submenu-contents
(class).
telnet
(class).
telnet-3270
(class).
terms
(generic reader).
(setf terms)
(generic writer).
text-browser
(function).
text-file
(class).
text-file-contents
(class).
unknown
(class).
uri-for-gopher-line
(function).
uuencoded-file
(class).
write-gopher-line
(generic function).
*allow-downloads*
(special variable).
class-for-type
(function).
compute-item-type
(function).
compute-selector
(function).
get-client-response
(function).
handle-contents
(generic function).
handle-line-selection
(generic function).
hangup-error
(condition).
make-unknown
(function).
pause-line
(function).
quit-condition
(condition).
retrieve-submenu-contents
(function).
type-character
(generic function).
type-for-character
(function).
uri
(generic reader).
with-gopher-socket-for-selector
(macro).
write-help
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
CONVERT-TO-TEXT-LINE takes a GOPHER-LINE and returns
a copy of it that is of type TEXT-FILE.
This is only seldom useful, but can be used in case you want to treat a gopher resource as a text file rather than whatever kind of resource it actually is.
For example, this can be used to treat a gopher menu as a plain-text file, allowing you to see the lines as the protocol specifies.
DISPLAY-LINES displays a list of GOPHER-LINE in a human-
readable way on STREAM by calling DISPLAY-LINE.
WITH-LINE-NUMS - if not nil, pass a LINE-NUMBER argument
to DISPLAY-LINE corresponding to the
line’s index in LINES.
SHOW-TARGET - if not nil, display the gopher URI that the line links to.
Download a file pointed to by the GOPHER-LINE gl. DESTFILE should be a pathname or string. If DESTFILE exists, it will be overwritten. This function just writes out whatever bytes are returned by the gopher server returns for the GOPHER-LINE.
GOPHER-LINE-FROM-ALIST converts an alist to a GOPHER-LINE. This is primarily useful in conjunction with the function GOPHER-LINE-TO-ALIST, which converts a GOPHER-LINE to an alist.
GOPHER-LINES-FROM-ALIST converts a list of alists to a list of GOPHER-LINES using the GOPHER-LINE-FROM-ALIST function.
GOPHER-LINES-TO-ALIST converts a list of GOPHER-LINE to a list of alist using the GOPHER-LINE-TO-ALIST function.
LINE-TYPE returns a keyword describing the type of the GOPHER-LINE gl.
PARSE-GOPHER-URI takes a gopher uri as a string, and returns a GOPHER-LINE for it.
READ-GOPHER-LINE reads and returns a GOPHER-LINE from a stream that contains gopher lines in the format a gopher server should return upon request of a gopher menu, specified by RFC 1436 (https://tools.ietf.org/html/rfc1436)
URI-FOR-GOPHER-LINE takes a GOPHER-LINE and returns a string containing a gopher uri representing the resource the line points to.
binary-file-contents
)) ¶automatically generated reader method
binary-file-contents
)) ¶automatically generated writer method
html-file-contents
)) ¶automatically generated reader method
html-file-contents
)) ¶automatically generated writer method
Returns a new GOPHER-LINE that is a copy of the GOPHER-LINE gl.
gopher-line
)) ¶DISPLAY-CONTENTS will write out a contents object in a human-readable format to the stream STREAM.
binary-file-contents
) &key stream) ¶html-file-contents
) &key stream) ¶text-file-contents
) &key stream) ¶submenu-contents
) &key stream) ¶Display a GOPHER-LINE in a human-readable format. This
is suitable for displaying lines from a menu in a text
based client.
STREAM - the stream to write the line to. Defaults to
*STANDARD-OUTPUT*
LINE-NUMBER - if specified, a number to display at the
beginning of the line.
SHOW-TARGET - if not nil, display the gopher URI
that the line links to.
INCLUDE-NEWLINE - if not nil, include a newline at the end of the line.
info-message
) &key stream line-number show-target include-newline) ¶gopher-line
) &key stream line-number show-target include-newline) ¶gopher-line
)) ¶automatically generated reader method
gopher-line
)) ¶automatically generated writer method
binary-file-contents
)) ¶automatically generated reader method
binary-file-contents
)) ¶automatically generated writer method
GET-LINE-CONTENTS takes a GOPHER-LINE and returns an object of type SELECTOR-CONTENTS (or one of its subclasses) It does this by contacting the target server and requesting the resource represented by the GOPHER-LINE.
search-line
)) ¶gopher-line
)) ¶GOPHER-LINE-TO-ALIST converts a GOPHER-LINE object to an alist. These alists are suitable to be read/written by the lisp reader and writer. This can be useful in conjunction with GOPHER-LINE-FROM-ALIST, which performs the reverse operation.
gopher-line
)) ¶gopher-line
)) ¶automatically generated reader method
gopher-line
)) ¶automatically generated writer method
text-file-contents
)) ¶automatically generated reader method
submenu-contents
)) ¶automatically generated reader method
text-file-contents
)) ¶automatically generated writer method
submenu-contents
)) ¶automatically generated writer method
gopher-line
)) ¶automatically generated reader method
port
.
gopher-line
)) ¶automatically generated writer method
port
.
gopher-line
)) ¶automatically generated reader method
gopher-line
)) ¶automatically generated writer method
gopher-line
)) ¶automatically generated reader method
gopher-line
)) ¶automatically generated writer method
Write out a gopher line to a stream, such that a gopher client reading the stream on the other end will be able to read the line, according to RFC 1436 (https://tools.ietf.org/html/rfc1436)
info-message
) &key stream) ¶gopher-line
) &key stream) ¶bad-uri-error
) stream) ¶gopher-line
) stream) ¶error
.
A BINARY-FILE-CONTENTS object contains the bytes from various GOPHER-LINE subclasses, such as BINARY-FILE, IMAGE, GIF, PNG, SOUND-FILE, etc.
The FILE-NAME slot is just a convenience for the
user, in case they wish to write the contents to
a file locally, with a similar name to that
suggested by the GOPHER-LINE selector.
The CONTENT-ARRAY is a vector of (UNSIGNED-BYTE 8) which contains all the bytes from the file.
A GOPHER-LINE represents a gopher menu item,
(analogous to an html link).
See the subclasses of GOPHER-LINE, which represent the various kinds of menu items supported by this library.
:display-string
:selector
:hostname
""
:terms
An HTML-FILE-CONTENTS object contains the raw html text pointed to by an HTML-FILE object (a type of GOPHER-LINE). You may or may not find this useful, since often when dealing with HTTP links through gopher, it is more useful to deal with the URL, which is available through the HTML-FILE object.
:content-string
A SELECTOR-CONTENTS object contains the contents pointed to by a GOPHER-LINE object. This class is never directly used, but instead, one of its subclasses is returned when calling GET-LINE-CONTENTS.
A SUBMENU-CONTENTS object contains a gopher submenu. The single slot, LINES, is a list of GOPHER-LINE objects representing all of the menu items in the submenu.
:lines
A TEXT-FILE-CONTENTS object contains a text file. The single slot, LINES, is a list of string, each element of which is a single line of text from the text file.
:lines
binary-file-contents
) &key input-stream output-stream) ¶selector-contents
) &key input-stream output-stream) ¶submenu-contents
) &key input-stream output-stream) ¶search-line
) &key input-stream output-stream) ¶gopher-line
) &key input-stream output-stream) ¶gopher-line
)) ¶sound-file
)) ¶info-message
)) ¶telnet-3270
)) ¶binary-file
)) ¶search-line
)) ¶uuencoded-file
)) ¶binhex-file
)) ¶error-code
)) ¶ccso-nameserver
)) ¶bad-uri-error
)) ¶uri
.
Jump to: | (
C D F G H L M N P R S T U W |
---|
Jump to: | (
C D F G H L M N P R S T U W |
---|
Jump to: | *
C D F H L P S T U |
---|
Jump to: | *
C D F H L P S T U |
---|
Jump to: | B C D E F G H I M P Q S T U |
---|
Jump to: | B C D E F G H I M P Q S T U |
---|