summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/installer.ini7
-rw-r--r--contributors.txt12
-rw-r--r--doc/contributing.rst (renamed from contributing.rst)0
-rw-r--r--doc/docs.rst (renamed from doc/docs.txt)0
-rw-r--r--doc/docstyle.rst (renamed from docstyle.rst)0
-rw-r--r--doc/overview.rst (renamed from doc/overview.txt)2
-rw-r--r--koch.nim5
-rw-r--r--tools/finish.nim (renamed from finish.nim)4
-rw-r--r--tools/nimweb.nim21
-rw-r--r--tools/start.bat (renamed from start.bat)6
-rw-r--r--web/website.ini2
11 files changed, 32 insertions, 27 deletions
diff --git a/compiler/installer.ini b/compiler/installer.ini
index 40050a2f7..5e4b3ddbc 100644
--- a/compiler/installer.ini
+++ b/compiler/installer.ini
@@ -41,8 +41,8 @@ Files: "config/nimdoc.tex.cfg"
 ; Files: "doc/*.cfg"
 ; Files: "doc/*.pdf"
 ; Files: "doc/*.ini"
-Files: "doc/overview.html"
-Start: "doc/overview.html"
+Files: "doc/html/overview.html"
+Start: "doc/html/overview.html"
 
 
 [Other]
@@ -63,6 +63,7 @@ Files: "icons/koch_icon.o"
 
 Files: "compiler"
 Files: "doc"
+Files: "doc/html"
 Files: "tools"
 Files: "web/website.ini"
 Files: "web/ticker.html"
@@ -93,7 +94,7 @@ Files: "bin/nimble.exe"
 Files: "koch.exe"
 Files: "finish.exe"
 ; Files: "dist/mingw"
-Files: "start.bat"
+Files: r"tools\start.bat"
 BinPath: r"bin;dist\mingw\bin;dist"
 
 ;           Section | dir | zipFile | size hint (in KB) | url | exe start menu entry
diff --git a/contributors.txt b/contributors.txt
deleted file mode 100644
index d54ec844a..000000000
--- a/contributors.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-Comex
-Eric Doughty-Papassideris
-Simon Hafner
-Keita Haga
-Grzegorz Adam Hankiewicz
-Philippe Lhoste
-Zahary Karadjov
-Mario Ray Mahardhika
-Alexander Mitchell-Robinson (Amrykid)
-Dominik Picheta
-Jonathan Plona
-Alexander Rødseth
diff --git a/contributing.rst b/doc/contributing.rst
index 31f04a5e0..31f04a5e0 100644
--- a/contributing.rst
+++ b/doc/contributing.rst
diff --git a/doc/docs.txt b/doc/docs.rst
index 4484784ae..4484784ae 100644
--- a/doc/docs.txt
+++ b/doc/docs.rst
diff --git a/docstyle.rst b/doc/docstyle.rst
index d789b1df9..d789b1df9 100644
--- a/docstyle.rst
+++ b/doc/docstyle.rst
diff --git a/doc/overview.txt b/doc/overview.rst
index 5b41752ae..e01520d7c 100644
--- a/doc/overview.txt
+++ b/doc/overview.rst
@@ -5,5 +5,5 @@ Nim Documentation Overview
 :Author: Andreas Rumpf
 :Version: |nimversion|
 
-.. include:: ../doc/docs.txt
+.. include:: docs.rst
 
diff --git a/koch.nim b/koch.nim
index 74855a6b9..8262c7c3d 100644
--- a/koch.nim
+++ b/koch.nim
@@ -173,7 +173,9 @@ proc bundleNimsuggest(buildExe: bool) =
     copyExe("dist/nimsuggest/nimsuggest".exe, "bin/nimsuggest".exe)
 
 proc bundleFinishExe() =
-  exec(findNim() & " c finish.nim")
+  exec(findNim() & " c tools/finish.nim")
+  copyExe("tools/finish".exe, "finish".exe)
+  removeFile("tools/finish".exe)
 
 proc zip(args: string) =
   bundleNimbleSrc()
@@ -369,6 +371,7 @@ of cmdArgument:
   of "boot": boot(op.cmdLineRest)
   of "clean": clean(op.cmdLineRest)
   of "web": web(op.cmdLineRest)
+  of "docs": web("--onlyDocs " & op.cmdLineRest)
   of "json2": web("--json2 " & op.cmdLineRest)
   of "website": website(op.cmdLineRest & " --googleAnalytics:UA-48159761-1")
   of "web0":
diff --git a/finish.nim b/tools/finish.nim
index 18216cfb2..8b9acfc56 100644
--- a/finish.nim
+++ b/tools/finish.nim
@@ -69,10 +69,10 @@ when defined(windows):
     if askBool("Would like to add Nim-" & NimVersion &
                " to your start menu? (y/n) "):
       createDir(dest)
