11#! py -3
22"""
3- Extract code examples from Dreaming in Java plain text file.
3+ Extract code examples from On Java plain text file.
44Creates Ant build.xml file for each subdirectory.
55"""
66TODO = """
1919
2020# Leave this alone, relative path necessary:
2121destination = Path ('.' ) / "ExtractedExamples"
22- sourceText = Path ('.' ) / "DreamingInJava .txt"
23- github = Path (r'C:\Users\Bruce\Documents\GitHub\Dreaming-in -Java' )
24- examples = Path (r"C:\Users\Bruce\Dropbox\__Dreaming-in-Java \ExtractedExamples" )
22+ sourceText = Path ('.' ) / "OnJava .txt"
23+ github = Path (r'C:\Users\Bruce\Documents\GitHub\On -Java' )
24+ examples = Path (r"C:\Users\Bruce\Dropbox\___OnJava \ExtractedExamples" )
2525
2626startBuild = """\
2727 <?xml version="1.0" ?>
@@ -149,7 +149,7 @@ def _copy_from_github(dir, name_or_pattern, trace=False):
149149 for args in [
150150 ("." , "build.xml" ),
151151 ("." , "Ant-*.xml" ),
152- ("gui " , "*.gif" ),
152+ ("ui " , "*.gif" ),
153153 ("network" , "*.bat" ),
154154 ("network" , "build.xml" ),
155155 ("remote" , "*.bat" ),
@@ -360,7 +360,7 @@ def createAntFiles():
360360
361361@CmdLine ("f" )
362362def findNonJavaFiles ():
363- "Find non-java files in DreamingInJava .txt"
363+ "Find non-java files in OnJava .txt"
364364 if not sourceText .exists ():
365365 print ("Cannot find" , sourceText )
366366 sys .exit ()
@@ -374,7 +374,7 @@ def findNonJavaFiles():
374374
375375@CmdLine ('e' )
376376def extractAndCreateBuildFiles ():
377- "Clean, then extract examples from DreamingInJava .txt, build ant files"
377+ "Clean, then extract examples from OnJava .txt, build ant files"
378378 clean ()
379379 extractExamples ()
380380 createAntFiles ()
0 commit comments