Storing output to Ant-output.txt

This commit is contained in:
Bruce Eckel 2015-04-30 12:21:26 -07:00
parent 0ebcb56618
commit 9c99594c9f
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,7 @@
<project>
<property name="chapter" value="CHAPTER?"/>
<property name="antoutput" value="../Ant-output.txt"/>
<description>
Ant build.xml for the source code for chapter ${chapter}
@ -29,7 +30,8 @@
dir="@{dirpath}"
failonerror="@{failOnError}"
fork="true"
timeout="@{timeOut}">
timeout="@{timeOut}"
output="${antoutput}" append="true">
<arg line="@{arguments}"/>
</java>
<echo>Finished: ${chapter} @{cls}</echo>

View File

@ -1,7 +1,6 @@
#! py -3
"""
TODO: Make sure there's a newline at the end of the extracted files
TODO: RunByHand can be removed? Not used in book
Extract code examples from TIJ4 Refreshed. Extracts from plain text file.
Creates Ant build.xml file for each subdirectory.
"""
@ -69,6 +68,7 @@ def extractExamples():
target.parent.mkdir(parents=True)
with target.open("w", newline='') as codeListing:
codeListing.writelines(listing)
codeListing.write("\n")
def clean():