Re: Can the include directive be used inline?
Grzegorz Adam Hankiewicz <[email protected]>
| Newsgroups | gmane.text.docutils.user |
|---|---|
| Message-ID | <[email protected]> |
El 22/09/2014, a las 14:33, Grzegorz Adam Hankiewicz <[email protected]> escribió: > > I'm trying to pass a version number into a document through the include directive: > > ======== > My inclu > ======== > > .. |version| include:: version.txt > > This is a very specific |version| from blah blah blah. > > Which doesn't seem to work. Is there any other way to embed a version number inline in a sentence? So I can create a version.txt with a replacement: .. |version| replace:: 3.1 Then use the include directive: ======== My inclu ======== .. include:: version.txt This is a very specific |version| from blah blah blah. However this fails hard when the version.txt file doesn't exists, which would be desirable for source control checkouts (plus files are a pain and slow). I see no "treat missing files as warning" option at http://docutils.sourceforge.net/docs/ref/rst/directives.html#including-an-external-document-fragment. Is there maybe an option to pass the replacement through the command line? ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk