# HG changeset patch # User Aziz K?ksal # Date 1202566213 -3600 # Node ID f3dead0310ce20a483d91337ca4c64f930f1583b # Parent 49fe21aa387c8722ac8eb96543f316bff6a72d6a Added '-v' (verbose) option to command 'ddoc'. diff -r 49fe21aa387c -r f3dead0310ce trunk/src/cmd/DDoc.d --- a/trunk/src/cmd/DDoc.d Sat Feb 09 14:24:35 2008 +0100 +++ b/trunk/src/cmd/DDoc.d Sat Feb 09 15:10:13 2008 +0100 @@ -31,7 +31,7 @@ import tango.io.FilePath; void execute(string[] filePaths, string destDir, string[] macroPaths, - bool incUndoc, InfoManager infoMan) + bool incUndoc, bool verbose, InfoManager infoMan) { // Parse macro files. MacroTable mtable; @@ -60,11 +60,12 @@ // Generate documentation. auto dest = new FilePath(destDir); - generateDocumentation(dest, mod, mtable, incUndoc); + generateDocumentation(dest, mod, mtable, incUndoc, verbose); } } -void generateDocumentation(FilePath dest, Module mod, MacroTable mtable, bool incUndoc) +void generateDocumentation(FilePath dest, Module mod, MacroTable mtable, + bool incUndoc, bool verbose) { // Create a macro environment for this module. mtable = new MacroTable(mtable); @@ -87,6 +88,8 @@ auto fileText = expandMacros(mtable, "$(DDOC)"); // Finally write the file out to the harddisk. dest.append(mod.getFQN() ~ ".html"); + if (verbose) + Stdout.formatln("{} > {}", mod.filePath, dest); auto file = new File(dest); file.write(fileText); } diff -r 49fe21aa387c -r f3dead0310ce trunk/src/main.d --- a/trunk/src/main.d Sat Feb 09 14:24:35 2008 +0100 +++ b/trunk/src/main.d Sat Feb 09 15:10:13 2008 +0100 @@ -92,11 +92,14 @@ auto macroPaths = GlobalSettings.ddocFilePaths; char[][] filePaths; bool incUndoc; + bool verbose; // Parse arguments. foreach (arg; args[3..$]) { if (arg == "-i") incUndoc = true; + else if (arg == "-v") + verbose = true; else if (arg.length > 5 && toLower(arg[$-4..$].dup) == "ddoc") macroPaths ~= arg; else @@ -105,7 +108,7 @@ auto infoMan = new InfoManager(); // Execute command. - cmd.DDoc.execute(filePaths, destination, macroPaths, incUndoc, infoMan); + cmd.DDoc.execute(filePaths, destination, macroPaths, incUndoc, verbose, infoMan); if (infoMan.info.length) return printErrors(infoMan); break; @@ -348,6 +351,7 @@ Options: -i : include undocumented symbols + -v : verbose output Example: dil d doc/ src/main.d mymacros.ddoc -i`;