From 61b6491b8b4ca6003166d6533d2518a7a1db26dc Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sun, 24 May 2009 23:26:15 +1000 Subject: [PATCH] Add all.html for viewing all help in a single page. This is all really inside out. It would be much better to store the help in a single file and use asciidoc/docbook's capabilities to split it if desired. --- common/Makefile.doc | 11 ++++---- vimperator/NEWS | 1 + vimperator/content/config.js | 2 +- vimperator/locale/en-US/asciidoc.conf | 32 ++++++++++++++++++------ vimperator/locale/en-US/autocommands.txt | 4 +-- vimperator/locale/en-US/browsing.txt | 4 +-- vimperator/locale/en-US/buffer.txt | 4 +-- vimperator/locale/en-US/cmdline.txt | 4 +-- vimperator/locale/en-US/developer.txt | 2 +- vimperator/locale/en-US/eval.txt | 4 +-- vimperator/locale/en-US/gui.txt | 4 +-- vimperator/locale/en-US/hints.txt | 4 +-- vimperator/locale/en-US/index.txt | 6 ++--- vimperator/locale/en-US/insert.txt | 4 +-- vimperator/locale/en-US/map.txt | 4 +-- vimperator/locale/en-US/marks.txt | 4 +-- vimperator/locale/en-US/message.txt | 2 +- vimperator/locale/en-US/options.txt | 4 +-- vimperator/locale/en-US/pattern.txt | 4 +-- vimperator/locale/en-US/print.txt | 4 +-- vimperator/locale/en-US/repeat.txt | 6 ++--- vimperator/locale/en-US/starting.txt | 2 +- vimperator/locale/en-US/styling.txt | 4 +-- vimperator/locale/en-US/tabs.txt | 4 +-- vimperator/locale/en-US/tutorial.txt | 6 ++--- vimperator/locale/en-US/various.txt | 4 ++- 26 files changed, 60 insertions(+), 74 deletions(-) diff --git a/common/Makefile.doc b/common/Makefile.doc index 68f2cf06..e340791f 100644 --- a/common/Makefile.doc +++ b/common/Makefile.doc @@ -50,13 +50,14 @@ check-asciidoc: @$(ASCIIDOC) --version | $(AWK) '{ exit $$2 !~ /^8\.2\./ }' || \ echo >&2 "Warning: asciidoc versions other than 8.2.x are unsupported" -$(ADC_FILES): %.html: %.txt $(BASE)/Makefile.doc $(ADC_DEPS) - @echo "DOC locale/$(LOCALE)/$@" - $(ASCIIDOC) --unsafe -a linkcss -a quirks! -a lang=$(DOCLANG) -a doctitle="$(shell basename $@)" -o $@ $< - version.html: ../../NEWS $(BASE)/Makefile.doc $(ADC_DEPS) @echo "DOC locale/$(LOCALE)/$@" # NOTE: asciidoc doesn't source the conf file implicitly when processing stdin sed -e '1i\ -HEADER' -e '/^[0-9]/d' -e '/^ \+\* version /s/.*version \+\([0-9.]\+\).*/section:Version{nbsp}\1[version-\1]\ +heading:Version{nbsp}information[version-information]' -e '/^[0-9]/d' -e '/^ \+\* version /s/.*version \+\([0-9.]\+\).*/section:Version{nbsp}\1[version-\1]\ /' ../../NEWS | ${ASCIIDOC} -f asciidoc.conf -a doctitle=version.html -o version.html - + +$(ADC_FILES): %.html: %.txt $(BASE)/Makefile.doc $(ADC_DEPS) + @echo "DOC locale/$(LOCALE)/$@" + $(ASCIIDOC) --unsafe -a linkcss -a quirks! -a lang=$(DOCLANG) -a doctitle="$(shell basename $@)" -o $@ $< + diff --git a/vimperator/NEWS b/vimperator/NEWS index 88b2621b..23931bf6 100644 --- a/vimperator/NEWS +++ b/vimperator/NEWS @@ -3,6 +3,7 @@ * add @: mapping - repeat the last Ex command * add \ mapping - toggle between rendered and source view * add ;c extended hint mode - open the context menu + * :help all now shows all help sections in a single page 2009-05-21: * version 2.1 diff --git a/vimperator/content/config.js b/vimperator/content/config.js index cad178f7..1d088c48 100644 --- a/vimperator/content/config.js +++ b/vimperator/content/config.js @@ -119,7 +119,7 @@ const config = { //{{{ "pattern.html", "tabs.html", "hints.html", "map.html", "eval.html", "marks.html", "repeat.html", "autocommands.html", "print.html", "gui.html", "styling.html", "message.html", "developer.html", - "various.html", "index.html", "version.html" + "various.html", "version.html", "index.html", "all.html" ], get ignoreKeys() { diff --git a/vimperator/locale/en-US/asciidoc.conf b/vimperator/locale/en-US/asciidoc.conf index 48ffb933..f52b207d 100644 --- a/vimperator/locale/en-US/asciidoc.conf +++ b/vimperator/locale/en-US/asciidoc.conf @@ -18,30 +18,48 @@ email=stubenschrott@vimperator.org {doctitle} -

+
{doctitle} -

+ [replacements] LOGO=
-HEADER=
\[count\]=[count] \[!\]=[!] [macros] +# heading:Page{nbsp}Heading[tag1,tag2] +(?su)(?.+?)\|(?!\+)=heading # section:Introduction[tag1,tag2] (?su)(?.+?)\|(?!\+)=section # help:helptext[href] (?su)(?.+?)\|(?!\+)=help -# maximum 3 tags for now -[section-inlinemacro] +# FIXME: this logo/donation banner is really ugly. --djk +[heading-inlinemacro] +{outfile@.*(intro|all).html::
} - + + + + +

{target}

+
<{outfile@.*all.html:h2:h1 style="border\: none"}>{target} {3? {3}} {2? {2}} {1? {1}} -
+ +# maximum 3 tags for now +[section-inlinemacro] + + + + +
<{outfile@.*all.html:h3:h2}>{target} +{3? {3}} +{2? {2}} +{1? {1}} +
[help-inlinemacro] diff --git a/vimperator/locale/en-US/autocommands.txt b/vimperator/locale/en-US/autocommands.txt index 36104b56..a2bed93c 100644 --- a/vimperator/locale/en-US/autocommands.txt +++ b/vimperator/locale/en-US/autocommands.txt @@ -1,6 +1,4 @@ -HEADER - -|autocommands| + +heading:Automatic{nbsp}commands[autocommands] Autocommands are a way to automatically execute code when certain events happen. diff --git a/vimperator/locale/en-US/browsing.txt b/vimperator/locale/en-US/browsing.txt index a6becad1..c32697dd 100644 --- a/vimperator/locale/en-US/browsing.txt +++ b/vimperator/locale/en-US/browsing.txt @@ -1,6 +1,4 @@ -HEADER - -|surfing| |browsing| + +heading:Browsing[surfing,browsing] Vimperator overrides nearly all Firefox keys in order to make browsing more pleasant for Vim users. On the rare occasions when you want to pass a keystroke diff --git a/vimperator/locale/en-US/buffer.txt b/vimperator/locale/en-US/buffer.txt index 8029020d..40fac01d 100644 --- a/vimperator/locale/en-US/buffer.txt +++ b/vimperator/locale/en-US/buffer.txt @@ -1,6 +1,4 @@ -HEADER - -|buffer| |document| + +heading:Buffer[buffer,document] Vimperator holds exactly one buffer object for each tab. It is usually an (X)HTML document with advanced features. diff --git a/vimperator/locale/en-US/cmdline.txt b/vimperator/locale/en-US/cmdline.txt index 3ee75fef..d6259600 100644 --- a/vimperator/locale/en-US/cmdline.txt +++ b/vimperator/locale/en-US/cmdline.txt @@ -1,6 +1,4 @@ -HEADER - -|Command-line-mode| |Command-line| |mode-cmdline| + +heading:Command-line{nbsp}mode[Command-line-mode,Command-line,mode-cmdline] Command-line mode is used to enter Ex commands ("[m]:[m]") and text search patterns ("[m]/[m]" and "[m]?[m]"). diff --git a/vimperator/locale/en-US/developer.txt b/vimperator/locale/en-US/developer.txt index cf875d82..331dfe41 100644 --- a/vimperator/locale/en-US/developer.txt +++ b/vimperator/locale/en-US/developer.txt @@ -1,4 +1,4 @@ -HEADER +heading:Developer{nbsp}information[developer-information] section:Writing{nbsp}documentation[writing-docs,documentation] diff --git a/vimperator/locale/en-US/eval.txt b/vimperator/locale/en-US/eval.txt index bbc0d5ba..9fc67025 100644 --- a/vimperator/locale/en-US/eval.txt +++ b/vimperator/locale/en-US/eval.txt @@ -1,6 +1,4 @@ -HEADER - -|expression| |expr| |eval| + +heading:Expression{nbsp}evaluation[expression,expr,eval] INTRO TO BE WRITTEN... diff --git a/vimperator/locale/en-US/gui.txt b/vimperator/locale/en-US/gui.txt index bec1f78b..bcaa3b7a 100644 --- a/vimperator/locale/en-US/gui.txt +++ b/vimperator/locale/en-US/gui.txt @@ -1,6 +1,4 @@ -HEADER - -|gui| + +heading:Vimperator's{nbsp}GUI[gui] Although Vimperator offers the most frequently used Firefox functionality via Ex and Normal mode commands there may be times when directly accessing the GUI diff --git a/vimperator/locale/en-US/hints.txt b/vimperator/locale/en-US/hints.txt index 6b105f4e..b4e5bd37 100644 --- a/vimperator/locale/en-US/hints.txt +++ b/vimperator/locale/en-US/hints.txt @@ -1,6 +1,4 @@ -HEADER - -|quick-hints| |hints| + +heading:Hints[quick-hints,hints] Hints are the way in which Vimperator allows you to follow links on a page. By providing each link with a suitable hint, you can access all links with a diff --git a/vimperator/locale/en-US/index.txt b/vimperator/locale/en-US/index.txt index e39156d0..f81dc37f 100644 --- a/vimperator/locale/en-US/index.txt +++ b/vimperator/locale/en-US/index.txt @@ -1,8 +1,6 @@ -HEADER +heading:Index[index] -|index| + - -This file contains a list of all available commands. +This file contains a list of all available commands, mappings and options. section:Insert{nbsp}mode[insert-index] diff --git a/vimperator/locale/en-US/insert.txt b/vimperator/locale/en-US/insert.txt index c49d440e..d5920d7c 100644 --- a/vimperator/locale/en-US/insert.txt +++ b/vimperator/locale/en-US/insert.txt @@ -1,6 +1,4 @@ -HEADER - -|Insert-mode| |Insert| |mode-insert| + +heading:Insert{nbsp}mode[Insert-mode,Insert,mode-insert] Insert mode is used to enter text in text boxes and text areas. When 'insertmode' is set, focusing on a text area immediately switches to diff --git a/vimperator/locale/en-US/map.txt b/vimperator/locale/en-US/map.txt index 136a85f0..c84138c0 100644 --- a/vimperator/locale/en-US/map.txt +++ b/vimperator/locale/en-US/map.txt @@ -1,6 +1,4 @@ -HEADER - -Key mappings, abbreviations, and user-defined commands. +heading:Key{nbsp}mappings,{nbsp}abbreviations,{nbsp}and{nbsp}user-defined{nbsp}commands.[] section:Key{nbsp}mapping[key-mapping,mapping,macro] diff --git a/vimperator/locale/en-US/marks.txt b/vimperator/locale/en-US/marks.txt index 7a6e1239..5c31d92c 100644 --- a/vimperator/locale/en-US/marks.txt +++ b/vimperator/locale/en-US/marks.txt @@ -1,6 +1,4 @@ -HEADER - -|different-marks| |marks| + +heading:Marks[different-marks,marks] Vimperator supports a number of different marks: diff --git a/vimperator/locale/en-US/message.txt b/vimperator/locale/en-US/message.txt index f7c18f9b..6999573d 100644 --- a/vimperator/locale/en-US/message.txt +++ b/vimperator/locale/en-US/message.txt @@ -1,4 +1,4 @@ -HEADER +heading:Error{nbsp}and{nbsp}informational{nbsp}messages[messages] |message-history| + diff --git a/vimperator/locale/en-US/options.txt b/vimperator/locale/en-US/options.txt index bee73ed1..3565a775 100644 --- a/vimperator/locale/en-US/options.txt +++ b/vimperator/locale/en-US/options.txt @@ -1,6 +1,4 @@ -HEADER - -|options| + +heading:Options[options] Vimperator has a number of internal variables and switches which can be set to achieve special effects. These options come in 5 forms: diff --git a/vimperator/locale/en-US/pattern.txt b/vimperator/locale/en-US/pattern.txt index 6462a897..0b928944 100644 --- a/vimperator/locale/en-US/pattern.txt +++ b/vimperator/locale/en-US/pattern.txt @@ -1,6 +1,4 @@ -HEADER - -|text-search-commands| + +heading:Text{nbsp}search{nbsp}commands[text-search-commands] Vimperator provides a Vim-like interface to Firefox's standard text search functionality. There is no support for using regular expressions in search diff --git a/vimperator/locale/en-US/print.txt b/vimperator/locale/en-US/print.txt index 8cf3d180..6059f6d8 100644 --- a/vimperator/locale/en-US/print.txt +++ b/vimperator/locale/en-US/print.txt @@ -1,6 +1,4 @@ -HEADER - -|printing| + +heading:Printing[printing] |:ha| |:hardcopy| + ||:ha[rdcopy][!]|| diff --git a/vimperator/locale/en-US/repeat.txt b/vimperator/locale/en-US/repeat.txt index 64fdef07..ab94260a 100644 --- a/vimperator/locale/en-US/repeat.txt +++ b/vimperator/locale/en-US/repeat.txt @@ -1,10 +1,8 @@ -HEADER - -|repeat| + +heading:Repeating{nbsp}commands[repeating] Vimperator can repeat a number of commands and record macros. -section:Single{nbsp}repates[single-repeat] +section:Single{nbsp}repeats[single-repeat] |.| ||[count].|| diff --git a/vimperator/locale/en-US/starting.txt b/vimperator/locale/en-US/starting.txt index ed51c649..010d21b9 100644 --- a/vimperator/locale/en-US/starting.txt +++ b/vimperator/locale/en-US/starting.txt @@ -1,4 +1,4 @@ -HEADER +heading:Starting{nbsp}Vimperator[starting] Vimperator does not yet read any command-line options. When it does, they will be documented here. diff --git a/vimperator/locale/en-US/styling.txt b/vimperator/locale/en-US/styling.txt index 87de57cb..05acc557 100644 --- a/vimperator/locale/en-US/styling.txt +++ b/vimperator/locale/en-US/styling.txt @@ -1,6 +1,4 @@ -HEADER - -|styling| + +heading:Styling{nbsp}the{nbsp}GUI{nbsp}and{nbsp}web{nbsp}pages[styling] Vimperator allows you to style both the browser and any web pages you view. All styling is specified via CSS. Although you may style any user interface element diff --git a/vimperator/locale/en-US/tabs.txt b/vimperator/locale/en-US/tabs.txt index 8f19414a..dd625c57 100644 --- a/vimperator/locale/en-US/tabs.txt +++ b/vimperator/locale/en-US/tabs.txt @@ -1,6 +1,4 @@ -HEADER - -|tabs| + +heading:Tabs[tabs] Tabs are used to be able to view many web pages at the same time. Each tab contains exactly one buffer -- multiple buffers per tab are not supported. As a diff --git a/vimperator/locale/en-US/tutorial.txt b/vimperator/locale/en-US/tutorial.txt index f85af34f..d9e4dae7 100644 --- a/vimperator/locale/en-US/tutorial.txt +++ b/vimperator/locale/en-US/tutorial.txt @@ -1,14 +1,12 @@ -HEADER - // Initial revision: Sun Jun 8 10:07:05 UTC 2008 (penryu) +heading:Quick-start{nbsp}tutorial[tutorial] + +++
+++ *This is a quickstart tutorial to help get new users up and running in Vimperator. It is not intended as a full reference explaining all features.* +++
+++ -section:Quick-start{nbsp}tutorial[tutorial] - If you've started using Vimperator from scratch (i.e., without any customization), you should be looking at this help page in a relatively bare-looking window. The menubar, navigation bar, and bookmark bars are hidden. diff --git a/vimperator/locale/en-US/various.txt b/vimperator/locale/en-US/various.txt index 67ee6e2f..94c8ba64 100644 --- a/vimperator/locale/en-US/various.txt +++ b/vimperator/locale/en-US/various.txt @@ -1,4 +1,4 @@ -HEADER +heading:Other{nbsp}help[] section:Various{nbsp}commands[various] @@ -64,6 +64,8 @@ ________________________________________________________________________________ Open help window. The default page, as specified by 'helpfile' is shown unless [a][subject][a] is specified. If you need help for a specific topic, try [c]:help overview[c]. + +All help pages can be viewed in a single page via [c]:help all[c]. ________________________________________________________________________________