1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Sync the doc/ changes from elinks-0.12

This includes a lot of improvements to the manpages. The API doc changes
are not merged.
This commit is contained in:
Jonas Fonseca 2006-01-29 12:52:19 +01:00 committed by Jonas Fonseca
parent 038f3a4502
commit 5e60934627
18 changed files with 3054 additions and 2779 deletions

17
doc/.gitignore vendored
View File

@ -1,5 +1,14 @@
html
pdf
txt
web
*.tmp
*.html
*.pdf
*.xml
*.1
*.5
api
web
features.txt
keymap-actions.txt
keymap-defaults.txt
manual.html-chunked
option-command.txt
option-config.txt

View File

@ -3,66 +3,31 @@ include $(top_builddir)/Makefile.config
SUBDIRS = man
HTML_DIR = $(DESTDIR)html
MAN_DIR = $(DESTDIR)man
PDF_DIR = $(DESTDIR)pdf
XML_DIR = $(DESTDIR)xml
# A little trick to simplify some of the rules.
VPATH = $(builddir):$(srcdir):$(top_srcdir)/contrib/perl
# Keep generated .txt files relative to the source directory
# and files they are included in.
TXT_DIR = $(top_srcdir)/doc/txt
docdir = $(datadir)/doc
DOC_DIRS = \
$(HTML_DIR) \
$(MAN_DIR)/man1 \
$(MAN_DIR)/man5 \
$(TXT_DIR) \
$(XML_DIR)
# Used by install-doc
HTML_DIR = $(DESTDIR)$(docdir)/$(PACKAGE)/html
PDF_DIR = $(DESTDIR)$(docdir)/$(PACKAGE)/pdf
# TODO: perl.pod should be pod2ized during make install. --pasky
ASCIIDOC_CONF = $(srcdir)asciidoc.conf
ASCIIDOC_FLAGS += -f $(ASCIIDOC_CONF) -a "builddir=$(CURDIR)/"
# XXX: manual.txt is the master document and must be first.
MANUAL_FILES = \
manual.txt \
\
bookmarks.txt \
ecmascript.txt \
exmode.txt \
faq.txt \
installation.txt \
introduction.txt \
lua-scripting.txt \
mailcap.txt \
marks.txt \
mime.txt \
remote.txt \
small.txt \
tabs.txt \
terminals.txt \
urlshortcuts.txt
#############################################################################
# Build files
### Script Dependencies
#
ELINKS = $(top_builddir)/src/elinks
KBDBIND = $(top_srcdir)/src/config/kbdbind.c
FEATURES = $(top_srcdir)/features.conf
### Locale env vars to override system one to ensure commands
# using elinks binary will generate texts in english
#
LOCALES = LC_ALL=C LANGUAGE=en
### Scripts
#
HELP2DOC = $(top_srcdir)/doc/tools/help2doc
IMPORT_FEATURES_CONF = $(top_srcdir)/doc/tools/import-features.conf
MAKE_ELINKS_MANPAGE = $(top_srcdir)/doc/tools/make-elinks-manpage
MAKE_ELINKSKEYS_MANPAGE = $(top_srcdir)/doc/tools/make-elinkskeys-manpage
TXT_DOCS = \
features.txt \
keymap-actions.txt \
keymap-defaults.txt \
option-command.txt \
option-config.txt
HTML_DOCS-$(CONFIG_ASCIIDOC) += \
elinks.1.html \
elinks.conf.5.html \
elinkskeys.5.html \
hacking.html \
manual.html
@ -75,103 +40,156 @@ HTML_DOCS-$(CONFIG_POD2HTML) += \
perl-hooks.html
MAN_DOCS-$(CONFIG_XMLTO) += \
man1/elinks.1.in \
man5/elinkskeys.5
elinks.1 \
elinks.conf.5 \
elinkskeys.5
# Only jw is used for generating PDF.
# Use jw for generating PDF, since xmlto seems to freak out.
PDF_DOCS-$(CONFIG_JW) += \
manual.pdf
MAN_DOCS += man5/elinks.conf.5
MAN_DOCS += $(MAN_DOCS-yes)
HTML_DOCS += $(HTML_DOCS-yes)
PDF_DOCS += $(PDF_DOCS-yes)
#############################################################################
## Set the default doc rules
man-docs: doc-dirs $(addprefix $(MAN_DIR)/,$(MAN_DOCS))
html-docs: doc-dirs $(addprefix $(HTML_DIR)/,$(HTML_DOCS))
pdf-docs: doc-dirs $(addprefix $(PDF_DIR)/,$(PDF_DOCS))
MAN_DOCS = $(MAN_DOCS-yes)
HTML_DOCS = $(HTML_DOCS-yes)
PDF_DOCS = $(PDF_DOCS-yes)
all-docs: man-docs html-docs pdf-docs
txt: $(TXT_DOCS)
html: txt $(HTML_DOCS)
pdf: txt $(PDF_DOCS)
man: txt $(MAN_DOCS)
### Build Rules
#
all-docs: man html pdf
doc-dirs:
$(INSTALL) -d $(DOC_DIRS)
install-doc: all-docs update-man install
@$(foreach doc,$(HTML_DOCS), \
if test -d $(doc); then \
$(MKINSTALLDIRS) $(DESTDIR)$(docdir)/$(PACKAGE)/html/$(doc); \
$(call ncmd,installdata,$(doc)/*,$(HTML_DIR)/$(doc)); \
else \
$(MKINSTALLDIRS) $(DESTDIR)$(docdir)/$(PACKAGE)/html; \
$(call ncmd,installdata,$(doc),$(HTML_DIR)); \
fi;)
@$(foreach doc,$(PDF_DOCS), \
$(MKINSTALLDIRS) $(DESTDIR)$(docdir)/$(PACKAGE)/pdf; \
$(call ncmd,installdata,$(doc),$(PDF_DIR);))
update-man: man
@$(if $(MAN_DOCS), \
$(call ncmd,installdata,elinks.1,man/man1/elinks.1.in); \
$(call ncmd,installdata,elinkskeys.5,man/man5/); \
$(call ncmd,installdata,elinks.conf.5,man/man5/))
# $(MAN_DIR) intentionally left out
clean-local:
@$(RM) -r $(HTML_DIR) $(XML_DIR) $(TXT_DIR) $(PDF_DIR) *.tmp
@$(RM) -r $(TXT_DOCS) $(MAN_DOCS) $(HTML_DOCS) $(PDF_DOCS) *.tmp *.xml
# TODO: perl.pod should be pod2ized during make install. --pasky
install-local:
# Autogenerated asciidoc files.
#############################################################################
# Generated asciidoc files
$(TXT_DIR)/import-features.conf.txt: $(FEATURES) $(IMPORT_FEATURES_CONF)
$(IMPORT_FEATURES_CONF) > $@
# Scripts and Dependencies
HELP2DOC = $(srcdir)tools/help2doc
CONF2DOC = $(srcdir)tools/conf2doc
KEYS2DOC = $(srcdir)tools/keys2doc
ELINKS = $(top_builddir)/src/elinks
FEATURES = $(top_srcdir)/features.conf
KBDBIND = $(top_srcdir)/src/config/kbdbind.c
$(TXT_DIR)/elinks.1.%.txt: $(MAKE_ELINKS_MANPAGE) $(ELINKS) $(HELP2DOC) Makefile
$(LOCALES) $(MAKE_ELINKS_MANPAGE) $@ $(ELINKS) $(HELP2DOC) > $@
# Locale env vars to override system one to ensure commands
# using elinks binary will generate texts in english
LOCALES = LC_ALL=C LANGUAGE=en
$(TXT_DIR)/elinkskeys.5.%.txt: $(MAKE_ELINKSKEYS_MANPAGE) $(KBDBIND) Makefile
$(LOCALES) $(MAKE_ELINKSKEYS_MANPAGE) $@ $(KBDBIND) > $@
# FIXME: Keep generated .txt files relative to the source directory and files
# they are included in.
quiet_cmd_help2doc = ' [$(LINK_COLOR)HELP2DOC$(END_COLOR)] $(RELPATH)$@'
cmd_help2doc = $(LOCALES) $(HELP2DOC) $(ELINKS) $@ > $@
quiet_cmd_conf2doc = ' [$(LINK_COLOR)CONF2DOC$(END_COLOR)] $(RELPATH)$@'
cmd_conf2doc = $(LOCALES) $(CONF2DOC) $(FEATURES) > $@
quiet_cmd_keys2doc = ' [$(LINK_COLOR)KEYS2DOC$(END_COLOR)] $(RELPATH)$@'
cmd_keys2doc = $(LOCALES) $(KEYS2DOC) $(KBDBIND) $@ > $@
quiet_cmd_code2doc = ' [$(LINK_COLOR)CODE2DOC$(END_COLOR)] $(RELPATH)$@'
cmd_code2doc = $(LOCALES) $(CODE2DOC) $< > $@
features.txt: $(FEATURES) $(CONF2DOC)
$(call cmd,conf2doc)
keymap-%.txt: $(KBDBIND) $(KEYS2DOC)
$(call cmd,keys2doc)
option-%.txt: $(ELINKS) $(HELP2DOC)
$(call cmd,help2doc)
# Man Pages
#############################################################################
# Build commands and macros
$(XML_DIR)/%.man.xml: $(TXT_DIR)/%.man.txt
$(ASCIIDOC) -b docbook -d manpage -o $@ $<
quiet_cmd_jw = ' [$(LINK_COLOR)JW$(END_COLOR)] $(RELPATH)$@'
cmd_jw = $(JW) -b $(2) $<
$(MAN_DIR)/man1/elinks.1.in: $(XML_DIR)/elinks.1.man.xml
$(XMLTO) -o $(MAN_DIR)/man1 man $<
sed 's/^\.TH "ELINKS" 1 .*/.TH "ELINKS" 1 "The ELinks text-browser" "$(shell date -I)" "The ELinks text-browser"/' \
< $(MAN_DIR)/man1/elinks.1 > $@
rm $(MAN_DIR)/man1/elinks.1
quiet_cmd_xmlto = ' [$(LINK_COLOR)XMLTO$(END_COLOR)] $(RELPATH)$@'
cmd_xmlto = $(XMLTO) -o $(call outdir) $(3) $(2) $<
$(MAN_DIR)/man5/elinkskeys.5: $(XML_DIR)/elinkskeys.5.man.xml
$(XMLTO) -o $(MAN_DIR)/man5 man $<
sed -e 's/\\fI\\fR'\''/\\fI\\'\''\\fR/' < $@ > $@.tmp
sed 's/^\.TH "ELINKSKEYS" 5 .*/.TH "ELINKSKEYS" 5 "ELinks keybindings" "$(shell date -I)" "ELinks keybindings"/' \
< $@.tmp > $@
rm $@.tmp
quiet_cmd_pod2html = ' [$(LINK_COLOR)POD2HTML$(END_COLOR)] $(RELPATH)$@'
cmd_pod2html = $(POD2HTML) --outfile=$@ < $<
$(MAN_DIR)/man5/elinks.conf.5: $(ELINKS) $(HELP2DOC) Makefile
$(LOCALES) $(HELP2DOC) --elinks=$(ELINKS) --elinksconf > $@
quiet_cmd_asciidoc = ' [$(LINK_COLOR)ASCIIDOC$(END_COLOR)] $(RELPATH)$@'
cmd_asciidoc = $(ASCIIDOC) $(ASCIIDOC_FLAGS) -b $(call backend) -d $(call doctype) -o $@ $<
# XHTML/CSS Man Pages
# Based on $@ find out asciidoc doctype or backend + xmlto output dir.
doctype = $(if $(findstring .1.,$@)$(findstring .5.,$@),manpage,book)
backend = $(if $(findstring .xml,$@),docbook,xhtml11)
outdir = $(if $(findstring -chunked,$@),$@,.)
$(HTML_DIR)/%.html: $(TXT_DIR)/%.html.txt
$(ASCIIDOC) -b xhtml11 -d manpage -o $@ $<
# Loosely track dependencies via asciidoc includes.
asciidoc_dep = sed -n 's/[{]builddir}//g;s@include::\(.*\)\[.*@$@: $< \1@p' < $< > .deps/$(@F).asciidoc
# The Manual
-include .deps/*.asciidoc
MANUAL_EXTRA_FILES = \
$(TXT_DIR)/import-features.conf.txt \
$(TXT_DIR)/elinks.1.html.txt \
$(TXT_DIR)/elinkskeys.5.html.txt
# Do a little post-processing of man pages. Inserting title headers and date.
MAN_DATE = $(shell date -I)
man_desc = `sed -n 's/:Description:\s*\(.*\)/\1/p' < $(srcdir)$(subst .xml,.txt,$(<F))`
man_hack = sed "s/^\(\.TH \"ELINKS[^\"]*\" [0-9] \).*/\1\"$(1)\" \"$(MAN_DATE)\" \"$(1)\"/" < $@ | \
sed "s/@squote@/\\\\'/g" > $@.tmp && mv $@.tmp $@
$(HTML_DIR)/manual.html: $(MANUAL_FILES) $(MANUAL_EXTRA_FILES)
$(ASCIIDOC) -b xhtml11 -d book -o $@ -n $<
$(HTML_DIR)/hacking.html: $(top_srcdir)/doc/hacking.txt
$(ASCIIDOC) -b xhtml11 -d book -o $@ -n $<
#############################################################################
# Build recipies
$(HTML_DIR)/dev-intro.html: $(top_srcdir)/doc/dev-intro.txt
$(ASCIIDOC) -b xhtml11 -d book -o $@ -n $<
%.html: %.txt $(ASCIIDOC_CONF)
$(call cmd,asciidoc,xhtml11)
@-$(call asciidoc_dep)
$(XML_DIR)/manual.xml: $(MANUAL_FILES) $(MANUAL_EXTRA_FILES)
$(ASCIIDOC) -b docbook -d book -o $@ $<
%.xml: %.txt $(ASCIIDOC_CONF)
$(call cmd,asciidoc,docbook)
@-$(call asciidoc_dep)
$(HTML_DIR)/manual.html-chunked: $(XML_DIR)/manual.xml
$(XMLTO) -o $@ html $<
%.1: %.1.xml
$(call cmd,xmlto,man)
@$(call man_hack,$(call man_desc))
$(PDF_DIR)/manual.pdf: $(XML_DIR)/manual.xml
$(JW) -o $(PDF_DIR) -b pdf $<
%.5: %.5.xml
$(call cmd,xmlto,man)
@$(call man_hack,$(call man_desc))
$(HTML_DIR)/perl.html: $(top_srcdir)/doc/perl.pod
$(POD2HTML) --outfile=$@ < $<
%.html-chunked: %.xml
$(call cmd,xmlto,html)
%.pdf: %.xml
$(call cmd,jw,pdf)
%.html: %.pod
$(call cmd,pod2html)
perl-%.html: %.pl
$(call cmd,pod2html)
$(HTML_DIR)/perl-hooks.html: $(top_srcdir)/contrib/perl/hooks.pl
$(POD2HTML) --outfile=$@ < $<
include $(top_srcdir)/Makefile.lib

View File

@ -57,7 +57,8 @@ in this directory or it's children.
submitting patches etc., thus every aspiring developer should take the
pains to read through it, do not forget to also look for README and similar
text files in the subdirectories containing the relevant sources for
detailed notes regarding given modules/subsystems.
detailed notes regarding given modules/subsystems. Additionally, it is
possible to build API docs. More about this below.
The Lua Scripting Book ...................... lua-scripting.txt
Events Reference Sheet ...................... events.txt
@ -94,11 +95,18 @@ and the following man page formats:
- HTML (asciidoc)
- man / groff (asciidoc + xmlto)
Note: You do not need to build manpages. They are shipped with ELinks.
Note: You do not need to build manpages. They are shipped with ELinks. However,
if you want to have the manpages to match your local configuration and changes
you can rebuild them (this is mostly an issue with elinks.conf(5) which might
otherwise contain options that is not supported by the version you install.
Note: You must first build the ELinks binary for "make all-docs" to work
successfully. The binary is used for getting option documentation.
The documentation can be installed with:
$ make install-doc
Contributing
------------

92
doc/asciidoc.conf Normal file
View File

@ -0,0 +1,92 @@
# AsciiDoc configuration file
# Copyright (c) Jonas Fonseca <fonseca@diku.dk>, 2006
# This file sets the following ELinks specific AsciiDoc macros:
#
# General purpose:
# - man:page[section]: which is used for linking between ELinks manpages.
#
# API Doc:
# - id:[]
# - enum:[]
# - func:[]
# - struct:[]
# - macro:[]
# - typedef:[]
# - ref:[]
[replacements]
(^|[^-])--($|[^-])=\1--\2
# Some macros can have optional {0} value, that is what
# the {0%...} and {0#...} handles.
#############################################################################
# DocBook
ifdef::backend-docbook[]
# To be replaced later
[attributes]
squote=@squote@
# No interlinking between elinks manpages
[man-inlinemacro]
{0%{target}}
{0#<citerefentry>}
{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
{0#</citerefentry>}
# For manpages use less verbose linking
ifdef::doctype-manpage[]
[link-inlinemacro]
{0%&lt;{target}&gt;}
{0#{0} &lt;{target}&gt;}
[http-inlinemacro]
{0%&lt;http:{target}&gt;}
{0#{0} &lt;http:{target}&gt;}
[mailto-inlinemacro]
&lt;{target}&gt;
endif::doctype-manpage[]
endif::backend-docbook[]
#############################################################################
# XHTML11
ifdef::backend-xhtml11[]
[attributes]
squote='
# Use the man:[] macro to link between elinks manpages
[man-inlinemacro]
{eval:re.match("elinks", "{target}") != None}<a href="{target}.{0}.html">{target}({0})</a>
{eval:re.match("elinks", "{target}") == None}<b>{target}({0})</b>
# API Doc macros
[id-inlinemacro]
<a id="{0}" href="#{0}">{0}</a>
[enum-inlinemacro]
<a id="{target}">enum {target}: {0}</a>
[func-inlinemacro]
<a id="{target}">{target}(): {0}</a>
[struct-inlinemacro]
<a id="{target}">struct {target}: {0}</a>
[macro-inlinemacro]
<a id="{target}">struct {target}: {0}</a>
[typedef-inlinemacro]
<a id="{target}">typedef {target}: {0}</a>
[ref-inlinemacro]
<a href="{target}#{0}">{0}</a>
endif::backend-xhtml11[]

175
doc/elinks.1.txt Normal file
View File

@ -0,0 +1,175 @@
elinks(1)
=========
:Description: The Elinks text-browser
NAME
----
elinks - lynx-like alternative character mode WWW browser
SYNOPSIS
--------
'elinks' [OPTION]... [URL]...
DESCRIPTION
-----------
'ELinks' is a text mode WWW browser, supporting colors, table rendering,
background downloading, menu driven configuration interface, tabbed browsing
and slim code.
Frames are supported. You can have different file formats associated with
external viewers. `mailto:` and `telnet:` are supported via external clients.
ELinks can handle both local files and remote URLs. The main supported remote
URL protocols are 'HTTP', 'HTTPS' (with SSL support compiled in) and 'FTP'.
Additional protocol support exists for 'BitTorrent' 'finger', 'Gopher',
'SMB' and 'NNTP'.
The homepage of 'ELinks' can be found at http://elinks.cz/[], where the ELinks
manual is also hosted.
OPTIONS
-------
Most options can be set in the user interface or config file, so usually you
do not need to care about them. Note that this list is roughly equivalent to
the output of running ELinks with the option `--long-help`.
include::{builddir}option-command.txt[]
ENVIRONMENT VARIABLES
---------------------
COMSPEC, SHELL::
The shell used for File -> OS Shell on DOS/Windows and UNIX,
respectively.
EDITOR::
The program to use for external editor (when editing textareas).
ELINKS_CONFDIR::
The location of the directory containing configuration files. If not
set the default is `~/.elinks/`.
ELINKS_TWTERM, LINKS_TWTERM::
The command to run when selecting File -> New window and if
`TWDISPLAY` is defined (default `twterm -e`)
ELINKS_XTERM, LINKS_XTERM::
The command to run when selecting File -> New window and if `DISPLAY`
is defined (default `xterm -e`)
FTP_PROXY, HTTP_PROXY, HTTPS_PROXY::
The host to proxy the various protocol traffic through.
NO_PROXY::
A comma separated list of URLs which should not be proxied.
HOME::
The path to the users home directory. Used when expanding `~/`.
WWW_HOME::
Homepage location (as in man:lynx[1]).
FILES
-----
@sysconfdir@/elinks.conf::
Site-wide configuration file.
~/.elinks/elinks.conf::
Per-user config file, loaded after site-wide configuration.
~/.elinks/bookmarks::
Bookmarks file.
~/.elinks/cookies::
Cookies file.
~/.elinks/exmodehist::
Exmode history file.
~/.elinks/formhist::
Form history file.
~/.elinks/globhist::
History file containing most recently visited URLs.
~/.elinks/gotohist::
GoTo URL dialog history file.
~/.elinks/hooks.{js,lua,pl,py,rb,scm}::
Browser scripting hooks.
~/.elinks/searchhist::
Search history file.
~/.elinks/socket::
Internal 'ELinks' socket for communication between its instances.
~/.mailcap::
Mappings of MIME types to external handlers.
~/.mime.types::
Mappings of file extensions to MIME types.
Other files that ELinks uses from '~/.elinks/' includes the user defined CSS
stylesheet. The name of the file can set in the 'document.css.stylesheet'
option.
PLATFORMS
---------
'ELinks' is known to work on 'Linux', 'FreeBSD', 'OpenBSD', 'Solaris', 'IRIX',
'HPUX', 'Digital Unix', 'AIX', 'OS/2', 'BeOS' and 'RISC OS'. Port for 'Win32'
is in state of beta testing.
BUGS
----
Please report any other bugs you find to the either the ELinks mailing list at
mailto:elinks-users@linuxfromscratch.org[] or if you prefer enter them into
http://bugzilla.elinks.or.cz/[the bug tracking system]. More information about
how to get in contact with developers and getting help can be found on
http://elinks.or.cz/community.html[the community page].
LICENSE
-------
'ELinks' is free software; you can redistribute it and/or modify it under the
terms of http://www.gnu.org/copyleft/gpl.html[the GNU General Public License]
as published by the Free Software Foundation; version 2 of the License.
AUTHORS
-------
The 'Links' browser - on which 'ELinks' is based - was written by Mikulas
Patocka mailto:mikulas@artax.karlin.mff.cuni.cz[]. 'ELinks' was written by
Petr Baudis mailto:pasky@ucw.cz[]. See file `AUTHORS` in the source tree for a
list of people contributing to this project.
This manual page was written by Peter Gervai mailto:grin@tolna.net[], using
excerpts from a (yet?) unknown 'Links' fan for the 'Debian GNU/Linux system'
(but may be used by others). Contributions from Francis A. Holop. Extended,
clarified and made more up-to-date by Petr Baudis mailto:pasky@ucw.cz[].
Updated by Zas mailto:zas@norz.org[]. The conversion to Asciidoc and trimming
was done by Jonas Fonseca mailto:fonseca@diku.dk[].
SEE ALSO
--------
man:elinkskeys[5], man:elinks.conf[5], man:links[1], man:lynx[1], man:w3m[1],
man:wget[1]
////////////////////////////////////////////////////////////////////////////
# vim: tabstop=4 shiftwidth=4 textwidth=76
////////////////////////////////////////////////////////////////////////////

63
doc/elinks.conf.5.txt Normal file
View File

@ -0,0 +1,63 @@
elinks.conf(5)
==============
:Description: ELinks configuration file
NAME
----
elinks.conf - ELinks configuration file
SYNOPSIS
--------
[verse]
set "<option>" = <value>
unset "<option>" = <value>
bind "<keymap>" "<key>" = "<action>"
include "<file>"
DESCRIPTION
-----------
The `elinks.conf` file contains configuration information for ELinks. It can
be used to configure the behaviour of ELinks in a wide variety of ways:
protocol behaviour, keybindings, colors used for rendering and for the user
interface.
It is read at startup and saved only when requested. All options described in
this document can be fully configured from within ELinks so no editing of
elinks.conf is needed.
Note that MIME-related options used for specifying handlers of various MIME
types are NOT described in this document. Documentation for these options can
be found at the ELinks homepage. Keybindings can also be specified in
elinks.conf. This is described in man:elinkskeys[5].
SYNTAX
------
The syntax of the configuration file is very simple. The elinks.conf file is a
free-form ASCII text file. The file may contain extra tabs and newlines for
formatting purposes. Keywords in the file are case-sensitive. Comments may be
placed anywhere within the file (except within quotes). Comments begin with
the # character and end at the end of the line.
EXAMPLES
--------
Some sample settings:
# Use asynchronous DNS resolver?
set connection.async_dns = 1
# horizontal text margin.
set document.browse.margin_width = 3
# Default document codepage.
set document.codepage.assume = "ISO-8859-1"
# User defined protocol handlers
set protocol.user.mailto.unix = "mutt %h -s \e\*(lq%s\e\*(rq"
OPTIONS
-------
include::{builddir}option-config.txt[]
SEE ALSO
--------
man:elinks[1], man:elinkskeys[5]

117
doc/elinkskeys.5.txt Normal file
View File

@ -0,0 +1,117 @@
elinkskeys(5)
=============
:Description: ELinks keybindings
NAME
----
elinkskeys - keybindings for ELinks
SYNOPSIS
--------
Information on how to configure keybinding and overview of the default
keybindings.
DESCRIPTION
-----------
Key binding for elinks should be placed in the file `~/.elinks/elinks.conf`.
Note that any information regarding their format/structure may not be
up-to-date. If you will discover that, please feed us with a patch.
Key binding statements are of the form:
bind <keymap> <keystroke> = <action>
where:
<keymap>::
is 'main', 'edit', or 'menu'. The main keymap is used for general
browsing. The edit keymap is used for editing text fields. The menu
keymap is used for navigating menus.
<keystroke>::
is a case sensitive key, which you can prefix with 'Ctrl-' or 'Alt-'.
'Ctrl-' must be followed by an uppercase key. See below for a list of
valid keys.
<action>::
is what the key should do. The actions available are dependent on the
keymap, and are listed separately below.
All words/strings may all be quoted "like so". Backslashes are escape
characters, even if not between quotes. Lines beginning with a hash character
(`#`) are comments.
Keys can be unbound just by binding them to the special 'none' action. It may
be of use if you accidentally type a key often.
EXAMPLE BINDINGS
----------------
Some sample keybindings:
bind "main" "v" = "view-image"
bind "main" "l" = "jump-to-link"
bind "main" "L" = "link-menu"
bind "main" "F10" = "file-menu"
bind "main" "F9" = "menu"
bind "main" "Escape" = "menu"
bind "edit" "Ctrl-R" = "auto-complete-unambiguous"
bind "edit" "Ctrl-W" = "auto-complete"
bind "edit" "Ctrl-K" = "kill-to-eol"
bind "menu" "Ctrl-B" = "page-up"
bind "menu" "PageUp" = "page-up"
bind "menu" "Ctrl-F" = "page-down"
bind "menu" "PageDown" = "page-down"
# ELinks with Lua support
bind "main" "," = "lua-console"
KEYS
----
Valid keys are: alphanumeric characters, punctuation, 'Enter', 'Backspace',
'Tab', 'Escape', 'Left', 'Right', 'Up', 'Down', 'Insert', 'Delete', 'Home',
'End', 'PageUp', 'PageDown', 'F1' to 'F12'.
Some keys will need to be quoted or escaped. For example, space can be written
as `" "` (quote space quote), and the quote itself as `\"` (backslash quote).
Backslash can be written as `\\` (double backslash).
/////////////////////////////////////////////////////////////////////////////
FIXME:
- You may prefix each of these keys with a number, telling its repeat count
(how many times to do it). You can also re-bind keys, see elinkskeys(5) for
documentation and a more complete list of keys bound by default.
- The following keys can be used while editing a line/jumping to a URL
/////////////////////////////////////////////////////////////////////////////
KEYMAP ACTIONS
--------------
include::{builddir}keymap-actions.txt[]
DEFAULT BINDINGS
----------------
The default bindings are shown below. Any bindings in `~/.elinks/elinks.conf`
will override these.
include::{builddir}keymap-defaults.txt[]
AUTHOR
------
This manual page was finally written by Peter Wang (one and a half years after
writing the binding code), using excerpts by David Mediavilla. You can thank
Petr Baudis for the subtle requests for documentation. Updated by Zas. Moved
to asciidoc format and cleaned up by Jonas Fonseca.
SEE ALSO
--------
man:elinks[1], man:elinks.conf[5]

View File

@ -312,8 +312,8 @@ place it on the same line as the command, if it's
place it on the preceding line.
3.2, More about style
~~~~~~~~~~~~~~~~~~~~~
More about style
~~~~~~~~~~~~~~~~
Note: We use short variables names and stupid examples here, do not take that
as a guideline for _REAL_ coding. Always use descriptive variables

View File

@ -71,6 +71,6 @@ include::small.txt[]
include::ecmascript.txt[]
include::txt/import-features.conf.txt[]
include::{builddir}features.txt[]
endif::installation-webpage[]

View File

@ -17,7 +17,7 @@
.el .ne 3
.IP "\\$1" \\$2
..
.TH "ELINKS" 1 "The ELinks text-browser" "2006-01-10" "The ELinks text-browser"
.TH "ELINKS" 1 "The Elinks text-browser" "2006-01-29" "The Elinks text-browser"
.SH NAME
elinks \- lynx-like alternative character mode WWW browser
.SH "SYNOPSIS"
@ -34,12 +34,15 @@ elinks \- lynx-like alternative character mode WWW browser
Frames are supported\&. You can have different file formats associated with external viewers\&. mailto: and telnet: are supported via external clients\&.
ELinks can handle both local files and remote URLs\&. The main supported remote URL protocols are \fIHTTP\fR, \fIHTTPS\fR (with SSL support compiled in) and \fIFTP\fR\&. Additional protocol support exists for \fIfinger\fR, \fIGopher\fR, \fISMB\fR and \fINNTP\fR\&.
ELinks can handle both local files and remote URLs\&. The main supported remote URL protocols are \fIHTTP\fR, \fIHTTPS\fR (with SSL support compiled in) and \fIFTP\fR\&. Additional protocol support exists for \fIBitTorrent\fR \fIfinger\fR, \fIGopher\fR, \fISMB\fR and \fINNTP\fR\&.
The homepage of \fIELinks\fR can be found at <http://elinks\&.cz/>, where the ELinks manual is also hosted\&.
.SH "OPTIONS"
Most options can be set in the user interface or config file, so usually you do not need to care about them\&. Note that this list is by no means complete and it is not kept up\-to\-date\&. To get complete list of commandline options, start \fIELinks\fR with parameter \-\-help\&.
Most options can be set in the user interface or config file, so usually you do not need to care about them\&. Note that this list is roughly equivalent to the output of running ELinks with the option \-\-long\-help\&.
.TP
\-anonymous [0|1] (default: 0)
@ -200,6 +203,9 @@ The verbose level controls what messages are shown at start up and while running
\-version
Print \fIELinks\fR version information and exit\&.
Generated using output from ELinks version 0\&.11\&.0\&.GIT\&.
.SH "ENVIRONMENT VARIABLES"
.TP
@ -236,7 +242,7 @@ The path to the users home directory\&. Used when expanding ~/\&.
.TP
WWW_HOME
Homepage location (as in lynx(1))
Homepage location (as in \fBlynx\fR(1))\&.
.SH "FILES"
@ -256,17 +262,25 @@ Bookmarks file\&.
~/\&.elinks/cookies
Cookies file\&.
.TP
~/\&.elinks/exmodehist
Exmode history file\&.
.TP
~/\&.elinks/formhist
Form history file\&.
.TP
~/\&.elinks/globhist
History file containing most recently visited URLs\&.
.TP
~/\&.elinks/gotohist
GoTo URL dialog history file\&.
.TP
~/\&.elinks/globhist
History file containing most recently visited URLs\&.
~/\&.elinks/hooks\&.{js,lua,pl,py,rb,scm}
Browser scripting hooks\&.
.TP
~/\&.elinks/searchhist
@ -276,6 +290,17 @@ Search history file\&.
~/\&.elinks/socket
Internal \fIELinks\fR socket for communication between its instances\&.
.TP
~/\&.mailcap
Mappings of MIME types to external handlers\&.
.TP
~/\&.mime\&.types
Mappings of file extensions to MIME types\&.
Other files that ELinks uses from \fI~/\&.elinks/\fR includes the user defined CSS stylesheet\&. The name of the file can set in the \fIdocument\&.css\&.stylesheet\fR option\&.
.SH "PLATFORMS"
@ -297,13 +322,10 @@ Please report any other bugs you find to the either the ELinks mailing list at <
The \fILinks\fR browser \- on which \fIELinks\fR is based \- was written by Mikulas Patocka <mikulas@artax\&.karlin\&.mff\&.cuni\&.cz>\&. \fIELinks\fR was written by Petr Baudis <pasky@ucw\&.cz>\&. See file AUTHORS in the source tree for a list of people contributing to this project\&.
The homepage of \fIELinks\fR can be found at <http://elinks\&.or\&.cz/>\&.
This manual page was written by Peter Gervai <grin@tolna\&.net>, using excerpts from a (yet?) unknown \fILinks\fR fan for the \fIDebian GNU/Linux system\fR (but may be used by others)\&. Contributions from Francis A\&. Holop\&. Extended, clarified and made more up\-to\-date by Petr Baudis <pasky@ucw\&.cz>\&. Updated by Zas <zas@norz\&.org>\&. The conversion to Asciidoc and trimming was done by Jonas Fonseca <fonseca@diku\&.dk>\&.
.SH "SEE ALSO"
elinkskeys(5), elinks\&.conf(5), links(1), lynx(1), w3m(1), wget(1)
\fBelinkskeys\fR(5), \fBelinks\&.conf\fR(5), \fBlinks\fR(1), \fBlynx\fR(1), \fBw3m\fR(1), \fBwget\fR(1)

File diff suppressed because it is too large Load Diff

View File

@ -17,7 +17,7 @@
.el .ne 3
.IP "\\$1" \\$2
..
.TH "ELINKSKEYS" 5 "ELinks keybindings" "2006-01-10" "ELinks keybindings"
.TH "ELINKSKEYS" 5 "ELinks keybindings" "2006-01-29" "ELinks keybindings"
.SH NAME
elinkskeys \- keybindings for ELinks
.SH "SYNOPSIS"
@ -28,7 +28,7 @@ Information on how to configure keybinding and overview of the default keybindin
.SH "DESCRIPTION"
Key binding for elinks should be placed in a file called ~/\&.elinks/elinks\&.conf\&. Note that any information regarding their format/structure may not be up\-to\-date\&. If you will discover that, please feed us with a patch\&.
Key binding for elinks should be placed in the file ~/\&.elinks/elinks\&.conf\&. Note that any information regarding their format/structure may not be up\-to\-date\&. If you will discover that, please feed us with a patch\&.
Key binding statements are of the form:
@ -42,7 +42,7 @@ where:
.TP
<keymap>
is \fImain\fR, \fIedit\fR, or \fImenu\fR\&.
is \fImain\fR, \fIedit\fR, or \fImenu\fR\&. The main keymap is used for general browsing\&. The edit keymap is used for editing text fields\&. The menu keymap is used for navigating menus\&.
.TP
<keystroke>
@ -89,10 +89,9 @@ Valid keys are: alphanumeric characters, punctuation, \fIEnter\fR, \fIBackspace\
Some keys will need to be quoted or escaped\&. For example, space can be written as " " (quote space quote), and the quote itself as \\" (backslash quote)\&. Backslash can be written as \\\\ (double backslash)\&.
.SS "MAIN KEYMAP ACTIONS"
.SH "KEYMAP ACTIONS"
The main keymap is used for general browsing\&.
.SS "MAIN ACTIONS"
.TP
abort\-connection
@ -538,10 +537,7 @@ Toggle wrapping of text\&.
view\-image
View the current image\&.
.SS "EDIT KEYMAP ACTIONS"
The edit keymap is used for editing text fields\&.
.SS "EDIT ACTIONS"
.TP
auto\-complete
@ -643,10 +639,7 @@ Toggle regex matching (type\-ahead searching)\&.
up
Move cursor upwards\&.
.SS "MENU KEYMAP ACTIONS"
The menu keymap is used for navigating menus\&.
.SS "MENU ACTIONS"
.TP
cancel
@ -1323,5 +1316,5 @@ This manual page was finally written by Peter Wang (one and a half years after w
.SH "SEE ALSO"
elinks(1), elinks\&.conf(5)
\fBelinks\fR(1), \fBelinks\&.conf\fR(5)

View File

@ -14,7 +14,7 @@ command-line arguments. The built-in documentation is sure to be up-to-date.
There was a complete (or, for the most part complete) manual for Links 0.82 at
one time, and you can still find it at:
http://links.sourceforge.net/docs/manual-0.82-en/index.html
- http://links.sourceforge.net/docs/manual-0.82-en/index.html[]
While large parts of it do not apply anymore, you may still find some relevant
information there.

View File

@ -4,6 +4,7 @@
# Copyright (c) Jonas Fonseca <fonseca@diku.dk>, 2005
#
CONFFILE="$1"
TMPFILE=$(mktemp import-features.conf.XXXXXX) || exit 1
strip_comment()
@ -53,7 +54,7 @@ __END__
fi
}
cat ../features.conf | while read line; do
cat "$CONFFILE" | while read line; do
case "$line" in
"### "*)
print_section

View File

@ -5,102 +5,25 @@
# and hopefully other in the future.
# Updated by option handlind via --elinks=path/to/elinks option
elinks="elinks"
# Utility functions {{{1
usage()
{
msg="$1"
echo "$msg" >&2
echo "`basename $0` ($script_version)" >&2
echo "Usage: $0 [ --cmdoptions | --elinksconf | - | --elinks=path/to/elinks ]" >&2
cat >&2 <<END_OF_USAGE
--cmdoptions Print asciidoc markup with summary of the command options
--elinksconf Print the elinks.conf.5 manpage
- Read option info (elinks --config-help) from stdin
--elinks=path Use the elinks program with the given path
END_OF_USAGE
exit -1
}
elinks="$1"
option="$2"
# Option handling {{{1
command=
filter=cat
prev_option=
for option
do
# If the previous option needs an argument, assign it.
if test -n "$prev_option"; then
eval "$prev_option=\$option"
prev_option=
continue
fi
case "$option" in
--cmdoptions)
command="$elinks -long-help"
case "$option" in
*command*)
filter="sed 0,/^Options:/d"
backend="cmdoptions"
option=--long-help
;;
--elinksconf)
command="$elinks -config-help"
*config*)
filter="sed 0,/^Configuration/d"
backend="elinksconf"
option=--config-help
;;
-)
command="cat /dev/stdin"
;;
--elinks=*)
elinks="`echo $option | sed -e 's/.*=//'`"
;;
*)
usage "Unknown option"
;;
esac
done
esac
if test -z "$backend";
then
usage "No backend defined"
fi
date_string=`date -I`
script_version=`echo "\\$Revision: 1.19 $" | sed -e 's/\\$\(.*\) \\$/\1/'`
elinks_version="`$elinks -version | head -n 1 | sed -e 's/ELinks \([0-9][^ ]*\).*/\1/'`"
script_info="Generated by `basename $0` ($script_version) on $date_string"
script_info="$script_info using output from ELinks version $elinks_version."
dist_info="`basename $0` is distributed with ELinks under the terms of the GPL."
# Backends {{{1
print_header="print_${backend}_header"
print_footer="print_${backend}_footer"
print_description_end="print_${backend}_description_end"
print_description_line="print_${backend}_description_line"
print_option_tree="print_${backend}_option_tree"
print_option_type="print_${backend}_option_type"
# --cmdoptions backend {{{2
print_cmdoptions_header()
{
echo
}
print_cmdoptions_footer()
{
echo
}
print_cmdoptions_description_end()
{
echo
}
print_cmdoptions_description_line()
print_description_line()
{
line="$1"
number="$2"
@ -124,12 +47,14 @@ print_cmdoptions_description_line()
echo " $line"
}
print_cmdoptions_option_tree()
print_option_tree()
{
parse_description=
title="$1"
path="$2"
echo "$path::"
}
print_cmdoptions_option_type()
print_option_type()
{
path="$1"
typeid="$2"
@ -153,130 +78,10 @@ print_cmdoptions_option_type()
then
typestring="$default"
fi
echo "$typestring::"
}
# --elinksconf backend {{{2
print_elinksconf_header()
{
cat << __END__
.\" elinks.conf.5
.\"
.\" $script_info
.\"
.\" Copyleft (c) 2002-2004 The ELinks project
.\"
.\" This file may be distributed under the terms of the GNU
.\" General Public License. <www.gnu.org/licenses/gpl.html>
.\"
.\" Process this file with groff -man -Tascii elinks.conf.5
.TH ELINKS.CONF 5 "ELinks configuration file" "$date_string" "ELinks configuration file"
.SH NAME
elinks.conf \- ELinks configuration file
.SH DESCRIPTION
.PP
The
.B elinks.conf
file contains configuration information for ELinks. It can be used to configure
the behaviour of ELinks in a wide variety of ways: protocol behaviour,
keybindings, colors used for rendering and for the user interface.
.PP
It is read at startup and saved only when requested. All options described in
this document can be fully configured from within ELinks so no editing of
elinks.conf is needed.
.PP
Note that MIME-related options used for specifying handlers of various MIME
types are NOT described in this document. Documentation for these options can be
found at the ELinks homepage. Keybindings can also be specified in elinks.conf.
This is described in the elinkskeys(5) man page.
.SH SYNTAX
.PP
The syntax of the configuration file is very simple. The elinks.conf file is a
free-form ASCII text file. The file may contain extra tabs and newlines for
formatting purposes. Keywords in the file are case-sensitive. Comments may be
placed anywhere within the file (except within quotes). Comments begin with the
# character and end at the end of the line.
.SH EXAMPLES
.PP
Some sample settings:
.IP
.nf
# Use asynchronous DNS resolver?
set connection.async_dns = 1
# horizontal text margin.
set document.browse.margin_width = 3
# Default document codepage.
set document.codepage.assume = "ISO-8859-1"
# User defined protocol handlers
set protocol.user.mailto.unix = "mutt %h -s \e\*(lq%s\e\*(rq"
.SH OPTIONS
__END__
}
elinks=
print_elinksconf_footer()
{
version="$1"
echo ".SH \"DOCUMENT INFO\""
echo ".PP"
echo "$script_info"
echo "$dist_info"
echo ".SH \"SEE ALSO\""
echo ".BR elinks (1),"
echo ".BR elinkskeys (5)"
}
print_elinksconf_description_end()
{
if test -n "$parse_int_option";
then
echo ".PD"
echo ".RE"
fi
}
print_elinksconf_description_line()
{
line="$1"
number="$2"
if test -n "$number";
then
if test "$parse_int_option" = "1";
then
echo ".RS"
echo ".PD 0"
parse_int_option=2
fi
echo ".TP"
echo ".B $number"
fi
echo "$line"
}
print_elinksconf_option_tree()
{
title="$1"
path="$2"
echo ".SS $title ($path)"
}
print_elinksconf_option_type()
{
path="$1"
typeid="$2"
default="$3"
echo ".TP"
echo "\\f3$path\\f2 $typeid\\f1 ($default)"
}
# The main loop {{{1
@ -285,9 +90,7 @@ parse_description=
parse_int_option=
use_log=
$print_header
$command | $filter | while read line
"$elinks" $option | $filter | while read line
do
if test -n "$parse_description"
then
@ -295,13 +98,14 @@ do
# the desciption is over.
if test -z "$line"
then
$print_description_end
echo
parse_description=
parse_int_option=
continue
fi
line=`echo "$line" | sed -e "s/[ ]*(DISABLED)//"`
line=`echo "$line" | sed 's/\([{}]\)/\\\\\1/g'`
number=
if test -n "$parse_int_option";
then
@ -318,7 +122,7 @@ do
esac
fi
$print_description_line "$line" "$number"
print_description_line "$line" "$number"
continue
fi
@ -329,7 +133,7 @@ do
parse_description=1
title="`echo $line | sed -e 's/\([A-Z]*\):.*/\1/'`"
path="`echo $line | sed -e 's/.*: (\([a-z_].*\))/\1/'`"
$print_option_tree "$title" "$path"
print_option_tree "$title" "$path"
;;
[a-z_-]*[.a-z_-]*)
@ -337,7 +141,7 @@ do
path="`echo $line | sed -e 's/\([a-z-][^ ]*\).*/\1/'`"
typeid="`echo $line | sed -e 's/[ ]*[a-z-][^ ]* \([^ ]*\).*/\1/'`"
default="`echo \"$line\" | sed -e 's/[^(]*(\(.*\))/\1/'`"
$print_option_type "$path" "$typeid" "$default"
print_option_type "$path" "$typeid" "$default"
if test "$typeid" = "<num>";
then
parse_int_option=1
@ -349,6 +153,7 @@ do
esac
done
$print_footer
version="`$elinks -version | head -n 1 | sed -e 's/ELinks \([0-9][^ ]*\).*/\1/'`"
echo "Generated using output from ELinks version $version."
# vim: tabstop=4 shiftwidth=4