-      createShortcut(getCurrentDir() / "start.bat", dest / "Nim",
+      createShortcut(getCurrentDir() / "tools" / "start.bat", dest / "Nim",
                      getCurrentDir() / r"icons\nim.ico")
       if fileExists("doc/overview.html"):
-        createShortcut(getCurrentDir() / "doc" / "overview.html",
+        createShortcut(getCurrentDir() / "doc" / "html" / "overview.html",
                        dest / "Overview")
       if dirExists(r"dist\aporia-0.4.0"):
         createShortcut(getCurrentDir() / r"dist\aporia-0.4.0\bin\aporia.exe",
diff --git a/tools/nimweb.nim b/tools/nimweb.nim
index c3bba3f0a..9a21a0fb5 100644
--- a/tools/nimweb.nim
+++ b/tools/nimweb.nim
@@ -29,7 +29,7 @@ type
   TRssItem = object
     year, month, day, title, url, content: string
   TAction = enum
-    actAll, actOnlyWebsite, actPdf, actJson2
+    actAll, actOnlyWebsite, actPdf, actJson2, actOnlyDocs
 
   Sponsor = object
     logo: string
@@ -72,7 +72,7 @@ include "website.tmpl"
 # ------------------------- configuration file -------------------------------
 
 const
-  version = "0.7"
+  version = "0.8"
   usage = "nimweb - Nim Website Generator Version " & version & """
 
   (c) 2015 Andreas Rumpf
@@ -85,6 +85,8 @@ Options:
   -v, --version       shows the version
   --website           only build the website, not the full documentation
   --pdf               build the PDF version of the documentation
+  --json2             build JSON of the documentation
+  --onlyDocs          build only the documentation
 Compile_options:
   will be passed to the Nim compiler
 """
@@ -157,6 +159,7 @@ proc parseCmdLine(c: var TConfigData) =
       of "website": action = actOnlyWebsite
       of "pdf": action = actPdf
       of "json2": action = actJson2
+      of "onlydocs": action = actOnlyDocs
       of "googleanalytics":
         c.gaId = val
         c.nimArgs.add("--doc.googleAnalytics:" & val & " ")
@@ -315,6 +318,7 @@ proc buildDoc(c: var TConfigData, destPath: string) =
   exec(findNim() & " buildIndex -o:$1/theindex.html $1" % [destPath])
 
 proc buildPdfDoc(c: var TConfigData, destPath: string) =
+  createDir(destPath)
   if os.execShellCmd("pdflatex -version") != 0:
     echo "pdflatex not found; no PDF documentation generated"
   else:
@@ -507,8 +511,14 @@ proc main(c: var TConfigData) =
   buildAddDoc(c, docup)
   buildDocSamples(c, docup)
   buildDoc(c, docup)
-  buildDocSamples(c, "doc")
-  buildDoc(c, "doc")
+  createDir("doc/html")
+  buildDocSamples(c, "doc/html")
+  buildDoc(c, "doc/html")
+
+proc onlyDocs(c: var TConfigData) =
+  createDir("doc/html")
+  buildDocSamples(c, "doc/html")
+  buildDoc(c, "doc/html")
 
 proc json2(c: var TConfigData) =
   const destPath = "web/json2"
@@ -529,6 +539,7 @@ parseCmdLine(c)
 parseIniFile(c)
 case action
 of actOnlyWebsite: buildWebsite(c)
-of actPdf: buildPdfDoc(c, "doc")
+of actPdf: buildPdfDoc(c, "doc/pdf")
+of actOnlyDocs: onlyDocs(c)
 of actAll: main(c)
 of actJson2: json2(c)
diff --git a/start.bat b/tools/start.bat
index 685932c47..a4475fac7 100644
--- a/start.bat
+++ b/tools/start.bat
@@ -1,6 +1,8 @@
 @echo off

 REM COLOR 0A

-SET NIMPATH=%~dp0

+SET NIMPATH=%~dp0\..

 SET PATH=%NIMPATH%\bin;%NIMPATH%\dist\mingw\bin;%PATH%

-cmd

+cd %NIMPATH%

+cmd 

+

 

diff --git a/web/website.ini b/web/website.ini
index 833122ecb..0d1be4b63 100644
--- a/web/website.ini
+++ b/web/website.ini
@@ -31,7 +31,7 @@ file: ticker.html
 [Documentation]
 doc: "endb;intern;apis;lib;manual.rst;tut1.rst;tut2.rst;nimc;overview;filters"
 doc: "tools;niminst;nimgrep;gc;estp;idetools;docgen;koch;backends.rst"
-doc: "nimfix.rst;nimsuggest.rst;nep1.rst;nims.rst"
+doc: "nimfix.rst;nimsuggest.rst;nep1.rst;nims.rst;contributing.rst"
 pdf: "manual.rst;lib.rst;tut1.rst;tut2.rst;nimc.rst;niminst.rst;gc.rst"
 srcdoc2: "system.nim;system/nimscript;pure/ospaths"
 srcdoc2: "core/macros;pure/marshal;core/typeinfo"