mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 01:14:41 +00:00
Generate nre docs with website
This commit is contained in:
@@ -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
|
||||
----------------
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user