[quickbook] Direct code import...

Rene Rivera <[email protected]>
Newsgroups gmane.comp.lib.boost.documentation
Organization Redshift Software, Inc.
Message-ID <[email protected]>
As I mentioned in my original post about code snippets inclusion.. And 
my wrong impression that they worked as some form of automatic 
extraction and injection into a quickbook document.. I've implemented 
the functionality to allow the use of "/*'"+"/*" comments to 
automatically inject their quickbook content into the current quickbook 
document (Took a while as it was 15 minute intervals at a time while I 
was on the train)

I also implemented the ability to import multiple files at once through 
the use of a basic regular expression as the searched file name.

For example I use it as such:

===
[section Reference]
[import ../../../boost/predef/version_number.h]
[import ../../../boost/predef/architecture/.*\.h]
[import ../../../boost/predef/compiler/.*\.h]
[import ../../../boost/predef/library/.*/.*\.h]
[import ../../../boost/predef/os/.*\.h]
[endsect]
===

The only caveat at the moment is the problem I mentioned last night of 
not being able to use "]" in the regular expression. Which prevents 
using regexs with character range matches. But it's still generally 
useful with that limitation.

The changes involved for this are actually rather minor 
<https://svn.boost.org/trac/boost/changeset/75163> (part of that is an 
indentation change). And the multi-file inclusion feature can very 
easily be applied to other places where we have files, i.e. the 
"include", as it's a 2 line change for each occurrence.

If you want to play around with this the easiest way to get the code is to:

---
cd BOOST_ROOT/tools/quickbook
svn switch https://svn.boost.org/svn/boost/branches/quickbook/literate
---

Enjoy.

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org (msn) - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim,yahoo,skype,efnet,gmail
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.