|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r72470 - in sandbox/tools/auto_index: . build doc doc/html doc/html/autoindex doc/html/autoindex/tut doc/html/autoindex/tut/configure doc/html/index src test
From: john_at_[hidden]
Date: 2011-06-07 13:20:01
Author: johnmaddock
Date: 2011-06-07 13:19:58 EDT (Tue, 07 Jun 2011)
New Revision: 72470
URL: http://svn.boost.org/trac/boost/changeset/72470
Log:
Change to use program.options.
Fix typos in docs raised by Edward Diener.
Text files modified:
sandbox/tools/auto_index/auto-index.jam | 4
sandbox/tools/auto_index/build/Jamfile.v2 | 1
sandbox/tools/auto_index/doc/auto_index.qbk | 88 ++++++++++++++++------
sandbox/tools/auto_index/doc/html/autoindex/comm_ref.html | 5
sandbox/tools/auto_index/doc/html/autoindex/overview.html | 12 +-
sandbox/tools/auto_index/doc/html/autoindex/script_ref.html | 83 ++++++++++++++++----
sandbox/tools/auto_index/doc/html/autoindex/tut/add_indexes.html | 26 +++---
sandbox/tools/auto_index/doc/html/autoindex/tut/build.html | 17 ----
sandbox/tools/auto_index/doc/html/autoindex/tut/configure.html | 2
sandbox/tools/auto_index/doc/html/autoindex/tut/configure/optional.html | 2
sandbox/tools/auto_index/doc/html/autoindex/tut/configure/options.html | 156 +++++++++++++++++++++++++++++++++++++--
sandbox/tools/auto_index/doc/html/autoindex/tut/refine.html | 9 +-
sandbox/tools/auto_index/doc/html/index.html | 5
sandbox/tools/auto_index/doc/html/index/s07.html | 8 +
sandbox/tools/auto_index/src/auto_index.cpp | 127 ++++++++++++++++++--------------
sandbox/tools/auto_index/src/auto_index.hpp | 4
sandbox/tools/auto_index/src/file_scanning.cpp | 8 +-
sandbox/tools/auto_index/test/Jamfile.v2 | 21 +---
18 files changed, 397 insertions(+), 181 deletions(-)
Modified: sandbox/tools/auto_index/auto-index.jam
==============================================================================
--- sandbox/tools/auto_index/auto-index.jam (original)
+++ sandbox/tools/auto_index/auto-index.jam 2011-06-07 13:19:58 EDT (Tue, 07 Jun 2011)
@@ -206,9 +206,7 @@
actions auto-index
{
- $(AI-COMMAND) $(FLAGS) prefix=$(PREFIX) script=$(SCRIPT) index-type=$(INDEX_TYPE) in=$(>) out=$(<)
+ $(AI-COMMAND) $(FLAGS) "--prefix="$(PREFIX) "--script="$(SCRIPT) "--index-type="$(INDEX_TYPE) "--in="$(>) "--out="$(<)
}
-
-
Modified: sandbox/tools/auto_index/build/Jamfile.v2
==============================================================================
--- sandbox/tools/auto_index/build/Jamfile.v2 (original)
+++ sandbox/tools/auto_index/build/Jamfile.v2 2011-06-07 13:19:58 EDT (Tue, 07 Jun 2011)
@@ -9,6 +9,7 @@
/boost//regex
/boost//filesystem
/boost//system
+ /boost//program_options
: <define>BOOST_ALL_NO_LIB=1 <link>static ;
install aii : auto_index : <location>. ;
Modified: sandbox/tools/auto_index/doc/auto_index.qbk
==============================================================================
--- sandbox/tools/auto_index/doc/auto_index.qbk (original)
+++ sandbox/tools/auto_index/doc/auto_index.qbk 2011-06-07 13:19:58 EDT (Tue, 07 Jun 2011)
@@ -99,7 +99,7 @@
index.
Finally, while the Docbook XSL stylesheets create nice indexes complete with page
-numbers for PDF output, the HTML indexes look a lot less good, as these use
+numbers for PDF output, the HTML indexes look poorer by comparison, as these use
section titles in place of page numbers... but as AutoIndex uses section titles
as index entries this leads to a lot of repetition, so as an alternative AutoIndex
can be instructed to construct the index itself. This is faster than using
@@ -154,12 +154,6 @@
Also note that Windows users must use forward slashes in the paths in `user-config.jam`]
-Finally note that `tools/auto_index/auto-index.jam` gets copied into the same directory as the rest of the Boost.Build tools
-(under `tools/build/v2/tools` in your main Boost tree): this is a temporary fix that will go away
-if the tool is accepted into Boost.
-
-[caution If you move to a new machine you will need to do this! An error message will warn about missing `auto-index.jam`. ]
-
[endsect] [/section:build Step 1: Build the AutoIndex tool]
[section:configure Step 2: Configure Boost.Build jamfile to use AutoIndex]
@@ -255,17 +249,19 @@
so [^!scan-path boost\/mylibrary\/] is where your headers will be, and [^libs\/mylibrary] for other files.
Without a prefix all relative paths are relative to the location of the script file.
]]
-[[<auto-index-type>element-name][Specifies the name of the XML element to enclose internally generated indexes in:
+
+[[<auto-index-type>element-name][Specifies the name of the XML element in which to enclose an internally generated indexes:
defaults to ['section], but could equally be ['appendix] or ['chapter] or some other block level element that has a formal title.
- The actual list of available options depends upon the document type, the following table gives the available options:]]
+ The actual list of available options depends upon the Quickbook document type, the following table gives the available options,
+ assuming that the index is placed at the top level, and not in some sub-section or other container:]]
]
[table
-[[Document Type][Available Index Types]]
+[[Document Type][Permitted Index Types]]
[[book][appendix index article chapter reference part]]
[[article][section appendix index sect1]]
-[[library][See Chapter]]
[[chapter][section index sect1]]
+[[library][The same as Chapter (section index sect1)]]
[[part][appendix index article chapter reference]]
[[appendix][section index sect1]]
[[preface][section index sect1]]
@@ -275,6 +271,26 @@
[[set][N/A: an index would have to be placed within a subsection of the document.]]
]
+In large part then the choice of `<auto-index-type>element-name` depends on the
+formatting you want to be applied to the index:
+
+[table
+[[XML Container Used for the Index][Formatting Applied by the XSL Stylesheets]]
+[[appendix][Starts a new page.]]
+[[article][Starts a new page.]]
+[[chapter][Starts a new page.]]
+[[index][Starts a new page only if it's contained within an article or book.]]
+[[part][Starts a new page.]]
+[[reference][Starts a new page.]]
+[[sect1][Starts a new page as long as it's not the first section (but is controlled by the XSL parameters chunk.section.depth and/or chunk.first.sections).]]
+[[section][Starts a new page as long as it's not the first section or nested within another section (but is controlled by the XSL parameters chunk.section.depth and/or chunk.first.sections).]]
+]
+
+In almost all cases the default (section) is the correct choice - the exception is when the index is to be placed
+directly inside a /book/ or /part/, in which case you should probably use the same XML container for the index as
+you use for whatever subdivisions are in the /book/ or /part/. In any event placing a /section/ within a /book/ or
+/part/ will result in invalid XML.
+
[endsect] [/section:options Available Indexing Options]
[section:optional Making AutoIndex optional]
@@ -428,7 +444,7 @@
[pre
<auto-index-internal>on
]
-(usually recommended for HTML output, and not the default)
+(usually recommended for HTML output, but ['not] the default)
then you can also decide what kind of XML wrapper the generated index is placed in.
By default this is a `<section>...</section>` XML block (this replaces the original
`<index>...</index>` block). However, depending upon the structure of the document
@@ -637,7 +653,7 @@
You can restrict which sections are indexed for a particular term.
So assuming that the docbook document has the usual hierarchical names for section ID's
-hierarchical names for section IDs(as Quickbook generates, for example),
+(as Quickbook generates, for example),
you can easily place a constraint on which sections are examined for a particular term.
For example, if you want to index occurrences of Lord Kelvin's name,
@@ -648,7 +664,7 @@
to the script file,
assuming that the section ID of the intro is "some_library_or_chapter_name.introduction".
-This would avoid an index entry every time [deg] kelvin is found,
+This would avoid an index entry every time 'Kelvin' is found,
something the user is unlikely to find helpful.
[endsect] [/section:refine Step 7: Iterate - to refine your index]
@@ -663,7 +679,8 @@
[h4 Comments and blank lines]
Blank lines consisting of only whitespace are ignored, so are lines that [*start with a #].
-(But, of course, you can't append \# comments onto the end of a line!).
+
+[note You can't append \# comments onto the end of a line\!]
[h4 Inclusion of Index terms]
@@ -723,29 +740,33 @@
For example, to limit indexing to just [*one specific section] (but not sub-sections below):
-``myclass "" "mylib.examples"``
+``myclass "" "mylib\.examples"``
For example, to limit indexing to specific sections, [*and sub-sections below]:
-``myclass "" "mylib.examples.*"``
+``myclass "" "mylib\.examples.*"``
will index occurrences of "myclass" as a whole word,
-but only in sections whose section ID [*begins] "mylib.examples",
+but only in sections whose section ID [*begins] "mylib.examples", while
-``myclass "\<myclass\w*\>" "mylib.examples.*"``
+``myclass "\<myclass\w*\>" "mylib\.examples.*"``
-and will also index plurals myclass, myclasses, myclasss ...
+will also index plurals myclass, myclasses, myclasss ...
-while:
+and:
-``myclass "" "(?!mylib.introduction.*).*"``
+``myclass "" "(?!mylib\.introduction).*"``
will index occurrences of "myclass" in any section,
except those whose section IDs begin "mylib.introduction".
-``reflex "\<reflex\w*\>" "mylib.introduction.*"``
+Finally, two (or more) sections can be excluded by OR'ing them together:
+
+``myclass "" "(?!mylib\.introduction|mylib\.reference).*"``
+which excludes searching for this term in sections whose ID's start with either "mylib.introduction" or "mylib.reference".
+
If this third section selection field is omitted (the default)
or is "", then [*all sections] are indexed for this term.
]
@@ -768,6 +789,25 @@
] [/variablelist]
+You can have an index term appear more than once in the script file:
+
+* If they have different /category/ names then they are treated quite separately.
+* Otherwise they are combined, so that the logical or of the regular expressions provided are taken.
+
+Thus:
+
+ myterm search_expression1 constrait_expression2 foo
+ myterm search_expression1 constrait_expression2 bar
+
+Will be treated as different terms each with their own entries, while:
+
+ myterm search_expression1 constrait_expression2 mycategory
+ myterm search_expression1 constrait_expression2 mycategory
+
+Will be combined into a single term equivalent to:
+
+ myterm (?:search_expression1|search_expression1) (?:constrait_expression2|constrait_expression2) mycategory
+
[h4 Source File Scanning]
!scan source-file-name
@@ -800,7 +840,7 @@
matches the regular expression will be scanned for terms to index.]]
[[recurse][An optional boolean value - either "true" or "false" - that
-indicates whether to recurse into subdirectories. This defaults to "false"]]
+indicates whether to recurse into subdirectories. This defaults to "false".]]
]
[h4 Excluding Terms]
Modified: sandbox/tools/auto_index/doc/html/autoindex/comm_ref.html
==============================================================================
--- sandbox/tools/auto_index/doc/html/autoindex/comm_ref.html (original)
+++ sandbox/tools/auto_index/doc/html/autoindex/comm_ref.html 2011-06-07 13:19:58 EDT (Tue, 07 Jun 2011)
@@ -7,12 +7,13 @@
<link rel="home" href="../index.html" title="AutoIndex">
<link rel="up" href="../index.html" title="AutoIndex">
<link rel="prev" href="xml.html" title="XML Handling">
+<link rel="next" href="../index/s07.html" title="Index">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="xml.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a>
+<a accesskey="p" href="xml.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../index/s07.html"><img src="../images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
@@ -81,7 +82,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="xml.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a>
+<a accesskey="p" href="xml.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../index/s07.html"><img src="../images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: sandbox/tools/auto_index/doc/html/autoindex/overview.html
==============================================================================
--- sandbox/tools/auto_index/doc/html/autoindex/overview.html (original)
+++ sandbox/tools/auto_index/doc/html/autoindex/overview.html 2011-06-07 13:19:58 EDT (Tue, 07 Jun 2011)
@@ -113,12 +113,12 @@
</p>
<p>
Finally, while the Docbook XSL stylesheets create nice indexes complete with
- page numbers for PDF output, the HTML indexes look a lot less good, as these
- use section titles in place of page numbers... but as AutoIndex uses section
- titles as index entries this leads to a lot of repetition, so as an alternative
- AutoIndex can be instructed to construct the index itself. This is faster than
- using the XSL stylesheets, and now each index entry is a hyperlink to the appropriate
- section:
+ page numbers for PDF output, the HTML indexes look poorer by comparison, as
+ these use section titles in place of page numbers... but as AutoIndex uses
+ section titles as index entries this leads to a lot of repetition, so as an
+ alternative AutoIndex can be instructed to construct the index itself. This
+ is faster than using the XSL stylesheets, and now each index entry is a hyperlink
+ to the appropriate section:
</p>
<p>
<span class="inlinemediaobject"><img src="../../students_t_eg_3.png" alt="students_t_eg_3"></span>
Modified: sandbox/tools/auto_index/doc/html/autoindex/script_ref.html
==============================================================================
--- sandbox/tools/auto_index/doc/html/autoindex/script_ref.html (original)
+++ sandbox/tools/auto_index/doc/html/autoindex/script_ref.html 2011-06-07 13:19:58 EDT (Tue, 07 Jun 2011)
@@ -23,16 +23,24 @@
The following elements can occur in a script:
</p>
<a name="autoindex.script_ref.comments_and_blank_lines"></a><h5>
-<a name="id1005489"></a>
+<a name="id1052221"></a>
<a class="link" href="script_ref.html#autoindex.script_ref.comments_and_blank_lines">Comments and
blank lines</a>
</h5>
<p>
- Blank lines consisting of only whitespace are ignored, so are lines that <span class="bold"><strong>start with a #</strong></span>. (But, of course, you can't append #
- comments onto the end of a line!).
+ Blank lines consisting of only whitespace are ignored, so are lines that <span class="bold"><strong>start with a #</strong></span>.
</p>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ You can't append # comments onto the end of a line!
+ </p></td></tr>
+</table></div>
<a name="autoindex.script_ref.inclusion_of_index_terms"></a><h5>
-<a name="id1005510"></a>
+<a name="id1052251"></a>
<a class="link" href="script_ref.html#autoindex.script_ref.inclusion_of_index_terms">Inclusion of
Index terms</a>
</h5>
@@ -131,7 +139,7 @@
<p>
</p>
-<pre class="programlisting"><span class="identifier">myclass</span> <span class="string">""</span> <span class="string">"mylib.examples"</span></pre>
+<pre class="programlisting"><span class="identifier">myclass</span> <span class="string">""</span> <span class="string">"mylib\.examples"</span></pre>
<p>
</p>
<p>
@@ -141,30 +149,30 @@
<p>
</p>
-<pre class="programlisting"><span class="identifier">myclass</span> <span class="string">""</span> <span class="string">"mylib.examples.*"</span></pre>
+<pre class="programlisting"><span class="identifier">myclass</span> <span class="string">""</span> <span class="string">"mylib\.examples.*"</span></pre>
<p>
</p>
<p>
will index occurrences of "myclass" as a whole word, but only
in sections whose section ID <span class="bold"><strong>begins</strong></span>
- "mylib.examples",
+ "mylib.examples", while
</p>
<p>
</p>
-<pre class="programlisting"><span class="identifier">myclass</span> <span class="string">"\<myclass\w*\>"</span> <span class="string">"mylib.examples.*"</span></pre>
+<pre class="programlisting"><span class="identifier">myclass</span> <span class="string">"\<myclass\w*\>"</span> <span class="string">"mylib\.examples.*"</span></pre>
<p>
</p>
<p>
- and will also index plurals myclass, myclasses, myclasss ...
+ will also index plurals myclass, myclasses, myclasss ...
</p>
<p>
- while:
+ and:
</p>
<p>
</p>
-<pre class="programlisting"><span class="identifier">myclass</span> <span class="string">""</span> <span class="string">"(?!mylib.introduction.*).*"</span></pre>
+<pre class="programlisting"><span class="identifier">myclass</span> <span class="string">""</span> <span class="string">"(?!mylib\.introduction).*"</span></pre>
<p>
</p>
<p>
@@ -172,12 +180,19 @@
those whose section IDs begin "mylib.introduction".
</p>
<p>
+ Finally, two (or more) sections can be excluded by OR'ing them together:
+ </p>
+<p>
</p>
-<pre class="programlisting"><span class="identifier">reflex</span> <span class="string">"\<reflex\w*\>"</span> <span class="string">"mylib.introduction.*"</span></pre>
+<pre class="programlisting"><span class="identifier">myclass</span> <span class="string">""</span> <span class="string">"(?!mylib\.introduction|mylib\.reference).*"</span></pre>
<p>
</p>
<p>
+ which excludes searching for this term in sections whose ID's start with
+ either "mylib.introduction" or "mylib.reference".
+ </p>
+<p>
If this third section selection field is omitted (the default) or is
"", then <span class="bold"><strong>all sections</strong></span> are
indexed for this term.
@@ -206,8 +221,38 @@
</dd>
</dl>
</div>
+<p>
+ You can have an index term appear more than once in the script file:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ If they have different <span class="emphasis"><em>category</em></span> names then they are
+ treated quite separately.
+ </li>
+<li>
+ Otherwise they are combined, so that the logical or of the regular expressions
+ provided are taken.
+ </li>
+</ul></div>
+<p>
+ Thus:
+ </p>
+<pre class="programlisting"><span class="identifier">myterm</span> <span class="identifier">search_expression1</span> <span class="identifier">constrait_expression2</span> <span class="identifier">foo</span>
+<span class="identifier">myterm</span> <span class="identifier">search_expression1</span> <span class="identifier">constrait_expression2</span> <span class="identifier">bar</span>
+</pre>
+<p>
+ Will be treated as different terms each with their own entries, while:
+ </p>
+<pre class="programlisting"><span class="identifier">myterm</span> <span class="identifier">search_expression1</span> <span class="identifier">constrait_expression2</span> <span class="identifier">mycategory</span>
+<span class="identifier">myterm</span> <span class="identifier">search_expression1</span> <span class="identifier">constrait_expression2</span> <span class="identifier">mycategory</span>
+</pre>
+<p>
+ Will be combined into a single term equivalent to:
+ </p>
+<pre class="programlisting"><span class="identifier">myterm</span> <span class="special">(?:</span><span class="identifier">search_expression1</span><span class="special">|</span><span class="identifier">search_expression1</span><span class="special">)</span> <span class="special">(?:</span><span class="identifier">constrait_expression2</span><span class="special">|</span><span class="identifier">constrait_expression2</span><span class="special">)</span> <span class="identifier">mycategory</span>
+</pre>
<a name="autoindex.script_ref.source_file_scanning"></a><h5>
-<a name="id1006005"></a>
+<a name="id1052894"></a>
<a class="link" href="script_ref.html#autoindex.script_ref.source_file_scanning">Source File Scanning</a>
</h5>
<pre class="programlisting"><span class="special">!</span><span class="identifier">scan</span> <span class="identifier">source</span><span class="special">-</span><span class="identifier">file</span><span class="special">-</span><span class="identifier">name</span>
@@ -236,7 +281,7 @@
</p></td></tr>
</table></div>
<a name="autoindex.script_ref.directory_and_source_file_scanning"></a><h5>
-<a name="id1006083"></a>
+<a name="id1052971"></a>
<a class="link" href="script_ref.html#autoindex.script_ref.directory_and_source_file_scanning">Directory
and Source File Scanning</a>
</h5>
@@ -260,12 +305,12 @@
<dd><p>
An optional boolean value - either "true" or "false"
- that indicates whether to recurse into subdirectories. This defaults
- to "false"
+ to "false".
</p></dd>
</dl>
</div>
<a name="autoindex.script_ref.excluding_terms"></a><h5>
-<a name="id1006208"></a>
+<a name="id1053096"></a>
<a class="link" href="script_ref.html#autoindex.script_ref.excluding_terms">Excluding Terms</a>
</h5>
<pre class="programlisting"><span class="special">!</span><span class="identifier">exclude</span> <span class="identifier">term</span><span class="special">-</span><span class="identifier">list</span>
@@ -278,7 +323,7 @@
of things to index.
</p>
<a name="autoindex.script_ref.rewriting_section_names"></a><h5>
-<a name="id1006263"></a>
+<a name="id1053151"></a>
<a class="link" href="script_ref.html#autoindex.script_ref.rewriting_section_names">Rewriting Section
Names</a>
</h5>
@@ -325,7 +370,7 @@
all index entries - thus preventing lots of entries under "The" etc!
</p>
<a name="autoindex.script_ref.defining_or_changing_the_file_scanners"></a><h5>
-<a name="id1006415"></a>
+<a name="id1053305"></a>
<a class="link" href="script_ref.html#autoindex.script_ref.defining_or_changing_the_file_scanners">Defining
or Changing the File Scanners</a>
</h5>
@@ -428,7 +473,7 @@
scanner may find in the documentation.
</p>
<a name="autoindex.script_ref.debugging_scanning"></a><h5>
-<a name="id1006918"></a>
+<a name="id1053806"></a>
<a class="link" href="script_ref.html#autoindex.script_ref.debugging_scanning">Debugging scanning</a>
</h5>
<p>
Modified: sandbox/tools/auto_index/doc/html/autoindex/tut/add_indexes.html
==============================================================================
--- sandbox/tools/auto_index/doc/html/autoindex/tut/add_indexes.html (original)
+++ sandbox/tools/auto_index/doc/html/autoindex/tut/add_indexes.html 2011-06-07 13:19:58 EDT (Tue, 07 Jun 2011)
@@ -106,18 +106,20 @@
<pre class="programlisting"><auto-index-internal>on
</pre>
<p>
- (usually recommended for HTML output, and not the default) then you can also
- decide what kind of XML wrapper the generated index is placed in. By default
- this is a <code class="computeroutput"><span class="special"><</span><span class="identifier">section</span><span class="special">>...</</span><span class="identifier">section</span><span class="special">></span></code> XML block (this replaces the original
- <code class="computeroutput"><span class="special"><</span><span class="identifier">index</span><span class="special">>...</</span><span class="identifier">index</span><span class="special">></span></code> block). However, depending upon the structure
- of the document and whether or not you want the index on a separate page
- - or else on the front page after the TOC - you may want to place the index
- inside a different type of XML block. For example if your document uses
- <code class="computeroutput"><span class="special"><</span><span class="identifier">chapter</span><span class="special">></span></code> top level content rather than <code class="computeroutput"><span class="special"><</span><span class="identifier">section</span><span class="special">></span></code>s then it may be preferable to place the
- index in a <code class="computeroutput"><span class="special"><</span><span class="identifier">chapter</span><span class="special">></span></code> or <code class="computeroutput"><span class="special"><</span><span class="identifier">appendix</span><span class="special">></span></code>
- block. You can also place the index inside an <code class="computeroutput"><span class="special"><</span><span class="identifier">index</span><span class="special">></span></code>
- block if you prefer, in which case the index does not appear in on a page
- of its own, but after the TOC in the HTML output.
+ (usually recommended for HTML output, but <span class="emphasis"><em>not</em></span> the default)
+ then you can also decide what kind of XML wrapper the generated index is
+ placed in. By default this is a <code class="computeroutput"><span class="special"><</span><span class="identifier">section</span><span class="special">>...</</span><span class="identifier">section</span><span class="special">></span></code>
+ XML block (this replaces the original <code class="computeroutput"><span class="special"><</span><span class="identifier">index</span><span class="special">>...</</span><span class="identifier">index</span><span class="special">></span></code>
+ block). However, depending upon the structure of the document and whether
+ or not you want the index on a separate page - or else on the front page
+ after the TOC - you may want to place the index inside a different type of
+ XML block. For example if your document uses <code class="computeroutput"><span class="special"><</span><span class="identifier">chapter</span><span class="special">></span></code>
+ top level content rather than <code class="computeroutput"><span class="special"><</span><span class="identifier">section</span><span class="special">></span></code>s
+ then it may be preferable to place the index in a <code class="computeroutput"><span class="special"><</span><span class="identifier">chapter</span><span class="special">></span></code>
+ or <code class="computeroutput"><span class="special"><</span><span class="identifier">appendix</span><span class="special">></span></code> block. You can also place the index inside
+ an <code class="computeroutput"><span class="special"><</span><span class="identifier">index</span><span class="special">></span></code> block if you prefer, in which case the
+ index does not appear in on a page of its own, but after the TOC in the HTML
+ output.
</p>
<p>
You control the type of XML block used by setting the <code class="literal"><auto-index-type>element-name</code>
Modified: sandbox/tools/auto_index/doc/html/autoindex/tut/build.html
==============================================================================
--- sandbox/tools/auto_index/doc/html/autoindex/tut/build.html (original)
+++ sandbox/tools/auto_index/doc/html/autoindex/tut/build.html 2011-06-07 13:19:58 EDT (Tue, 07 Jun 2011)
@@ -52,23 +52,6 @@
</p>
</td></tr>
</table></div>
-<p>
- Finally note that <code class="computeroutput"><span class="identifier">tools</span><span class="special">/</span><span class="identifier">auto_index</span><span class="special">/</span><span class="keyword">auto</span><span class="special">-</span><span class="identifier">index</span><span class="special">.</span><span class="identifier">jam</span></code> gets
- copied into the same directory as the rest of the Boost.Build tools (under
- <code class="computeroutput"><span class="identifier">tools</span><span class="special">/</span><span class="identifier">build</span><span class="special">/</span><span class="identifier">v2</span><span class="special">/</span><span class="identifier">tools</span></code>
- in your main Boost tree): this is a temporary fix that will go away if the
- tool is accepted into Boost.
- </p>
-<div class="caution"><table border="0" summary="Caution">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../../images/caution.png"></td>
-<th align="left">Caution</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- If you move to a new machine you will need to do this! An error message
- will warn about missing <code class="computeroutput"><span class="keyword">auto</span><span class="special">-</span><span class="identifier">index</span><span class="special">.</span><span class="identifier">jam</span></code>.
- </p></td></tr>
-</table></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
Modified: sandbox/tools/auto_index/doc/html/autoindex/tut/configure.html
==============================================================================
--- sandbox/tools/auto_index/doc/html/autoindex/tut/configure.html (original)
+++ sandbox/tools/auto_index/doc/html/autoindex/tut/configure.html 2011-06-07 13:19:58 EDT (Tue, 07 Jun 2011)
@@ -78,7 +78,7 @@
<auto-index-prefix>../../..
# Tell Quickbook that it should enable indexing.
- <quickbook-define>enable_index ;
+ <quickbook-define> ;
;
</pre>
Modified: sandbox/tools/auto_index/doc/html/autoindex/tut/configure/optional.html
==============================================================================
--- sandbox/tools/auto_index/doc/html/autoindex/tut/configure/optional.html (original)
+++ sandbox/tools/auto_index/doc/html/autoindex/tut/configure/optional.html 2011-06-07 13:19:58 EDT (Tue, 07 Jun 2011)
@@ -47,7 +47,7 @@
... other auto-index options here...
# And tell Quickbook that it should enable indexing.
- <quickbook-define>enable_index
+ <quickbook-define>
;
}
else
Modified: sandbox/tools/auto_index/doc/html/autoindex/tut/configure/options.html
==============================================================================
--- sandbox/tools/auto_index/doc/html/autoindex/tut/configure/options.html (original)
+++ sandbox/tools/auto_index/doc/html/autoindex/tut/configure/options.html 2011-06-07 13:19:58 EDT (Tue, 07 Jun 2011)
@@ -83,12 +83,14 @@
</dd>
<dt><span class="term"><auto-index-type>element-name</span></dt>
<dd><p>
- Specifies the name of the XML element to enclose internally generated
- indexes in: defaults to <span class="emphasis"><em>section</em></span>, but could equally
- be <span class="emphasis"><em>appendix</em></span> or <span class="emphasis"><em>chapter</em></span>
+ Specifies the name of the XML element in which to enclose an internally
+ generated indexes: defaults to <span class="emphasis"><em>section</em></span>, but
+ could equally be <span class="emphasis"><em>appendix</em></span> or <span class="emphasis"><em>chapter</em></span>
or some other block level element that has a formal title. The actual
- list of available options depends upon the document type, the following
- table gives the available options:
+ list of available options depends upon the Quickbook document type,
+ the following table gives the available options, assuming that the
+ index is placed at the top level, and not in some sub-section or
+ other container:
</p></dd>
</dl>
</div>
@@ -105,7 +107,7 @@
</th>
<th>
<p>
- Available Index Types
+ Permitted Index Types
</p>
</th>
</tr></thead>
@@ -137,24 +139,24 @@
<tr>
<td>
<p>
- library
+ chapter
</p>
</td>
<td>
<p>
- See Chapter
+ section index sect1
</p>
</td>
</tr>
<tr>
<td>
<p>
- chapter
+ library
</p>
</td>
<td>
<p>
- section index sect1
+ The same as Chapter (section index sect1)
</p>
</td>
</tr>
@@ -248,6 +250,140 @@
</tr>
</tbody>
</table></div>
+<p>
+ In large part then the choice of <code class="computeroutput"><span class="special"><</span><span class="keyword">auto</span><span class="special">-</span><span class="identifier">index</span><span class="special">-</span><span class="identifier">type</span><span class="special">></span><span class="identifier">element</span><span class="special">-</span><span class="identifier">name</span></code>
+ depends on the formatting you want to be applied to the index:
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ XML Container Used for the Index
+ </p>
+ </th>
+<th>
+ <p>
+ Formatting Applied by the XSL Stylesheets
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ appendix
+ </p>
+ </td>
+<td>
+ <p>
+ Starts a new page.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ article
+ </p>
+ </td>
+<td>
+ <p>
+ Starts a new page.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ chapter
+ </p>
+ </td>
+<td>
+ <p>
+ Starts a new page.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ index
+ </p>
+ </td>
+<td>
+ <p>
+ Starts a new page only if it's contained within an article or
+ book.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ part
+ </p>
+ </td>
+<td>
+ <p>
+ Starts a new page.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ reference
+ </p>
+ </td>
+<td>
+ <p>
+ Starts a new page.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ sect1
+ </p>
+ </td>
+<td>
+ <p>
+ Starts a new page as long as it's not the first section (but
+ is controlled by the XSL parameters chunk.section.depth and/or
+ chunk.first.sections).
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ section
+ </p>
+ </td>
+<td>
+ <p>
+ Starts a new page as long as it's not the first section or nested
+ within another section (but is controlled by the XSL parameters
+ chunk.section.depth and/or chunk.first.sections).
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ In almost all cases the default (section) is the correct choice - the exception
+ is when the index is to be placed directly inside a <span class="emphasis"><em>book</em></span>
+ or <span class="emphasis"><em>part</em></span>, in which case you should probably use the
+ same XML container for the index as you use for whatever subdivisions are
+ in the <span class="emphasis"><em>book</em></span> or <span class="emphasis"><em>part</em></span>. In any event
+ placing a <span class="emphasis"><em>section</em></span> within a <span class="emphasis"><em>book</em></span>
+ or <span class="emphasis"><em>part</em></span> will result in invalid XML.
+ </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
Modified: sandbox/tools/auto_index/doc/html/autoindex/tut/refine.html
==============================================================================
--- sandbox/tools/auto_index/doc/html/autoindex/tut/refine.html (original)
+++ sandbox/tools/auto_index/doc/html/autoindex/tut/refine.html 2011-06-07 13:19:58 EDT (Tue, 07 Jun 2011)
@@ -52,16 +52,15 @@
</p></td></tr>
</table></div>
<a name="autoindex.tut.refine.restricting_which_sections_are_indexed_for_a_particular_term"></a><h5>
-<a name="id1005426"></a>
+<a name="id1052159"></a>
<a class="link" href="refine.html#autoindex.tut.refine.restricting_which_sections_are_indexed_for_a_particular_term">Restricting
which Sections are indexed for a particular term</a>
</h5>
<p>
You can restrict which sections are indexed for a particular term. So assuming
that the docbook document has the usual hierarchical names for section ID's
- hierarchical names for section IDs(as Quickbook generates, for example),
- you can easily place a constraint on which sections are examined for a particular
- term.
+ (as Quickbook generates, for example), you can easily place a constraint
+ on which sections are examined for a particular term.
</p>
<p>
For example, if you want to index occurrences of Lord Kelvin's name, but
@@ -73,7 +72,7 @@
to the script file, assuming that the section ID of the intro is "some_library_or_chapter_name.introduction".
</p>
<p>
- This would avoid an index entry every time ° kelvin is found, something the
+ This would avoid an index entry every time 'Kelvin' is found, something the
user is unlikely to find helpful.
</p>
</div>
Modified: sandbox/tools/auto_index/doc/html/index.html
==============================================================================
--- sandbox/tools/auto_index/doc/html/index.html (original)
+++ sandbox/tools/auto_index/doc/html/index.html 2011-06-07 13:19:58 EDT (Tue, 07 Jun 2011)
@@ -21,7 +21,7 @@
</h3></div></div></div>
<div><p class="copyright">Copyright © 2008 , 2011 John Maddock</p></div>
<div><div class="legalnotice">
-<a name="id995360"></a><p>
+<a name="id1041983"></a><p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</p>
@@ -58,11 +58,12 @@
<dt><span class="section">Understanding The AutoIndex Workflow</span></dt>
<dt><span class="section">XML Handling</span></dt>
<dt><span class="section">Command Line Reference</span></dt>
+<dt><span class="section">Index</span></dt>
</dl>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: May 16, 2011 at 17:34:45 GMT</small></p></td>
+<td align="left"><p><small>Last revised: June 06, 2011 at 16:56:01 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
Modified: sandbox/tools/auto_index/doc/html/index/s07.html
==============================================================================
--- sandbox/tools/auto_index/doc/html/index/s07.html (original)
+++ sandbox/tools/auto_index/doc/html/index/s07.html 2011-06-07 13:19:58 EDT (Tue, 07 Jun 2011)
@@ -16,7 +16,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="id1049889"></a>Index</h2></div></div></div>
+<a name="id1054189"></a>Index</h2></div></div></div>
<p><a class="link" href="s07.html#idx_id_0">A</a> <a class="link" href="s07.html#idx_id_1">B</a> <a class="link" href="s07.html#idx_id_2">C</a> <a class="link" href="s07.html#idx_id_3">D</a> <a class="link" href="s07.html#idx_id_4">F</a> <a class="link" href="s07.html#idx_id_5">H</a> <a class="link" href="s07.html#idx_id_6">I</a> <a class="link" href="s07.html#idx_id_7">J</a> <a class="link" href="s07.html#idx_id_8">L</a> <a class="link" href="s07.html#idx_id_9">M</a> <a class="link" href="s07.html#idx_id_10">O</a> <a class="link" href="s07.html#idx_id_11">P</a> <a class="link" href="s07.html#idx_id_12">Q</a> <a class="link" href="s07.html#idx_id_13">S</a> <a class="link" href="s07.html#idx_id_14">T</a> <a class="link" href="s07.html#idx_id_15">U</a> <a class="link" href="s07.html#idx_id_16">V</a> <a class="link" href="s07.html#idx_id_17">X</a> </p>
<div class="variablelist"><dl>
<dt>
@@ -53,6 +53,8 @@
<tr><td><p><a class="link" href="../autoindex/tut/configure/options.html" title="Available Indexing Options">debug</a></p></td></tr>
<tr><td><p><a class="link" href="../autoindex/tut/configure/options.html" title="Available Indexing Options">Docbook</a></p></td></tr>
<tr><td><p><a class="link" href="../autoindex/tut/configure/options.html" title="Available Indexing Options">index</a></p></td></tr>
+<tr><td><p><a class="link" href="../autoindex/tut/configure/options.html" title="Available Indexing Options">page</a></p></td></tr>
+<tr><td><p><a class="link" href="../autoindex/tut/configure/options.html" title="Available Indexing Options">Quickbook</a></p></td></tr>
<tr><td><p><a class="link" href="../autoindex/tut/configure/options.html" title="Available Indexing Options">script</a></p></td></tr>
<tr><td><p><a class="link" href="../autoindex/tut/configure/options.html" title="Available Indexing Options">section</a></p></td></tr>
<tr><td><p><a class="link" href="../autoindex/tut/configure/options.html" title="Available Indexing Options">stylesheet</a></p></td></tr>
@@ -76,7 +78,6 @@
<dd><table class="simplelist" border="0" summary="Simple list">
<tr><td><p><a class="link" href="../autoindex/tut/configure/optional.html" title="Making AutoIndex optional">Making AutoIndex optional</a></p></td></tr>
<tr><td><p><a class="link" href="../autoindex/overview.html" title="Overview">Overview</a></p></td></tr>
-<tr><td><p><a class="link" href="../autoindex/tut/build.html" title="Step 1: Build the AutoIndex tool">Step 1: Build the AutoIndex tool</a></p></td></tr>
<tr><td><p><a class="link" href="../autoindex/tut/configure.html" title="Step 2: Configure Boost.Build jamfile to use AutoIndex">Step 2: Configure Boost.Build jamfile to use AutoIndex</a></p></td></tr>
<tr><td><p><a class="link" href="../autoindex/tut/build_docs.html" title="Step 6: Build the Docs">Step 6: Build the Docs</a></p></td></tr>
</table></dd>
@@ -293,6 +294,7 @@
<dd><div class="variablelist"><dl>
<dt><span class="term">page</span></dt>
<dd><table class="simplelist" border="0" summary="Simple list">
+<tr><td><p><a class="link" href="../autoindex/tut/configure/options.html" title="Available Indexing Options">Available Indexing Options</a></p></td></tr>
<tr><td><p><a class="link" href="../autoindex/overview.html" title="Overview">Overview</a></p></td></tr>
<tr><td><p><a class="link" href="../autoindex/tut/add_indexes.html" title="Step 3: Add indexes to your documentation">Step 3: Add indexes to your documentation</a></p></td></tr>
</table></dd>
@@ -316,6 +318,7 @@
<dd><div class="variablelist"><dl>
<dt><span class="term">Quickbook</span></dt>
<dd><table class="simplelist" border="0" summary="Simple list">
+<tr><td><p><a class="link" href="../autoindex/tut/configure/options.html" title="Available Indexing Options">Available Indexing Options</a></p></td></tr>
<tr><td><p><a class="link" href="../autoindex/tut/configure/optional.html" title="Making AutoIndex optional">Making AutoIndex optional</a></p></td></tr>
<tr><td><p><a class="link" href="../autoindex/overview.html" title="Overview">Overview</a></p></td></tr>
<tr><td><p><a class="link" href="../autoindex/tut/configure.html" title="Step 2: Configure Boost.Build jamfile to use AutoIndex">Step 2: Configure Boost.Build jamfile to use AutoIndex</a></p></td></tr>
@@ -378,7 +381,6 @@
<dd><table class="simplelist" border="0" summary="Simple list">
<tr><td><p><a class="link" href="../autoindex/tut/build.html" title="Step 1: Build the AutoIndex tool">AutoIndex</a></p></td></tr>
<tr><td><p><a class="link" href="../autoindex/tut/build.html" title="Step 1: Build the AutoIndex tool">bjam</a></p></td></tr>
-<tr><td><p><a class="link" href="../autoindex/tut/build.html" title="Step 1: Build the AutoIndex tool">Boost.Build</a></p></td></tr>
<tr><td><p><a class="link" href="../autoindex/tut/build.html" title="Step 1: Build the AutoIndex tool">Boostbook</a></p></td></tr>
<tr><td><p><a class="link" href="../autoindex/tut/build.html" title="Step 1: Build the AutoIndex tool">index</a></p></td></tr>
</table></dd>
Modified: sandbox/tools/auto_index/src/auto_index.cpp
==============================================================================
--- sandbox/tools/auto_index/src/auto_index.cpp (original)
+++ sandbox/tools/auto_index/src/auto_index.cpp 2011-06-07 13:19:58 EDT (Tue, 07 Jun 2011)
@@ -9,6 +9,7 @@
#include <cstring>
#include <boost/array.hpp>
#include <boost/exception/all.hpp>
+#include <boost/program_options.hpp>
#include "auto_index.hpp"
std::string infile, outfile, prefix, last_primary, last_secondary;
@@ -531,70 +532,86 @@
{
try{
- if(argc < 2)
- return help();
+ namespace po = boost::program_options;
+ po::options_description desc("AutoIndex Allowed Options");
+ desc.add_options()
+ ("help", "Print help message")
+ ("in", po::value<std::string>(), "Set the input XML file.")
+ ("out", po::value<std::string>(), "Set output input XML file.")
+ ("scan", po::value<std::string>(), "Scan the specified file for terms to try and index.")
+ ("script", po::value<std::string>(), "Specifies the script file to use.")
+ ("no-duplicates", "Prevents duplicate index entries within the same section.")
+ ("no-section-names", "Suppresses use of section names as index entries.")
+ ("internal-index", "Causes AutoIndex to generate the index itself, rather than relying on the XSL stylesheets.")
+ ("verbose", "Turns on verbose mode.")
+ ("prefix", po::value<std::string>(), "Sets the prefix to be prepended to all file names and paths in the script file.")
+ ("index-type", po::value<std::string>(), "Sets the XML container type to use the index.")
+ ;
+
+ po::variables_map vm;
+ po::store(po::parse_command_line(argc, argv, desc), vm);
+ po::notify(vm);
//
// Process arguments:
//
- for(int i = 1; i < argc; ++i)
+ if(vm.count("help"))
{
- if(std::strncmp(argv[i], "in=", 3) == 0)
- {
- infile = argv[i] + 3;
- }
- else if(std::strncmp(argv[i], "out=", 4) == 0)
- {
- outfile = argv[i] + 4;
- }
- else if(std::strncmp(argv[i], "scan=", 5) == 0)
- {
- if(!exists(boost::filesystem::path(argv[i] + 5)))
- throw std::runtime_error("Error the file requested for scanning does not exist: " + std::string(argv[i] + 5));
- scan_file(argv[i] + 5);
- }
- else if(std::strncmp(argv[i], "script=", 7) == 0)
- {
- process_script(argv[i] + 7);
- }
- else if(std::strcmp(argv[i], "--no-duplicates") == 0)
- {
- no_duplicates = true;
- }
- else if(std::strcmp(argv[i], "--no-section-names") == 0)
- {
- use_section_names = false;
- }
- else if(std::strcmp(argv[i], "--internal-index") == 0)
- {
- internal_indexes = true;
- }
- else if(std::strcmp(argv[i], "--verbose") == 0)
- {
- verbose = true;
- }
- else if(std::strncmp(argv[i], "prefix=", 7) == 0)
- {
- prefix = argv[i] + 7;
- }
- else if(std::strncmp(argv[i], "index-type=", 11) == 0)
- {
- internal_index_type = argv[i] + 11;
- }
- else
- {
- std::cerr << "Unrecognised option " << argv[i] << std::endl;
- return 1;
- }
+ std::cout << desc;
+ return 0;
}
-
- if(infile.empty())
+ if(vm.count("in"))
+ {
+ infile = vm["in"].as<std::string>();
+ }
+ else
+ {
+ //std::cerr << "No input XML file specified" << std::endl;
+ //return 1;
+ }
+ if(vm.count("out"))
+ {
+ outfile = vm["out"].as<std::string>();
+ }
+ else
+ {
+ //std::cerr << "No output XML file specified" << std::endl;
+ //return 1;
+ }
+ if(vm.count("verbose"))
+ {
+ verbose = true;
+ }
+ if(vm.count("prefix"))
+ {
+ prefix = vm["prefix"].as<std::string>();
+ }
+ if(vm.count("scan"))
+ {
+ std::string f = vm["scan"].as<std::string>();
+ if(!exists(boost::filesystem::path(f)))
+ throw std::runtime_error("Error the file requested for scanning does not exist: " + f);
+ scan_file(f);
+ }
+ if(vm.count("script"))
+ {
+ process_script(vm["script"].as<std::string>());
+ }
+ if(vm.count("no-duplicates"))
+ {
+ no_duplicates = true;
+ }
+ if(vm.count("no-section-names"))
+ {
+ use_section_names = false;
+ }
+ if(vm.count("internal-index"))
{
- return help();
+ internal_indexes = true;
}
- if(outfile.empty())
+ if(vm.count("index-type"))
{
- return help();
+ internal_index_type = vm["index-type"].as<std::string>();
}
std::ifstream is(infile.c_str());
Modified: sandbox/tools/auto_index/src/auto_index.hpp
==============================================================================
--- sandbox/tools/auto_index/src/auto_index.hpp (original)
+++ sandbox/tools/auto_index/src/auto_index.hpp 2011-06-07 13:19:58 EDT (Tue, 07 Jun 2011)
@@ -100,9 +100,9 @@
typedef std::multiset<file_scanner> file_scanner_set_type;
-void process_script(const char* script);
+void process_script(const std::string& script);
void scan_dir(const std::string& dir, const std::string& mask, bool recurse);
-void scan_file(const char* file);
+void scan_file(const std::string& file);
void generate_indexes();
const std::string* find_attr(boost::tiny_xml::element_ptr node, const char* name);
Modified: sandbox/tools/auto_index/src/file_scanning.cpp
==============================================================================
--- sandbox/tools/auto_index/src/file_scanning.cpp (original)
+++ sandbox/tools/auto_index/src/file_scanning.cpp 2011-06-07 13:19:58 EDT (Tue, 07 Jun 2011)
@@ -137,7 +137,7 @@
//
// Scan a source file for things to index:
//
-void scan_file(const char* file)
+void scan_file(const std::string& file)
{
if(need_defaults)
install_default_scanners();
@@ -243,7 +243,7 @@
{
if(regex_match(i->path().filename().string(), e))
{
- scan_file(i->path().string().c_str());
+ scan_file(i->path().string());
}
else if(recurse && is_directory(i->status()))
{
@@ -268,7 +268,7 @@
//
// Load and process a script file:
//
-void process_script(const char* script)
+void process_script(const std::string& script)
{
static const boost::regex comment_parser(
"\\s*(?:#.*)?$"
@@ -363,7 +363,7 @@
}
if(!exists(boost::filesystem::path(f)))
throw std::runtime_error("Error the file requested for scanning does not exist: " + f);
- scan_file(f.c_str());
+ scan_file(f);
}
else if(regex_match(line, what, debug_parser))
{
Modified: sandbox/tools/auto_index/test/Jamfile.v2
==============================================================================
--- sandbox/tools/auto_index/test/Jamfile.v2 (original)
+++ sandbox/tools/auto_index/test/Jamfile.v2 2011-06-07 13:19:58 EDT (Tue, 07 Jun 2011)
@@ -23,10 +23,10 @@
: [ alias autoindex : ../build//auto_index : release ]
: $(requirements)
<location-prefix>$(target-name).test
- <testing.arg>prefix=$(local-boost-root)
+ <testing.arg>--prefix=$(local-boost-root)
<testing.arg>$(options)
- <testing.arg>in=$(input-file)
- <testing.arg>out=$(target-name).out
+ <testing.arg>--in=$(input-file)
+ <testing.arg>--out=$(target-name).out
<preserve-test-targets>on
<dependency>Jamfile.v2
<dependency>$(input-file)
@@ -55,17 +55,8 @@
return $(t) ;
}
-auto-index-test test1 : type_traits.docbook : : script=index.idx ;
-auto-index-test test2 : type_traits.docbook : : --internal-index script=index.idx ;
-auto-index-test test3 : type_traits.docbook : : --internal-index index-type=index script=index.idx ;
-
-
-
-
-
-
-
-
-
+auto-index-test test1 : type_traits.docbook : : --script=index.idx ;
+auto-index-test test2 : type_traits.docbook : : --internal-index --script=index.idx ;
+auto-index-test test3 : type_traits.docbook : : --internal-index --index-type=index --script=index.idx ;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk