OSDN Git Service

ヘルプファイルのウェブ対応
authorseraphy <seraphy@seraphyware.com>
Sun, 19 Jul 2015 09:52:19 +0000 (18:52 +0900)
committerseraphy <seraphy@seraphyware.com>
Sun, 19 Jul 2015 09:52:19 +0000 (18:52 +0900)
Help/buidl.cmd [new file with mode: 0644]
Help/index.html [new file with mode: 0644]
Help/makesite.py [new file with mode: 0644]
Help/seraphyscripttools.hhc
Help/seraphyscripttools.hhp
Help/sidemenu.css [new file with mode: 0644]
Help/sidemenu.html [new file with mode: 0644]
Help/top.htm [moved from Help/index.htm with 100% similarity]

diff --git a/Help/buidl.cmd b/Help/buidl.cmd
new file mode 100644 (file)
index 0000000..5598497
--- /dev/null
@@ -0,0 +1,2 @@
+"c:\Program Files (x86)\HTML Help Workshop\hhc.exe" seraphyscripttools.hhp
+pause
diff --git a/Help/index.html b/Help/index.html
new file mode 100644 (file)
index 0000000..f250e07
--- /dev/null
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
+<html>
+<head><title>SeraphyScriptDialog\83w\83\8b\83v</title></head>
+<frameset cols="300,*">
+    <frame src="sidemenu.html" name="sidemenu">
+    <frame src="top.htm" name="main">
+    <noframes>
+    \82±\82Ì\83y\81[\83W\82Í\83t\83\8c\81[\83\80\82ð\8eg\97p\82µ\82Ä\82¢\82Ü\82·\81B
+    </noframes>
+</frameset>
+</html>
diff --git a/Help/makesite.py b/Help/makesite.py
new file mode 100644 (file)
index 0000000..f6fb112
--- /dev/null
@@ -0,0 +1,85 @@
+#! /usr/bin/python2.7
+'''
+Created on 2015/07/19
+for Python2.7
+
+@author: seraphy
+'''
+
+from HTMLParser import HTMLParser
+
+class MyHTMLParser(HTMLParser):
+
+    sitemapAttr = ('type', 'text/sitemap')
+
+    beginBody = False
+
+    sitemapMode = False
+    sitemapTitle = ''
+    sitemapUrl = ''
+
+    def handle_starttag(self, tag, attrs):
+        if not self.beginBody:
+            if tag == 'body':
+                self.wr.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">\r\n');
+                self.wr.write('<html><head>\r\n');
+                self.wr.write('<meta http-equiv="Content-Type" content="text/html; charset=Windows-31J">\r\n')
+                self.wr.write('<meta http-equiv="Content-Language" content="ja-JP">\r\n')
+                self.wr.write('<link href="sidemenu.css" rel="stylesheet" type="text/css" media="screen" >\r\n')
+                self.wr.write('<title>SeraphyScriptDialog Help</title>\r\n');
+                self.wr.write('<base target="main"/>\r\n');
+                self.wr.write('<body>\r\n');
+                self.beginBody = True
+            return
+
+        if tag == 'object':
+            if [x for x in attrs if x == self.sitemapAttr]:
+                self.sitemapMode = True
+        elif tag == 'param' and self.sitemapMode:
+            paramType = [x[1] for x in attrs if x[0] == 'name']
+            paramValue = [x[1] for x in attrs if x[0] == 'value']
+            # print("*param name={0} value={1}".format(paramType, paramValue))
+
+            if paramType == ['Name']:
+                self.sitemapTitle = paramValue[0]
+            elif paramType == ['Local']:
+                self.sitemapUrl = paramValue[0]
+            else:
+                raise Exception('unknown attrs:{0}'.format(attrs))
+
+        else:
+            self.wr.write("<{0}>".format(tag))
+
+    def handle_endtag(self, tag):
+        if not self.beginBody:
+            return
+
+        if tag == 'object':
+            if self.sitemapMode:
+                if len(self.sitemapUrl) > 0:
+                    self.wr.write("<a href='{1}'>{0}</a>".format(self.sitemapTitle, self.sitemapUrl.replace('\\', '/')))
+                else:
+                    self.wr.write("{0}".format(self.sitemapTitle))
+
+                self.sitemapMode = False
+                self.sitemapTitle = ''
+                self.sitemapUrl = ''
+
+        elif tag == 'param' and self.sitemapMode:
+            pass
+        else:
+            self.wr.write("</{0}>\r\n".format(tag))
+
+def main():
+    with open('seraphyscripttools.hhc', 'r') as f:
+        text = f.read()
+
+    with open('sidemenu.html', 'w') as wr:
+        parser = MyHTMLParser()
+        parser.wr = wr
+        parser.feed(text)
+
+    print("ok");
+
+if __name__ == '__main__':
+    main()
index 94cf292..567b0a3 100644 (file)
@@ -10,7 +10,7 @@
 <UL>
        <LI> <OBJECT type="text/sitemap">
                <param name="Name" value="\82Í\82\82ß\82É">
-               <param name="Local" value="index.htm">
+               <param name="Local" value="top.htm">
                </OBJECT>
        <LI> <OBJECT type="text/sitemap">
                <param name="Name" value="\83I\83u\83W\83F\83N\83g\82Ì\8eí\97Þ">
index feb3dc8..04bc0b8 100644 (file)
@@ -3,7 +3,7 @@ Compatibility=1.1 or later
 Compiled file=seraphyscripttools.chm
 Contents file=seraphyscripttools.hhc
 Default Font=\82l\82\83S\83V\83b\83N,12,128
-Default topic=index.htm
+Default topic=top.htm
 Display compile progress=No
 Language=0x411 \93ú\96{\8cê
 Title=SeraphyScriptTools
@@ -16,7 +16,7 @@ dialog.htm
 event.htm
 form.htm
 howtocreate.htm
-index.htm
+top.htm
 instance.htm
 objects.htm
 objvector.htm
diff --git a/Help/sidemenu.css b/Help/sidemenu.css
new file mode 100644 (file)
index 0000000..b724a4b
--- /dev/null
@@ -0,0 +1,78 @@
+@charset "utf-8";
+
+body {
+  margin-top: 0px;
+  margin-bottom: 2em;
+  margin-left: 0.5em;
+  margin-right: 0.5em;
+  font-family: "メイリオ", "MS P明朝", "MS 明朝", "細明朝体", "Osaka", serif;
+  background-color: #FDFFFD;
+}
+
+li {
+  margin: 0.5em;
+}
+
+a:link, a:active, a:visited {
+  color: #807010;
+}
+a:hover {
+  color: #00dd33;
+}
+
+h1 {
+  font-size: 140%;
+  margin-bottom: 1.5em;
+  margin-top: 1em;
+  padding: 0.5em;
+  color: #006600;
+  text-align: center;
+}
+
+h2 {
+  font-size: 120%;
+  margin-bottom: 0.5em;
+  margin-top: 1em;
+  padding: 0.3em;
+  border-color: #0066FF;
+  border-left-style: solid;
+  border-left-width: 0.5em;
+  border-bottom-style: solid;
+  border-bottom-width: thin;
+}
+
+h3 {
+  font-size: 120%;
+  margin-bottom: 0.5em;
+  margin-top: 1em;
+  padding: 0.3em;
+  text-decoration: none;
+  border-bottom: 3px solid #0066FF;
+}
+
+h4 {
+  font-size: 100%;
+  margin-left: 1em;
+  margin-bottom: 0.5em;
+  margin-top: 1em;
+  padding: 0.3em;
+}
+
+p {
+  text-indent: 1em;
+  margin-bottom: 0ex;
+  margin-top: 0ex;
+  line-height: 1.2em;
+}
+
+ul{
+    margin-left: 0em;
+    font-size: 100%;
+    padding-left: 0;
+}
+
+li {
+    margin-left: 1em;
+    font-size: 100%;
+    padding-left: 0;
+}
diff --git a/Help/sidemenu.html b/Help/sidemenu.html
new file mode 100644 (file)
index 0000000..79d33f5
--- /dev/null
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">\r\r
+<html><head>\r\r
+<meta http-equiv="Content-Type" content="text/html; charset=Windows-31J">\r\r
+<meta http-equiv="Content-Language" content="ja-JP">\r\r
+<link href="sidemenu.css" rel="stylesheet" type="text/css" media="screen" >\r\r
+<title>SeraphyScriptDialog Help</title>\r\r
+<base target="main"/>\r\r
+<body>\r\r
+<param><ul><li><a href='top.htm'>\82Í\82\82ß\82É</a><li><a href='objects.htm'>\83I\83u\83W\83F\83N\83g\82Ì\8eí\97Þ</a><ul><li><a href='instance.htm'>Instance</a><li><a href='dialog.htm'>CommDialog</a><ul><li><a href='dialog.htm#OPENDIALOG'>\83t\83@\83C\83\8b\82ð\8aJ\82­</a><li><a href='dialog.htm#SAVEDIALOG'>\96¼\91O\82ð\95t\82¯\82Ä\95Û\91¶</a><li><a href='dialog.htm#BROWSEFOLDER'>\83t\83H\83\8b\83_\8eQ\8fÆ</a><li><a href='dialog.htm#CHOOSECOLOR'>\83J\83\89\81[\91I\91ð</a><li><a href='dialog.htm#MESSAGEBOX'>\83\81\83b\83Z\81[\83W\83{\83b\83N\83X</a><li><a href='dialog.htm#ENV'>\8aÂ\8b«\90Ý\92è</a></ul>\r\r
+<li><a href='overlapped.htm'>OverlappedWindow</a><ul><li><a href='form.htm'>\83t\83H\81[\83\80</a><ul><li><a href='control.htm'>\83R\83\93\83g\83\8d\81[\83\8b</a><li><a href='tree.htm'>\83c\83\8a\81[\83A\83C\83e\83\80</a></ul>\r\r
+<li><a href='event.htm'>\83C\83x\83\93\83g</a></ul>\r\r
+<li><a href='canvas.htm'>\83L\83\83\83\93\83p\83X</a><ul><li><a href='canvas.htm'>Canvas</a><li><a href='canvas.htm#LAYER'>\83\8c\83C\83\84\81[</a></ul>\r\r
+<li><a href='shell.htm'>Shell</a><li><a href='objvector.htm'>ObjectVector</a><li><a href='objvector.htm#MAP'>ObjectMap</a><li><a href='profile.htm'>PrivateProfile</a></ul>\r\r
+<li><a href='howtocreate.htm'>\8eg\97p\95û\96@</a><ul><li><a href='howtocreate.htm'>\8aî\91b\95Ò</a><li><a href='howtocreate2.htm'>\89\9e\97p\95Ò</a></ul>\r\r
+</ul>\r\r
+</body>\r\r
+</html>\r\r
similarity index 100%
rename from Help/index.htm
rename to Help/top.htm