diff options
Diffstat (limited to 'tools/nimweb.nim')
-rw-r--r-- | tools/nimweb.nim | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tools/nimweb.nim b/tools/nimweb.nim index c5d510eac..84b790248 100644 --- a/tools/nimweb.nim +++ b/tools/nimweb.nim @@ -200,32 +200,32 @@ proc parseIniFile(c: var TConfigData) = # ------------------- main ---------------------------------------------------- -proc Exec(cmd: string) = +proc exec(cmd: string) = echo(cmd) if os.execShellCmd(cmd) != 0: quit("external program failed") proc buildDoc(c: var TConfigData, destPath: string) = # call nim for the documentation: for d in items(c.doc): - Exec("nimrod rst2html $# -o:$# --index:on $#" % + exec("nimrod rst2html $# -o:$# --index:on $#" % [c.nimrodArgs, destPath / changeFileExt(splitFile(d).name, "html"), d]) for d in items(c.srcdoc): - Exec("nimrod doc $# -o:$# --index:on $#" % + exec("nimrod doc $# -o:$# --index:on $#" % [c.nimrodArgs, destPath / changeFileExt(splitFile(d).name, "html"), d]) for d in items(c.srcdoc2): - Exec("nimrod doc2 $# -o:$# --index:on $#" % + exec("nimrod doc2 $# -o:$# --index:on $#" % [c.nimrodArgs, destPath / changeFileExt(splitFile(d).name, "html"), d]) - Exec("nimrod buildIndex -o:$1/theindex.html $1" % [destPath]) + exec("nimrod buildIndex -o:$1/theindex.html $1" % [destPath]) proc buildPdfDoc(c: var TConfigData, destPath: string) = if os.execShellCmd("pdflatex -version") != 0: echo "pdflatex not found; no PDF documentation generated" else: for d in items(c.pdf): - Exec("nimrod rst2tex $# $#" % [c.nimrodArgs, d]) + exec("nimrod rst2tex $# $#" % [c.nimrodArgs, d]) # call LaTeX twice to get cross references right: - Exec("pdflatex " & changeFileExt(d, "tex")) - Exec("pdflatex " & changeFileExt(d, "tex")) + exec("pdflatex " & changeFileExt(d, "tex")) + exec("pdflatex " & changeFileExt(d, "tex")) # delete all the crappy temporary files: var pdf = splitFile(d).name & ".pdf" moveFile(dest=destPath / pdf, source=pdf) @@ -239,7 +239,7 @@ proc buildPdfDoc(c: var TConfigData, destPath: string) = proc buildAddDoc(c: var TConfigData, destPath: string) = # build additional documentation (without the index): for d in items(c.webdoc): - Exec("nimrod doc $# -o:$# $#" % + exec("nimrod doc $# -o:$# $#" % [c.nimrodArgs, destPath / changeFileExt(splitFile(d).name, "html"), d]) proc parseNewsTitles(inputFilename: string): seq[TRssItem] = @@ -253,7 +253,7 @@ proc parseNewsTitles(inputFilename: string): seq[TRssItem] = if not open(input, inputFilename): quit("Could not read $1 for rss generation" % [inputFilename]) finally: input.close() - while input.readline(line): + while input.readLine(line): if line =~ reYearMonthDayTitle: result.add(TRssItem(year: matches[0], month: matches[1], day: matches[2], title: matches[3])) @@ -332,7 +332,7 @@ proc main(c: var TConfigData) = for i in 0..c.tabs.len-1: var file = c.tabs[i].val let rss = if file in ["news", "index"]: extractFilename(rssUrl) else: "" - Exec(cmd % [c.nimrodArgs, file]) + exec(cmd % [c.nimrodArgs, file]) var temp = "web" / changeFileExt(file, "temp") var content: string try: |