Remove frame based publishing, stick to iframe. Clean CHM code generation.
--- a/Makefile Sat Feb 20 14:43:09 2016 +0200
+++ b/Makefile Sat Feb 20 15:20:24 2016 +0200
@@ -46,7 +46,7 @@
HTML_DIR := tips-html
RST_HTML_FILES := $(patsubst %.rst,$(HTML_DIR)/%.html,$(RST_FILES))
HTML_FILES := $(RST_HTML_FILES) \
- $(HTML_DIR)/index.html $(HTML_DIR)/iframe.html $(HTML_DIR)/frame.html $(HTML_DIR)/frame-index.html
+ $(HTML_DIR)/index.html $(HTML_DIR)/iframe.html
TXT__FILES := $(addprefix $(HTML_DIR)/,$(TXT_FILES))
CHM_FILES := $(addprefix $(HTML_DIR)/,chm.hhp chm.hhc chm.stp)
@@ -68,7 +68,7 @@
.PHONY: deploy
deploy: deploy2defun-web deploy2defun-hg deploy2sf-web deploy2sf-hg
-# Will be accessible via: http://tips.defun.work/frame.html
+# Will be accessible via: http://tips.defun.work/
.PHONY: deploy2defun-web
deploy2defun-web: html
rsync --delete -avP -e ssh tips-html/ $(WWW_SRV_USER)@$(WWW_SRV_NAME):/srv/www/tips/
@@ -77,7 +77,7 @@
deploy2defun-hg:
hg push ssh://$(HG_SRV_USER)@$(HG_SRV_NAME)//srv/hg/tips || [ $$? = 1 ]
-# Will be accessible via: http://gavenkoa.users.sourceforge.net/tips-html/frame.html
+# Will be accessible via: http://gavenkoa.users.sourceforge.net/tips-html/
.PHONY: deploy2sf-web
deploy2sf-web: html
rsync --delete -avP -e ssh tips-html/ gavenkoa@frs.sourceforge.net:/home/user-web/g/ga/gavenkoa/htdocs/tips-html/
@@ -106,7 +106,7 @@
echo '<ul style="padding-left: 1em;">'; \
for f in $(sort $(RST_FILES)); do \
n=$${f%.rst}; \
- printf '<li><a target="_parent" href="%s.html">%s</a></li>' $$n $$n; \
+ printf '<li><a target="_parent" href="%s.html">%s</a></li>\n' $$n $$n; \
done; \
echo '</ul>'; \
echo '</body></html>'; \
@@ -132,9 +132,6 @@
echo ' Written by Oleksandr Gavenko (AKA gavenkoa), compiled at ``'`date +%F`'`` from rev ``'`hg id -i`'``.'; \
} >$@
-$(HTML_DIR)/frame-index.html: index.sh $(RST_HTML_FILES) $(MAKEFILE_LIST) | $(HTML_DIR)
- ./index.sh frame >$@
-
$(HTML_DIR)/index.html: $(HTML_DIR)/README.html $(MAKEFILE_LIST) | $(HTML_DIR)
cp $< $@
@@ -145,7 +142,7 @@
cp $< $@
.PHONY: chm
-chm: html $(CHM_FILES) $(HTML_DIR)/index-chm.html
+chm: html $(CHM_FILES) $(HTML_DIR)/iframe.html
cd $(HTML_DIR); for file in *.html; do sed -i '/<\?xml.*\?>/d' $$file; done
$(HTML_DIR)/%.stp: %.stp $(MAKEFILE_LIST) | $(HTML_DIR)
@@ -157,9 +154,6 @@
$(HTML_DIR)/chm.hhc: chm-hhc.sh $(MAKEFILE_LIST) | $(HTML_DIR)
./chm-hhc.sh >$@
-$(HTML_DIR)/index-chm.html: index.sh $(MAKEFILE_LIST) | $(HTML_DIR)
- ./index.sh html >$@
-
################################################################
# Init targets.
--- a/chm-hhc.sh Sat Feb 20 14:43:09 2016 +0200
+++ b/chm-hhc.sh Sat Feb 20 15:20:24 2016 +0200
@@ -12,10 +12,13 @@
echo ' <li><object type="text/sitemap">'
echo ' <param name="name" value="index">'
-echo ' <param name="local" value="index-chm.html">\n'
+echo ' <param name="local" value="iframe.html">\n'
echo ' </object>'
for file in *.rst *.txt; do
+ case $file in
+ HEADER.rst) continue;;
+ esac
ext=${file##*.}
name=${file%.${ext}}
echo ' <li><object type="text/sitemap">'
--- a/chm-hhp.sh Sat Feb 20 14:43:09 2016 +0200
+++ b/chm-hhp.sh Sat Feb 20 15:20:24 2016 +0200
@@ -2,10 +2,10 @@
echo '[OPTIONS]'
echo 'Compatibility=1.1 or later'
-echo 'Compiled file=tips4gavenkoa.chm'
+echo 'Compiled file=chm.chm'
echo 'Contents file=chm.hhc'
echo 'Default Window=Navigation panel'
-echo 'Default topic=index-chm.html'
+echo 'Default topic=iframe.html'
echo 'Display compile progress=No'
echo 'Full text search stop list file=chm.stp'
echo 'Full-text search=Yes'
@@ -13,11 +13,14 @@
echo 'Title=Tips from gavenkoa'
echo ''
echo '[WINDOWS]'
-echo 'Navigation panel=,"chm.hhc",,"index-chm.html","index-chm.html",,,,,0x62520,250,0x304e,[0,0,900,600],,,,,,,0'
+echo 'Navigation panel=,"chm.hhc",,"iframe.html","iframe.html",,,,,0x62520,250,0x304e,[0,0,900,600],,,,,,,0'
echo ''
echo '[FILES]'
for file in *.rst *.txt; do
+ case $file in
+ HEADER.rst) continue;;
+ esac
ext=${file##*.}
name=${file%.${ext}}
case $ext in
@@ -29,7 +32,6 @@
;;
esac
done
-echo index-chm.html
echo ''
echo '[INFOTYPES]'
--- a/frame.html Sat Feb 20 14:43:09 2016 +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="frame-index.html" name="toc">
- <frame src="README.html" name="article">
-</frameset>
-</html>
--- a/index.sh Sat Feb 20 14:43:09 2016 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-#!/bin/sh
-
-cat <<EOF
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>Tips</title>
- <style type="text/css">
- ul { padding-left: 1em; }
- a { text-decoration: none; }
- a:link { color: brown; }
- a:visited { color: IndianRed; }
- a:hover { background: bisque; border-radius: 10px; padding: 1px; }
- </style>
-</head>
-<body>
-<h1>Tips</h1>
-<ul>
-EOF
-
-for file in *.rst *.txt; do
- case $file in
- HEADER.rst) continue;
- esac
- ext=${file##*.}
- [ "$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
-
-cat <<EOF
-<p>
-<address>
- <a href="mailto:gavenkoa@gmail.com">Oleksandr Gavenko</a>
-</address>
-</body>
-</html>
-EOF