diff options
author | Araq <rumpf_a@web.de> | 2014-12-13 00:39:32 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-12-13 00:39:32 +0100 |
commit | 3ee048eaad337fabeb21751530083ae6abab86bd (patch) | |
tree | 93ab549ab586844bfaba390d6084eba743d4cfbd | |
parent | f45093893dc56c6eb42fc7a670433d2bde28321b (diff) | |
download | Nim-3ee048eaad337fabeb21751530083ae6abab86bd.tar.gz |
added 'website' option to koch for convenience
-rw-r--r-- | koch.nim | 8 | ||||
-rw-r--r-- | tools/nimweb.nim | 9 | ||||
-rw-r--r-- | web/community.txt | 8 | ||||
-rw-r--r-- | web/learn.txt | 2 |
4 files changed, 19 insertions, 8 deletions
diff --git a/koch.nim b/koch.nim index 2de93bdea..2c7d49cf1 100644 --- a/koch.nim +++ b/koch.nim @@ -42,7 +42,8 @@ Possible Commands: boot [options] bootstraps with given command line options install [bindir] installs to given directory clean cleans Nimrod project; removes generated files - web [options] generates the website + web [options] generates the website and the full documentation + website [options] generates only the website csource [options] builds the C sources for installation zip builds the installation ZIP package nsis [options] builds the NSIS Setup installer (for Windows) @@ -124,6 +125,10 @@ proc web(args: string) = exec("$# cc -r tools/nimweb.nim $# web/nim --putenv:nimversion=$#" % [findNim(), args, VersionAsString]) +proc website(args: string) = + exec("$# cc -r tools/nimweb.nim $# --website web/nim --putenv:nimversion=$#" % + [findNim(), args, VersionAsString]) + # -------------- boot --------------------------------------------------------- const @@ -345,6 +350,7 @@ of cmdArgument: of "boot": boot(op.cmdLineRest) of "clean": clean(op.cmdLineRest) of "web": web(op.cmdLineRest) + of "website": website(op.cmdLineRest) of "csource", "csources": csource(op.cmdLineRest) of "zip": zip(op.cmdLineRest) of "nsis": nsis(op.cmdLineRest) diff --git a/tools/nimweb.nim b/tools/nimweb.nim index 23d1ef4d9..c4dc8226d 100644 --- a/tools/nimweb.nim +++ b/tools/nimweb.nim @@ -25,6 +25,8 @@ type TRssItem = object year, month, day, title: string +var onlyWebsite: bool + proc initConfigData(c: var TConfigData) = c.tabs = @[] c.links = @[] @@ -67,6 +69,7 @@ Options: --var:name=value set the value of a variable -h, --help shows this help -v, --version shows the version + --website only build the website, not the full documentation Compile_options: will be passed to the Nim compiler """ @@ -134,6 +137,8 @@ proc parseCmdLine(c: var TConfigData) = var idx = val.find('=') if idx < 0: quit("invalid command line") c.vars[substr(val, 0, idx-1)] = substr(val, idx+1) + of "website": + onlyWebsite = true else: quit(usage) of cmdEnd: break if c.infile.len == 0: quit(usage) @@ -435,8 +440,8 @@ var c: TConfigData initConfigData(c) parseCmdLine(c) parseIniFile(c) -when false: - #buildPdfDoc(c, "doc") +if onlyWebsite: buildWebsite(c) + #buildPdfDoc(c, "doc") else: main(c) diff --git a/web/community.txt b/web/community.txt index aad281a44..e035ca7e2 100644 --- a/web/community.txt +++ b/web/community.txt @@ -34,13 +34,13 @@ Nim's Community Github ------ - Nim's `source code <http://github.com/Araq/Nim>`_ is hosted on Github. - Together with the `wiki <http://github.com/Araq/Nim/wiki>`_ and - `issue tracker <http://github.com/Araq/Nim/issues>`_. + Nim's `source code <http://github.com/Araq/Nimrod>`_ is hosted on Github. + Together with the `wiki <http://github.com/Araq/Nimrod/wiki>`_ and + `issue tracker <http://github.com/Araq/Nimrod/issues>`_. Github also hosts other projects relating to Nim. These projects are a part of the `nim-lang organisation <http://github.com/nim-lang>`_. - This includes the `Babel package manager <http://github.com/nim-lang/babel>`_ + This includes the `Nimble package manager <https://github.com/nim-lang/nimble>`_ and its `package repository <http://github.com/nim-lang/packages>`_. diff --git a/web/learn.txt b/web/learn.txt index f0e5e57fa..25db150a4 100644 --- a/web/learn.txt +++ b/web/learn.txt @@ -18,7 +18,7 @@ Learning Nim Examples -------- - - | `Nim by Example <http://nimrod-by-example.github.io/>`_ + - | `Nim by Example <http://nim-by-example.github.io/>`_ | Nim by Example is an excellent starting place for beginners. - | `Nim on Rosetta Code <http://rosettacode.org/wiki/Category:Nimrod>`_ |