aboutsummaryrefslogtreecommitdiff
path: root/doc/doc.bat
diff options
context:
space:
mode:
Diffstat (limited to 'doc/doc.bat')
-rw-r--r--doc/doc.bat18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/doc.bat b/doc/doc.bat
new file mode 100644
index 0000000..80a6351
--- /dev/null
+++ b/doc/doc.bat
@@ -0,0 +1,18 @@
+@echo off
+setlocal
+cd %~dp0
+
+echo ^<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"^> > index.html
+echo ^<html lang=en^> >> index.html
+echo ^<head^> >> index.html
+echo ^<title^>tt.c^<^/title^> >> index.html
+echo ^</head^> >> index.html
+echo ^<body^> >> index.html
+
+for /f "tokens=*" %%f in ('dir /b/a-d ..\src') do (
+ echo ^<h1^>%%f^</h1^> >> index.html
+ awk -F """" "/^\/\// { sub(/^\/\/ */, """", $0); print gensub(/->[ ]*([^ ][^ ]*)$/, ""\\\\&rarr;\\\\&nbsp;*\\\\1*"", $0); next } /^[ ]*$/ { print """"; next } { print "" "" $0 }" < ..\src\%%f | markdown.exe | sed -e "s/h2>/h3>/g" -e "s/h1>/h2>/g" >> index.html
+ echo ^<hr^> >> index.html
+)
+
+echo ^</body^>^</html^> >> index.html \ No newline at end of file