130
doc/tools/keys2doc Executable file
View File

@ -0,0 +1,130 @@
#!/bin/sh
#
# Generate the keymap-actions.txt and keymap-defaults.txt for elinkskeys(5)
# manpage.
#
# Copyright (c) Jonas Fonseca <fonseca@diku.dk>, 2005-2006
#
KBDBIND=$1
CONFIGDIR=$(dirname "$KBDBIND")
OUTPUT=$2
test -d "$CONFIGDIR" || exit
print_title()
{
echo
echo "$1" | tr 'a-z' 'A-Z'
echo "$1" | sed 's/[^~]/~/g'
echo
}
print_keymap_actions()
{
keymap="$1"
print_title "$keymap ACTIONS"
echo 'ifdef::backend-xhtml11[]'
echo '`----------------------------------`----------------------------------------------------------------------------'
echo 'Action Description'
echo '----------------------------------------------------------------------------------------------------------------'
# open-link-in-new-tab-in-background
echo 'endif::backend-xhtml11[]'
grep ACTION_ "$CONFIGDIR/actions-$keymap.inc" \
| while read entry;
do
action=$(echo "$entry" | sed 's/ACTION_([^,]*, "\([^"]*\)".*/\1/')
caption=$(echo "$entry" | sed 's/.*N__("\(.*\)").*/\1/')
[ "$action" = "none" ] && continue
[ "$action" = " *scripting-function*" ] && continue
echo 'ifdef::backend-docbook[]'
echo "$action::"
echo " $caption."
echo
echo 'endif::backend-docbook[]'
echo 'ifdef::backend-xhtml11[]'
printf "%-34s %s\n" "$action" "$caption"
echo 'endif::backend-xhtml11[]'
done
echo 'ifdef::backend-xhtml11[]'
echo '---------------------------------------------------------------------------------------------------------------'
echo 'endif::backend-xhtml11[]'
}
print_keymap_defaults()
{
keymap="$1"
KEYMAP=$(echo $1 | tr '[a-z]' '[A-Z]')
print_title "$keymap KEYS"
echo 'ifdef::backend-xhtml11[]'
echo '`-----------`-------------------------------------------------------------------------------'
echo 'Key Description (Action)'
echo '--------------------------------------------------------------------------------------------'
# Ctrl-Insert
echo 'endif::backend-xhtml11[]'
grep ACT_$KEYMAP $KBDBIND | grep '^[[:space:]]{' | grep -v '{ "' \
| while read entry
do
entry=$(echo "$entry" | sed 's/.*{ { //' | sed 's/ }//')
key=$(echo "$entry" | sed "s/\(KBD_[^,]*\|'.*'\),.*/\1/")
modifier=$(echo "$entry" | sed "s/.*KBD_MOD_\([A-Z_]*\).*/\1/")
action=$(echo "$entry" | sed "s/.*,.*\(ACT_$KEYMAP\)_\([A-Z_]*\).*/\2/")
action=$(grep " $action," "$CONFIGDIR/actions-$keymap.inc" \
| sed "s/.*\"\([^\"]*\)\".*N__(\"\(.*\)\").*/\2 ('\1')/")
case "$key" in
KBD_*)
key=$(grep $key $KBDBIND \
| grep '^[[:space:]]{ "' \
| sed 's/.*"\([^"]*\)".*/\1/')
;;
"' '")
key="Space"
;;
*)
key=$(echo "$key" | sed "s/^'\(.*\)'$/\1/" \
| sed "s/'/{squote}/")
;;
esac
case "$modifier" in
ALT) modifier="Alt-" ;;
CTRL) modifier="Ctrl-" ;;
*) modifier="" ;;
esac
echo 'ifdef::backend-docbook[]'
echo "'$modifier$key'::"
echo " $action"
echo
echo 'endif::backend-docbook[]'
echo 'ifdef::backend-xhtml11[]'
printf "%-11s %s\n" "$modifier$key" "$action"
echo 'endif::backend-xhtml11[]'
done
echo 'ifdef::backend-xhtml11[]'
echo '--------------------------------------------------------------------------------------------'
echo 'endif::backend-xhtml11[]'
}
print_keymap_doc=
case "$OUTPUT" in
*default*) print_keymap_doc="print_keymap_defaults" ;;
*action*) print_keymap_doc="print_keymap_actions" ;;
esac
$print_keymap_doc main
$print_keymap_doc edit
$print_keymap_doc menu

