merged
authorOleksandr Gavenko <gavenkoa@gmail.com>
Fri, 04 Nov 2011 18:08:46 +0200
changeset 1080 59c7141df3b2
parent 1079 ef0805397b5b (diff)
parent 1076 9b2eb3c96d84 (current diff)
child 1081 88b803cfab2b
merged
--- a/Makefile	Thu Nov 03 14:36:14 2011 +0200
+++ b/Makefile	Fri Nov 04 18:08:46 2011 +0200
@@ -34,7 +34,9 @@
 TXT_FILES := $(wildcard *.txt)
 
 HTML_DIR := tips-html
-HTML_FILES := $(patsubst %.rst,$(HTML_DIR)/%.html,$(RST_FILES)) $(HTML_DIR)/index.html $(HTML_DIR)/index-frame.html
+RST_HTML_FILES := $(patsubst %.rst,$(HTML_DIR)/%.html,$(RST_FILES))
+HTML_FILES := $(patsubst %.rst,$(HTML_DIR)/%.html,$(RST_FILES)) \
+        $(HTML_DIR)/index.html $(HTML_DIR)/frame.html $(HTML_DIR)/frame-index.html
 TXT__FILES := $(addprefix $(HTML_DIR)/,$(TXT_FILES))
 
 CHM_FILES := $(addprefix $(HTML_DIR)/,chm.hhp chm.hhc chm.stp)
@@ -53,9 +55,12 @@
 $(HTML_DIR)/%.html: %.rst rst.css | $(HTML_DIR)
 	$(RST2HTML) --stylesheet=rst.css $*.rst $@
 
-$(HTML_DIR)/index.html: index.sh $(filter-out $(HTML_DIR)/index.html,$(HTML_FILES)) | $(HTML_DIR)
+$(HTML_DIR)/frame-index.html: index.sh $(RST_HTML_FILES) | $(HTML_DIR)
 	./index.sh frame >$@
 
+$(HTML_DIR)/index.html: index.sh $(RST_HTML_FILES) | $(HTML_DIR)
+	./index.sh html >$@
+
 $(HTML_DIR)/%.html: %.html | $(HTML_DIR)
 	cp $< $@
 
@@ -76,7 +81,7 @@
 	./chm-hhc.sh >$@
 
 $(HTML_DIR)/index-chm.html: index.sh | $(HTML_DIR)
-	./index.sh chm >$@
+	./index.sh html >$@
 
 ################################################################
 # Init targets.
--- a/cmd.rst	Thu Nov 03 14:36:14 2011 +0200
+++ b/cmd.rst	Fri Nov 04 18:08:46 2011 +0200
@@ -96,6 +96,12 @@
 
   $ for /f "tokens=1 delims=" %%s in (users.txt) do (echo %%S & command "%%S") >> outputfile.txt
 
+Resize cmd window.
+==================
+::
+
+  cmd# mode CON: COLS=120 LINES=40
+
 Limits.
 =======
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/frame.html	Fri Nov 04 18:08:46 2011 +0200
@@ -0,0 +1,10 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <title>tips index</title>
+</head>
+<frameset cols="220,*">
+    <frame src="frame-index.html" name="toc">
+    <frame src="index.html" name="article">
+</frameset>
+</html>
--- a/index-frame.html	Thu Nov 03 14:36:14 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-<html>
-<head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-    <title>tips index</title>
-</head>
-<frameset cols="220,*">
-    <frame src="index.html" name="toc">
-    <frame src="index.html" name="article">
-</frameset>
-</html>
--- a/index.sh	Thu Nov 03 14:36:14 2011 +0200
+++ b/index.sh	Fri Nov 04 18:08:46 2011 +0200
@@ -18,20 +18,12 @@
 
 for file in *.rst *.txt; do
   ext=${file##*.}
-  name=${file%.${ext}}
-  case $ext in
-    txt)
-      case "$1" in
-        chm) printf '  <li><a href="%s.txt">%s</a>\n' $name $name ;;
-        frame) printf '  <li><a href="%s.txt" target="article">%s</a>\n' $name $name ;;
-      esac
-      ;;
-    rst)
-      case "$1" in
-        chm) printf '  <li><a href="%s.html">%s</a>\n' $name $name ;;
-        frame) printf '  <li><a href="%s.html" target="article">%s</a>\n' $name $name ;;
-      esac
-      ;;
+  [ "$ext" = "rst" ] && ext=html
+  name=${file%.*}
+  case "$1" in
+    html) echo "  <li><a href=\"$name.$ext\">$name</a>" ;;
+    frame) echo "  <li><a href=\"$name.$ext\" target=\"article\">$name</a>" ;;
+    *) exit 1 ;;
   esac
 done