diff options
author | Flaviu Tamas <me@flaviutamas.com> | 2016-05-13 16:07:53 -0400 |
---|---|---|
committer | Flaviu Tamas <me@flaviutamas.com> | 2016-05-13 16:36:00 -0400 |
commit | 755225d0e07378d6fa50c712e81908fffc0e443d (patch) | |
tree | 7023526e73351fc5481e9a14a9d4f15bd157186c | |
parent | 7341465439958143e5c89fecdccfa348d04083b1 (diff) | |
download | Nim-755225d0e07378d6fa50c712e81908fffc0e443d.tar.gz |
Generate nre docs with website
-rw-r--r-- | doc/lib.txt | 4 | ||||
-rw-r--r-- | tools/nimweb.nim | 20 | ||||
-rw-r--r-- | web/website.ini | 2 |
3 files changed, 15 insertions, 11 deletions
diff --git a/doc/lib.txt b/doc/lib.txt index e24db97e0..a789c6537 100644 --- a/doc/lib.txt +++ b/doc/lib.txt @@ -443,6 +443,10 @@ Regular expressions This module contains procedures and operators for handling regular expressions. The current implementation uses PCRE. +* `nre <nre.html>`_ + Another implementation of procedures for using regular expressions. Also uses + PCRE. + Database support ---------------- diff --git a/tools/nimweb.nim b/tools/nimweb.nim index d94a75162..8b7cb381f 100644 --- a/tools/nimweb.nim +++ b/tools/nimweb.nim @@ -165,10 +165,10 @@ proc walkDirRecursively(s: var seq[string], root, ext: string) = proc addFiles(s: var seq[string], dir, ext: string, patterns: seq[string]) = for p in items(patterns): + if existsFile(dir / addFileExt(p, ext)): + s.add(dir / addFileExt(p, ext)) if existsDir(dir / p): walkDirRecursively(s, dir / p, ext) - else: - add(s, dir / addFileExt(p, ext)) proc parseIniFile(c: var TConfigData) = var @@ -276,18 +276,18 @@ proc buildDoc(c: var TConfigData, destPath: string) = commands = newSeq[string](len(c.doc) + len(c.srcdoc) + len(c.srcdoc2)) i = 0 for d in items(c.doc): - commands[i] = "nim rst2html $# --docSeeSrcUrl:$#/$#/$# -o:$# --index:on $#" % - [c.nimArgs, c.gitRepo, c.gitCommit, d.pathPart, + commands[i] = "nim rst2html $# --docSeeSrcUrl:$#/$# -o:$# --index:on $#" % + [c.nimArgs, c.gitRepo, c.gitCommit, destPath / changeFileExt(splitFile(d).name, "html"), d] i.inc for d in items(c.srcdoc): - commands[i] = "nim doc $# --docSeeSrcUrl:$#/$#/$# -o:$# --index:on $#" % - [c.nimArgs, c.gitRepo, c.gitCommit, d.pathPart, + commands[i] = "nim doc $# --docSeeSrcUrl:$#/$# -o:$# --index:on $#" % + [c.nimArgs, c.gitRepo, c.gitCommit, destPath / changeFileExt(splitFile(d).name, "html"), d] i.inc for d in items(c.srcdoc2): - commands[i] = "nim doc2 $# --docSeeSrcUrl:$#/$#/$# -o:$# --index:on $#" % - [c.nimArgs, c.gitRepo, c.gitCommit, d.pathPart, + commands[i] = "nim doc2 $# --docSeeSrcUrl:$#/$# -o:$# --index:on $#" % + [c.nimArgs, c.gitRepo, c.gitCommit, destPath / changeFileExt(splitFile(d).name, "html"), d] i.inc @@ -319,8 +319,8 @@ proc buildAddDoc(c: var TConfigData, destPath: string) = # build additional documentation (without the index): var commands = newSeq[string](c.webdoc.len) for i, doc in pairs(c.webdoc): - commands[i] = "nim doc2 $# --docSeeSrcUrl:$#/$#/$# -o:$# $#" % - [c.nimArgs, c.gitRepo, c.gitCommit, doc.pathPart, + commands[i] = "nim doc2 $# --docSeeSrcUrl:$#/$# -o:$# $#" % + [c.nimArgs, c.gitRepo, c.gitCommit, destPath / changeFileExt(splitFile(doc).name, "html"), doc] mexec(commands, c.numProcessors) diff --git a/web/website.ini b/web/website.ini index 2084d9240..5b3382820 100644 --- a/web/website.ini +++ b/web/website.ini @@ -35,7 +35,7 @@ doc: "nimfix.txt;nimsuggest.txt;nep1.txt;nims.txt" pdf: "manual.txt;lib;tut1;tut2;nimc;niminst;gc" srcdoc2: "system.nim;system/nimscript;pure/ospaths" srcdoc2: "core/macros;pure/marshal;core/typeinfo" -srcdoc2: "impure/re;pure/typetraits" +srcdoc2: "impure/re;impure/nre;pure/typetraits" srcdoc2: "pure/concurrency/threadpool.nim;pure/concurrency/cpuinfo.nim" srcdoc: "system/threads.nim;system/channels.nim;js/dom" srcdoc2: "pure/os;pure/strutils;pure/math;pure/matchers;pure/algorithm" |