View File

@ -1,212 +0,0 @@
#!/bin/sh
#
# Generate the elinks(1) manpage.
# Copyright (c) Jonas Fonseca <fonseca@diku.dk>, 2005
#
DOCTYPE=$(echo "$1" | sed 's/.*elinks.1.//' | sed 's/.txt.*//')
ELINKS=$2
HELP2DOC=$3
GPL="http://www.gnu.org/copyleft/gpl.html"
link()
{
target="$1"; shift
[ "$1" ] && name="$@"
case "$DOCTYPE" in
man)
echo "$name <$target>"
;;
html)
echo "link:$target[$name]"
;;
esac
}
email()
{
email="$1"
case "$DOCTYPE" in
man)
echo "<$email>"
;;
html)
echo "mailto:$email[<$email>]"
;;
esac
}
man()
{
target="$1"
section="$2"
case "$DOCTYPE" in
man)
echo "\`$target($section)\`"
;;
html)
echo "link:$target.$section.html[\`$target($section)\`]"
;;
esac
}
print_command_options()
{
$HELP2DOC --cmdoptions --elinks=$ELINKS
}
cat << __END__
elinks(1)
=========
NAME
----
elinks - lynx-like alternative character mode WWW browser
SYNOPSIS
--------
'elinks' [OPTION]... [URL]...
DESCRIPTION
-----------
'ELinks' is a text mode WWW browser, supporting colors, table rendering,
background downloading, menu driven configuration interface, tabbed browsing
and slim code.
Frames are supported. You can have different file formats associated with
external viewers. \`mailto:\` and \`telnet:\` are supported via external
clients.
ELinks can handle both local files and remote URLs. The main supported
remote URL protocols are 'HTTP', 'HTTPS' (with SSL support compiled in) and
'FTP'. Additional protocol support exists for 'finger', 'Gopher', 'SMB'
and 'NNTP'.
OPTIONS
-------
Most options can be set in the user interface or config file, so usually you
do not need to care about them. Note that this list is by no means complete
and it is not kept up-to-date. To get complete list of commandline options,
start 'ELinks' with parameter \`--help\`.
$(print_command_options)
ENVIRONMENT VARIABLES
---------------------
COMSPEC, SHELL::
The shell used for File -> OS Shell on DOS/Windows and UNIX,
respectively.
EDITOR::
The program to use for external editor (when editing textareas).
ELINKS_CONFDIR::
The location of the directory containing configuration files.
If not set the default is \`~/.elinks/\`.
ELINKS_TWTERM, LINKS_TWTERM::
The command to run when selecting File -> New window and if
\`TWDISPLAY\` is defined (default \`twterm -e\`)
ELINKS_XTERM, LINKS_XTERM::
The command to run when selecting File -> New window and if
\`DISPLAY\` is defined (default \`xterm -e\`)
FTP_PROXY, HTTP_PROXY, HTTPS_PROXY::
The host to proxy the various protocol traffic through.
NO_PROXY::
A comma separated list of URLs which should not be proxied.
HOME::
The path to the users home directory. Used when expanding \`~/\`.
WWW_HOME::
Homepage location (as in \`lynx(1)\`)
FILES
-----
@sysconfdir@/elinks.conf::
Site-wide configuration file.
~/.elinks/elinks.conf::
Per-user config file, loaded after site-wide configuration.
~/.elinks/bookmarks::
Bookmarks file.
~/.elinks/cookies::
Cookies file.
~/.elinks/formhist::
Form history file.
~/.elinks/gotohist::
GoTo URL dialog history file.
~/.elinks/globhist::
History file containing most recently visited URLs.
~/.elinks/searchhist::
Search history file.
~/.elinks/socket::
Internal 'ELinks' socket for communication between its instances.
PLATFORMS
---------
'ELinks' is known to work on 'Linux', 'FreeBSD', 'OpenBSD', 'Solaris',
'IRIX', 'HPUX', 'Digital Unix', 'AIX', 'OS/2', 'BeOS' and 'RISC OS'. Port
for 'Win32' is in state of beta testing.
BUGS
----
Please report any other bugs you find to the either the ELinks mailing list
at $(email elinks-users@linuxfromscratch.org) or if you prefer enter them
into $(link http://bugzilla.elinks.or.cz/ the bug tracking system). More
information about how to get in contact with developers and getting help can
be found on $(link http://elinks.or.cz/community.html the community page).
LICENSE
-------
'ELinks' is free software; you can redistribute it and/or modify it under
the terms of $(link $GPL the GNU General Public License) as published by the
Free Software Foundation; version 2 of the License.
AUTHORS
-------
The 'Links' browser - on which 'ELinks' is based - was written by Mikulas
Patocka $(email mikulas@artax.karlin.mff.cuni.cz). 'ELinks' was written by
Petr Baudis $(email pasky@ucw.cz). See file \`AUTHORS\` in the source tree
for a list of people contributing to this project.
The homepage of 'ELinks' can be found at $(link http://elinks.or.cz/).
This manual page was written by Peter Gervai $(email grin@tolna.net), using
excerpts from a (yet?) unknown 'Links' fan for the 'Debian GNU/Linux system'
(but may be used by others). Contributions from Francis A. Holop. Extended,
clarified and made more up-to-date by Petr Baudis $(email pasky@ucw.cz).
Updated by Zas $(email zas@norz.org). The conversion to Asciidoc and
trimming was done by Jonas Fonseca $(email fonseca@diku.dk).
SEE ALSO
--------
$(man elinkskeys 5), \`elinks.conf(5)\`, \`links(1)\`, \`lynx(1)\`,
\`w3m(1)\`, \`wget(1)\`
__END__
# vim: tabstop=4 shiftwidth=4 textwidth=76

View File

@ -1,289 +0,0 @@
#!/bin/sh
#
# Generate the elinkskeys(5) manpage.
# Copyright (c) Jonas Fonseca <fonseca@diku.dk>, 2005
#
# FIXME:
#
# - You may prefix each of these keys with a number, telling its repeat
# count (how many times to do it). You can also re-bind keys, see
# elinkskeys(5) for documentation and a more complete list of keys bound by
# default.
#
# - The following keys can be used while editing a line/jumping to a URL
DOCTYPE=$(echo "$1" | sed 's/.*elinkskeys.5.//' | sed 's/.txt.*//')
KBDBIND=$2
CONFIGDIR=$(dirname "$2")
link()
{
target="$1"; shift
[ "$1" ] && name="$@"
case "$DOCTYPE" in
man)
echo "$name <$target>"
;;
html)
echo "link:$target[$name]"
;;
esac
}
man()
{
target="$1"
section="$2"
case "$DOCTYPE" in
man)
echo "\`$target($section)\`"
;;
html)
echo "link:$target.$section.html[\`$target($section)\`]"
;;
esac
}
print_keymap_actions()
{
keymap=$1
case "$DOCTYPE" in
html)
# open-link-in-new-tab-in-background
echo '`----------------------------------`----------------------------------------------------------------------------'
echo 'Action Description'
echo '----------------------------------------------------------------------------------------------------------------'
;;
esac
grep ACTION_ "$CONFIGDIR/actions-$keymap.inc" \
| while read entry;
do
action=$(echo "$entry" | sed 's/ACTION_([^,]*, "\([^"]*\)".*/\1/')
caption=$(echo "$entry" | sed 's/.*N__("\(.*\)").*/\1/')
[ "$action" = "none" ] && continue
[ "$action" = " *scripting-function*" ] && continue
case "$DOCTYPE" in
man)
echo
echo "$action::"
echo " $caption."
;;
html)
printf "%-34s %s\n" "$action" "$caption"
;;
esac
done
case "$DOCTYPE" in
html)
echo '---------------------------------------------------------------------------------------------------------------'
;;
esac
}
print_keymap_defaults()
{
keymap="$1"
KEYMAP=$(echo $1 | tr '[a-z]' '[A-Z]')
case "$DOCTYPE" in
html)
# Ctrl-Insert
echo '`-----------`-------------------------------------------------------------------------------'
echo 'Key Description (Action)'
echo '--------------------------------------------------------------------------------------------'
;;
esac
grep ACT_$KEYMAP $KBDBIND | grep '^[[:space:]]{' | grep -v '{ "' \
| while read entry
do
entry=$(echo "$entry" | sed 's/.*{ { //' | sed 's/ }//')
key=$(echo "$entry" | sed "s/\(KBD_[^,]*\|'.*'\),.*/\1/")
modifier=$(echo "$entry" | sed "s/.*KBD_MOD_\([A-Z_]*\).*/\1/")
action=$(echo "$entry" | sed "s/.*,.*\(ACT_$KEYMAP\)_\([A-Z_]*\).*/\2/")
action=$(grep " $action," "$CONFIGDIR/actions-$keymap.inc" \
| sed "s/.*\"\([^\"]*\)\".*N__(\"\(.*\)\").*/\2 ('\1')/")
case "$key" in
KBD_*)
key=$(grep $key $KBDBIND \
| grep '^[[:space:]]{ "' \
| sed 's/.*"\([^"]*\)".*/\1/')
;;
"' '")
key="Space"
;;
*)
key=$(echo "$key" | sed "s/^'\(.*\)'/\1/" \
| sed "s/'/\\\\'/")
;;
esac
case "$modifier" in
ALT) modifier="Alt-" ;;
CTRL) modifier="Ctrl-" ;;
*) modifier="" ;;
esac
case "$DOCTYPE" in
man)
echo
echo "'$modifier$key'::"
echo " $action"
;;
html)
printf "%-11s %s\n" "$modifier$key" "$action"
;;
esac
done
case "$DOCTYPE" in
html)
echo '--------------------------------------------------------------------------------------------'
;;
esac
}
cat << __END__
elinkskeys(5)
=============
NAME
----
elinkskeys - keybindings for ELinks
SYNOPSIS
--------
Information on how to configure keybinding and overview of the default
keybindings.
DESCRIPTION
-----------
Key binding for elinks should be placed in a file called
~/.elinks/elinks.conf. Note that any information regarding their
format/structure may not be up-to-date. If you will discover that, please
feed us with a patch.
Key binding statements are of the form:
bind <keymap> <keystroke> = <action>
where:
<keymap>::
is 'main', 'edit', or 'menu'.
<keystroke>::
is a case sensitive key, which you can prefix with 'Ctrl-' or 'Alt-'.
'Ctrl-' must be followed by an uppercase key. See below for a list of
valid keys.
<action>::
is what the key should do. The actions available are dependent on the
keymap, and are listed separately below.
All words/strings may all be quoted "like so". Backslashes are escape
characters, even if not between quotes. Lines beginning with a hash
character (\`#\`) are comments.
Keys can be unbound just by binding them to the special 'none' action. It
may be of use if you accidentally type a key often.
EXAMPLE BINDINGS
----------------
Some sample keybindings:
bind "main" "v" = "view-image"
bind "main" "l" = "jump-to-link"
bind "main" "L" = "link-menu"
bind "main" "F10" = "file-menu"
bind "main" "F9" = "menu"
bind "main" "Escape" = "menu"
bind "edit" "Ctrl-R" = "auto-complete-unambiguous"
bind "edit" "Ctrl-W" = "auto-complete"
bind "edit" "Ctrl-K" = "kill-to-eol"
bind "menu" "Ctrl-B" = "page-up"
bind "menu" "PageUp" = "page-up"
bind "menu" "Ctrl-F" = "page-down"
bind "menu" "PageDown" = "page-down"
# ELinks with Lua support
bind "main" "," = "lua-console"
KEYS
----
Valid keys are: alphanumeric characters, punctuation, 'Enter', 'Backspace',
'Tab', 'Escape', 'Left', 'Right', 'Up', 'Down', 'Insert', 'Delete', 'Home',
'End', 'PageUp', 'PageDown', 'F1' to 'F12'.
Some keys will need to be quoted or escaped. For example, space can be
written as \`" "\` (quote space quote), and the quote itself as \\"
(backslash quote). Backslash can be written as \\\\ (double backslash).
MAIN KEYMAP ACTIONS
~~~~~~~~~~~~~~~~~~~
The main keymap is used for general browsing.
$(print_keymap_actions main)
EDIT KEYMAP ACTIONS
~~~~~~~~~~~~~~~~~~~
The edit keymap is used for editing text fields.
$(print_keymap_actions edit)
MENU KEYMAP ACTIONS
~~~~~~~~~~~~~~~~~~~
The menu keymap is used for navigating menus.
$(print_keymap_actions menu)
DEFAULT BINDINGS
----------------
The default bindings are shown below. Any bindings in
\`~/.elinks/elinks.conf\` will override these.
MAIN KEYS
~~~~~~~~~
$(print_keymap_defaults main)
EDIT KEYS
~~~~~~~~~
$(print_keymap_defaults edit)
MENU KEYS
~~~~~~~~~
$(print_keymap_defaults menu)
AUTHOR
------
This manual page was finally written by Peter Wang (one and a half years
after writing the binding code), using excerpts by David Mediavilla. You can
thank Petr Baudis for the subtle requests for documentation. Updated by Zas.
Moved to asciidoc format and cleaned up by Jonas Fonseca.
SEE ALSO
--------
$(man elinks 1), \`elinks.conf(5)\`
__END__