summary refs log tree commit diff stats
path: root/tools/nimweb.nim
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@googlemail.com>2014-09-13 15:35:09 +0100
committerDominik Picheta <dominikpicheta@googlemail.com>2014-09-13 15:35:09 +0100
commit69d4eb14bc34ce05e21a40e28817e9a832ddd282 (patch)
treecfff3acc1576490363f5742f6658b4b09a21d020 /tools/nimweb.nim
parent37149dcf86873fd4f932bf34d18e94abd050bc63 (diff)
downloadNim-69d4eb14bc34ce05e21a40e28817e9a832ddd282.tar.gz
Some docgen fixes.
Diffstat (limited to 'tools/nimweb.nim')
-rw-r--r--tools/nimweb.nim32
1 files changed, 16 insertions, 16 deletions
diff --git a/tools/nimweb.nim b/tools/nimweb.nim
index cd679a299..1a5721075 100644
--- a/tools/nimweb.nim
+++ b/tools/nimweb.nim
@@ -53,8 +53,8 @@ include "website.tmpl"
 # ------------------------- configuration file -------------------------------
 
 const
-  Version = "0.7"
-  Usage = "nimweb - Nim Website Generator Version " & version & """
+  version = "0.7"
+  usage = "nimweb - Nim Website Generator Version " & version & """
 
   (c) 2012 Andreas Rumpf
 Usage:
@@ -115,19 +115,19 @@ proc parseCmdLine(c: var TConfigData) =
     of cmdLongOption, cmdShortOption:
       case normalize(key)
       of "help", "h": 
-        stdout.write(Usage)
+        stdout.write(usage)
         quit(0)
       of "version", "v": 
-        stdout.write(Version & "\n")
+        stdout.write(version & "\n")
         quit(0)
       of "o", "output": c.outdir = val
       of "var":
         var idx = val.find('=')
         if idx < 0: quit("invalid command line")
         c.vars[substr(val, 0, idx-1)] = substr(val, idx+1)
-      else: quit(Usage)
+      else: quit(usage)
     of cmdEnd: break
-  if c.infile.len == 0: quit(Usage)
+  if c.infile.len == 0: quit(usage)
 
 proc walkDirRecursively(s: var seq[string], root, ext: string) =
   for k, f in walkDir(root):
@@ -222,33 +222,33 @@ proc buildDocSamples(c: var TConfigData, destPath: string) =
   ## it didn't make much sense to integrate into the existing generic
   ## documentation builders.
   const src = "doc"/"docgen_sample.nim"
-  exec("nimrod doc $# -o:$# $#" %
+  exec("nim doc $# -o:$# $#" %
     [c.nimrodArgs, destPath / "docgen_sample.html", src])
-  exec("nimrod doc2 $# -o:$# $#" %
+  exec("nim doc2 $# -o:$# $#" %
     [c.nimrodArgs, destPath / "docgen_sample2.html", src])
 
 proc buildDoc(c: var TConfigData, destPath: string) =
   # call nim for the documentation:
   for d in items(c.doc):
-    exec("nimrod rst2html $# --docSeeSrcUrl:$# -o:$# --index:on $#" %
+    exec("nim rst2html $# --docSeeSrcUrl:$# -o:$# --index:on $#" %
       [c.nimrodArgs, c.gitCommit,
       destPath / changeFileExt(splitFile(d).name, "html"), d])
   for d in items(c.srcdoc):
-    exec("nimrod doc $# --docSeeSrcUrl:$# -o:$# --index:on $#" %
+    exec("nim doc $# --docSeeSrcUrl:$# -o:$# --index:on $#" %
       [c.nimrodArgs, c.gitCommit,
       destPath / changeFileExt(splitFile(d).name, "html"), d])
   for d in items(c.srcdoc2):
-    exec("nimrod doc2 $# --docSeeSrcUrl:$# -o:$# --index:on $#" %
+    exec("nim doc2 $# --docSeeSrcUrl:$# -o:$# --index:on $#" %
       [c.nimrodArgs, c.gitCommit,
       destPath / changeFileExt(splitFile(d).name, "html"), d])
-  exec("nimrod buildIndex -o:$1/theindex.html $1" % [destPath])
+  exec("nim 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("nim rst2tex $# $#" % [c.nimrodArgs, d])
       # call LaTeX twice to get cross references right:
       exec("pdflatex " & changeFileExt(d, "tex"))
       exec("pdflatex " & changeFileExt(d, "tex"))
@@ -265,7 +265,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 $# --docSeeSrcUrl:$# -o:$# $#" %
+    exec("nim doc $# --docSeeSrcUrl:$# -o:$# $#" %
       [c.nimrodArgs, c.gitCommit,
       destPath / changeFileExt(splitFile(d).name, "html"), d])
 
@@ -349,12 +349,12 @@ proc buildNewsRss(c: var TConfigData, destPath: string) =
   generateRss(destFilename, parseNewsTitles(srcFilename))
 
 proc buildJS(destPath: string) =
-  exec("nimrod js -d:release --out:$1 web/babelpkglist.nim" %
+  exec("nim js -d:release --out:$1 web/babelpkglist.nim" %
       [destPath / "babelpkglist.js"])
 
 proc main(c: var TConfigData) =
   const
-    cmd = "nimrod rst2html --compileonly $1 -o:web/$2.temp web/$2.txt"
+    cmd = "nim rst2html --compileonly $1 -o:web/$2.temp web/$2.txt"
   if c.ticker.len > 0:
     try:
       c.ticker = readFile("web" / c.ticker)