This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Including output of a command?



--RCcFxJ34+mAtH0DM
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Jan 10, 2002 at 02:36:21PM -0500, Rory Hunter wrote:
> Hi,
>=20
> I don't suppose it's possible to include the output of a system command i=
n=20
> a docment somehow, i.e. with some hackery like,
>=20
> <!ENTITY date CMD "date +%A %e %B">

How are you managing your builds?  We use make here, and I do the above
like this:

Makefile fragment:

    SRCS=3D date.txt Makefile glossary.sgml *sgml *ent
    ...
    # Create a file containing the date.
    CLEANFILES+=3Ddate.txt
    date.txt: *sgml *ent
	    date > date.txt

book.ent fragment:

    <!ENTITY date SYSTEM "date.txt">


book.sgml fragment:

    <para>Version: pre-release/&date;</para>

Joe





I do this with=20
>=20
> or an equivalent? Obviously competely unportable, but it'd be quite nifty.
>=20
> --=20
> roryh

--RCcFxJ34+mAtH0DM
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjw9pw8ACgkQXVIcjOaxUBZc5ACg4MyhyHVdy3+u60P4ylkf+d6H
DnsAoOlVxNnAqD6VGFly0Keb5AM37ncS
=FJmG
-----END PGP SIGNATURE-----

--RCcFxJ34+mAtH0DM--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]