I have written a perl script to extend the use of the ALIAS
configuration file tag. What I want from this email is some response if
anyone thinks this may be useful for any reason, in which case I can
update the script a bit and release it. If you're interested, keep
reading; if not, keep reading anyway, because it may do more than you
think.
History.
I started writing the perl script about 6 months ago (or more), before
doxygen version 1.2.10, before the doxygen xml output was used much, and
before the new perl (1.3-rc2) output was available. I finished it for
internal use by our company, and forgot about it. Its recently come up
again though as there is another major update on the way.
Reason.
Basically it is a very devious way of extending doxygen's "alias"
configuration file tag. Essentially, I had a look at the doxygen source
code and thought my own perl script would be quicker and easier (now I'm
not so sure!)
The problem with the alias tag, is its a simple substitution. For
example:
ALIASES =3D "myalias=3D<b>"
would cause
@myalias hello world
to be replaced with
<b> hello world
There is no option to add something at the end, to the effect of
<b> hello world </b>
Usage.
The script works as a pre-filter for doxygen, and takes as an arguement
a filename which has a list of aliases in it, along with pre-html,
post-html, pre-latex and post-latex fields. It can even add
@(end)latexonly or @(end)htmlonly pairs if necessary. For example you
could put in the config file:
@texttt, "<code>", "</code>", "\texttt {", "}"
and when the prefilter came accross, say,=20
"@texttt foo bar baz"
in doxygen comment blocks, it would replace it with
"@htmlonly <code> foo bar baz </code> @endhtmlonly @latexonly \texttt
{foo bar baz} @endlatexonly"
Either html or latex output (or both, if you want to ignore some
aliases) can be excluded for any set.
I try and keep line numbers the same so that included sources won't be
stuffed up.
What now?
as I said, what I want from this email is some response if anyone thinks
this may be useful for any reason, in which case I can update the script
a bit (remove the comments that say "<coworker> is an idiot" ...!) and
release it. I have found it to be _very_ powerful, and I can show some
examples that turn our doxygen output into latex tables inside sections
inside more tables...!
Of course I realise that with all the recent doxygen enhancements, this
may all be unnecessary as there might be easier ways of doing it now.
Many thanks for any comments,
--=20
Iain Buchanan <ia...@no...>
It is easier for a camel to pass through the eye of a needle if it is
lightly greased.
-- Kehlog Albran, "The Profit"
|