On 08/09/10 22:00, Phillip Lord wrote:
Stuart Rackham<[email protected]> writes:
Good stuff. Having to specify twice had me confused for a bit, but then
I read the docs.
Decided to do it that way for backward compatibility and because the reason
for not including asciidoc output in the first place was that it swamped
everything else.
Entirely sensible!
Passing asciidoc options would also be nice --asciidoc-opts=ASCIIDOC_OPTS c.f.
a2x
Would something like this do the trick? It seems to work in my hands.
It would work most of the time, but there are corner cases:
1. Multiple arguments e.g. --asciidoc-opt "-f xxx -a yyy=zzz"
That would fail, although
--asciidoc-opt "-f xxx" --asciidoc-opt "-a yyy=xxx"
should work fine.
2. Quoted arguments e.g. --asciidoc-opt '-f "my conf file.conf"'
3. Arguments with values and no spaces e.g. --asciidoc-opt "-ayyy=zzz"
I haven't tried either of these. Entering into nested quotation and
escape is always a problem with this kind of argument passing.
The parse_options() function in a2x.py deals with 1 and 2 but in my mind
that's getting to messy. The more I think about it the more I think simply
adding an --asciidoc-conf option to blogpost would be the way to go. The
asciidoc -a,--attribute option would also be handy c.f. a2x (but this
necessitates renaming the existing blogpost -a,--attributes option which is
poorly named anyway (it refers to blogpost parameters which are mapped via a
blogpost- prefix to asciidoc attributes) and is easily confused with the
asciidoc attributes.
Okay, this is cleaner from the command line point of view anyway. I do
worry, however, that this does not allow passing of all parameters to
asciidoc, including ones that may come in the future. But, either way,
is good.
Yes, that was my worry but I couldn't think of a use case that when outside
attributes and conf files.
I've updated the trunk and renamed --attributes to --mandatory-parameters
(apologies for any inconvenience this backward incompatibility may cause).
This is fine. It's time I rationalized all my make files anyway!
Phil
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/asciidoc?hl=en.