Generate nre docs with website
This commit is contained in:
parent
7341465439
commit
755225d0e0
3 changed files with 15 additions and 11 deletions
|
|
@ -443,6 +443,10 @@ Regular expressions
|
||||||
This module contains procedures and operators for handling regular
|
This module contains procedures and operators for handling regular
|
||||||
expressions. The current implementation uses PCRE.
|
expressions. The current implementation uses PCRE.
|
||||||
|
|
||||||
|
* `nre <nre.html>`_
|
||||||
|
Another implementation of procedures for using regular expressions. Also uses
|
||||||
|
PCRE.
|
||||||
|
|
||||||
|
|
||||||
Database support
|
Database support
|
||||||
----------------
|
----------------
|
||||||
|
|
|
||||||
|
|
@ -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]) =
|
proc addFiles(s: var seq[string], dir, ext: string, patterns: seq[string]) =
|
||||||
for p in items(patterns):
|
for p in items(patterns):
|
||||||
|
if existsFile(dir / addFileExt(p, ext)):
|
||||||
|
s.add(dir / addFileExt(p, ext))
|
||||||
if existsDir(dir / p):
|
if existsDir(dir / p):
|
||||||
walkDirRecursively(s, dir / p, ext)
|
walkDirRecursively(s, dir / p, ext)
|
||||||
else:
|
|
||||||
add(s, dir / addFileExt(p, ext))
|
|
||||||
|
|
||||||
proc parseIniFile(c: var TConfigData) =
|
proc parseIniFile(c: var TConfigData) =
|
||||||
var
|
var
|
||||||
|
|
@ -276,18 +276,18 @@ proc buildDoc(c: var TConfigData, destPath: string) =
|
||||||
commands = newSeq[string](len(c.doc) + len(c.srcdoc) + len(c.srcdoc2))
|
commands = newSeq[string](len(c.doc) + len(c.srcdoc) + len(c.srcdoc2))
|
||||||
i = 0
|
i = 0
|
||||||
for d in items(c.doc):
|
for d in items(c.doc):
|
||||||
commands[i] = "nim rst2html $# --docSeeSrcUrl:$#/$#/$# -o:$# --index:on $#" %
|
commands[i] = "nim rst2html $# --docSeeSrcUrl:$#/$# -o:$# --index:on $#" %
|
||||||
[c.nimArgs, c.gitRepo, c.gitCommit, d.pathPart,
|
[c.nimArgs, c.gitRepo, c.gitCommit,
|
||||||
destPath / changeFileExt(splitFile(d).name, "html"), d]
|
destPath / changeFileExt(splitFile(d).name, "html"), d]
|
||||||
i.inc
|
i.inc
|
||||||
for d in items(c.srcdoc):
|
for d in items(c.srcdoc):
|
||||||
commands[i] = "nim doc $# --docSeeSrcUrl:$#/$#/$# -o:$# --index:on $#" %
|
commands[i] = "nim doc $# --docSeeSrcUrl:$#/$# -o:$# --index:on $#" %
|
||||||
[c.nimArgs, c.gitRepo, c.gitCommit, d.pathPart,
|
[c.nimArgs, c.gitRepo, c.gitCommit,
|
||||||
destPath / changeFileExt(splitFile(d).name, "html"), d]
|
destPath / changeFileExt(splitFile(d).name, "html"), d]
|
||||||
i.inc
|
i.inc
|
||||||
for d in items(c.srcdoc2):
|
for d in items(c.srcdoc2):
|
||||||
commands[i] = "nim doc2 $# --docSeeSrcUrl:$#/$#/$# -o:$# --index:on $#" %
|
commands[i] = "nim doc2 $# --docSeeSrcUrl:$#/$# -o:$# --index:on $#" %
|
||||||
[c.nimArgs, c.gitRepo, c.gitCommit, d.pathPart,
|
[c.nimArgs, c.gitRepo, c.gitCommit,
|
||||||
destPath / changeFileExt(splitFile(d).name, "html"), d]
|
destPath / changeFileExt(splitFile(d).name, "html"), d]
|
||||||
i.inc
|
i.inc
|
||||||
|
|
||||||
|
|
@ -319,8 +319,8 @@ proc buildAddDoc(c: var TConfigData, destPath: string) =
|
||||||
# build additional documentation (without the index):
|
# build additional documentation (without the index):
|
||||||
var commands = newSeq[string](c.webdoc.len)
|
var commands = newSeq[string](c.webdoc.len)
|
||||||
for i, doc in pairs(c.webdoc):
|
for i, doc in pairs(c.webdoc):
|
||||||
commands[i] = "nim doc2 $# --docSeeSrcUrl:$#/$#/$# -o:$# $#" %
|
commands[i] = "nim doc2 $# --docSeeSrcUrl:$#/$# -o:$# $#" %
|
||||||
[c.nimArgs, c.gitRepo, c.gitCommit, doc.pathPart,
|
[c.nimArgs, c.gitRepo, c.gitCommit,
|
||||||
destPath / changeFileExt(splitFile(doc).name, "html"), doc]
|
destPath / changeFileExt(splitFile(doc).name, "html"), doc]
|
||||||
mexec(commands, c.numProcessors)
|
mexec(commands, c.numProcessors)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ doc: "nimfix.txt;nimsuggest.txt;nep1.txt;nims.txt"
|
||||||
pdf: "manual.txt;lib;tut1;tut2;nimc;niminst;gc"
|
pdf: "manual.txt;lib;tut1;tut2;nimc;niminst;gc"
|
||||||
srcdoc2: "system.nim;system/nimscript;pure/ospaths"
|
srcdoc2: "system.nim;system/nimscript;pure/ospaths"
|
||||||
srcdoc2: "core/macros;pure/marshal;core/typeinfo"
|
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"
|
srcdoc2: "pure/concurrency/threadpool.nim;pure/concurrency/cpuinfo.nim"
|
||||||
srcdoc: "system/threads.nim;system/channels.nim;js/dom"
|
srcdoc: "system/threads.nim;system/channels.nim;js/dom"
|
||||||
srcdoc2: "pure/os;pure/strutils;pure/math;pure/matchers;pure/algorithm"
|
srcdoc2: "pure/os;pure/strutils;pure/math;pure/matchers;pure/algorithm"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue