• R/O
  • HTTP
  • SSH
  • HTTPS

SeraphyScriptTools: Commit

SeraphyScriptTools v1.1以降のソースコード管理


Commit MetaInfo

Revision5f72f91cc61d59309237c07983979852b50be914 (tree)
Time2015-07-19 18:52:19
Authorseraphy <seraphy@sera...>
Commiterseraphy

Log Message

ヘルプファイルのウェブ対応

Change Summary

Incremental Difference

--- /dev/null
+++ b/Help/buidl.cmd
@@ -0,0 +1,2 @@
1+"c:\Program Files (x86)\HTML Help Workshop\hhc.exe" seraphyscripttools.hhp
2+pause
--- /dev/null
+++ b/Help/index.html
@@ -0,0 +1,11 @@
1+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
2+<html>
3+<head><title>SeraphyScriptDialogヘルプ</title></head>
4+<frameset cols="300,*">
5+ <frame src="sidemenu.html" name="sidemenu">
6+ <frame src="top.htm" name="main">
7+ <noframes>
8+ このページはフレームを使用しています。
9+ </noframes>
10+</frameset>
11+</html>
--- /dev/null
+++ b/Help/makesite.py
@@ -0,0 +1,85 @@
1+#! /usr/bin/python2.7
2+'''
3+Created on 2015/07/19
4+for Python2.7
5+
6+@author: seraphy
7+'''
8+
9+from HTMLParser import HTMLParser
10+
11+class MyHTMLParser(HTMLParser):
12+
13+ sitemapAttr = ('type', 'text/sitemap')
14+
15+ beginBody = False
16+
17+ sitemapMode = False
18+ sitemapTitle = ''
19+ sitemapUrl = ''
20+
21+ def handle_starttag(self, tag, attrs):
22+ if not self.beginBody:
23+ if tag == 'body':
24+ self.wr.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">\r\n');
25+ self.wr.write('<html><head>\r\n');
26+ self.wr.write('<meta http-equiv="Content-Type" content="text/html; charset=Windows-31J">\r\n')
27+ self.wr.write('<meta http-equiv="Content-Language" content="ja-JP">\r\n')
28+ self.wr.write('<link href="sidemenu.css" rel="stylesheet" type="text/css" media="screen" >\r\n')
29+ self.wr.write('<title>SeraphyScriptDialog Help</title>\r\n');
30+ self.wr.write('<base target="main"/>\r\n');
31+ self.wr.write('<body>\r\n');
32+ self.beginBody = True
33+ return
34+
35+ if tag == 'object':
36+ if [x for x in attrs if x == self.sitemapAttr]:
37+ self.sitemapMode = True
38+ elif tag == 'param' and self.sitemapMode:
39+ paramType = [x[1] for x in attrs if x[0] == 'name']
40+ paramValue = [x[1] for x in attrs if x[0] == 'value']
41+ # print("*param name={0} value={1}".format(paramType, paramValue))
42+
43+ if paramType == ['Name']:
44+ self.sitemapTitle = paramValue[0]
45+ elif paramType == ['Local']:
46+ self.sitemapUrl = paramValue[0]
47+ else:
48+ raise Exception('unknown attrs:{0}'.format(attrs))
49+
50+ else:
51+ self.wr.write("<{0}>".format(tag))
52+
53+ def handle_endtag(self, tag):
54+ if not self.beginBody:
55+ return
56+
57+ if tag == 'object':
58+ if self.sitemapMode:
59+ if len(self.sitemapUrl) > 0:
60+ self.wr.write("<a href='{1}'>{0}</a>".format(self.sitemapTitle, self.sitemapUrl.replace('\\', '/')))
61+ else:
62+ self.wr.write("{0}".format(self.sitemapTitle))
63+
64+ self.sitemapMode = False
65+ self.sitemapTitle = ''
66+ self.sitemapUrl = ''
67+
68+ elif tag == 'param' and self.sitemapMode:
69+ pass
70+ else:
71+ self.wr.write("</{0}>\r\n".format(tag))
72+
73+def main():
74+ with open('seraphyscripttools.hhc', 'r') as f:
75+ text = f.read()
76+
77+ with open('sidemenu.html', 'w') as wr:
78+ parser = MyHTMLParser()
79+ parser.wr = wr
80+ parser.feed(text)
81+
82+ print("ok");
83+
84+if __name__ == '__main__':
85+ main()
--- a/Help/seraphyscripttools.hhc
+++ b/Help/seraphyscripttools.hhc
@@ -10,7 +10,7 @@
1010 <UL>
1111 <LI> <OBJECT type="text/sitemap">
1212 <param name="Name" value="はじめに">
13- <param name="Local" value="index.htm">
13+ <param name="Local" value="top.htm">
1414 </OBJECT>
1515 <LI> <OBJECT type="text/sitemap">
1616 <param name="Name" value="オブジェクトの種類">
--- a/Help/seraphyscripttools.hhp
+++ b/Help/seraphyscripttools.hhp
@@ -3,7 +3,7 @@ Compatibility=1.1 or later
33 Compiled file=seraphyscripttools.chm
44 Contents file=seraphyscripttools.hhc
55 Default Font=MS ゴシック,12,128
6-Default topic=index.htm
6+Default topic=top.htm
77 Display compile progress=No
88 Language=0x411 日本語
99 Title=SeraphyScriptTools
@@ -16,7 +16,7 @@ dialog.htm
1616 event.htm
1717 form.htm
1818 howtocreate.htm
19-index.htm
19+top.htm
2020 instance.htm
2121 objects.htm
2222 objvector.htm
--- /dev/null
+++ b/Help/sidemenu.css
@@ -0,0 +1,78 @@
1+@charset "utf-8";
2+
3+body {
4+ margin-top: 0px;
5+ margin-bottom: 2em;
6+ margin-left: 0.5em;
7+ margin-right: 0.5em;
8+ font-family: "メイリオ", "MS P明朝", "MS 明朝", "細明朝体", "Osaka", serif;
9+ background-color: #FDFFFD;
10+}
11+
12+li {
13+ margin: 0.5em;
14+}
15+
16+a:link, a:active, a:visited {
17+ color: #807010;
18+}
19+a:hover {
20+ color: #00dd33;
21+}
22+
23+h1 {
24+ font-size: 140%;
25+ margin-bottom: 1.5em;
26+ margin-top: 1em;
27+ padding: 0.5em;
28+ color: #006600;
29+ text-align: center;
30+}
31+
32+h2 {
33+ font-size: 120%;
34+ margin-bottom: 0.5em;
35+ margin-top: 1em;
36+ padding: 0.3em;
37+ border-color: #0066FF;
38+ border-left-style: solid;
39+ border-left-width: 0.5em;
40+ border-bottom-style: solid;
41+ border-bottom-width: thin;
42+}
43+
44+h3 {
45+ font-size: 120%;
46+ margin-bottom: 0.5em;
47+ margin-top: 1em;
48+ padding: 0.3em;
49+ text-decoration: none;
50+ border-bottom: 3px solid #0066FF;
51+}
52+
53+h4 {
54+ font-size: 100%;
55+ margin-left: 1em;
56+ margin-bottom: 0.5em;
57+ margin-top: 1em;
58+ padding: 0.3em;
59+}
60+
61+p {
62+ text-indent: 1em;
63+ margin-bottom: 0ex;
64+ margin-top: 0ex;
65+ line-height: 1.2em;
66+}
67+
68+ul{
69+ margin-left: 0em;
70+ font-size: 100%;
71+ padding-left: 0;
72+}
73+
74+li {
75+ margin-left: 1em;
76+ font-size: 100%;
77+ padding-left: 0;
78+}
--- /dev/null
+++ b/Help/sidemenu.html
@@ -0,0 +1,17 @@
1+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
2+<html><head>
3+<meta http-equiv="Content-Type" content="text/html; charset=Windows-31J">
4+<meta http-equiv="Content-Language" content="ja-JP">
5+<link href="sidemenu.css" rel="stylesheet" type="text/css" media="screen" >
6+<title>SeraphyScriptDialog Help</title>
7+<base target="main"/>
8+<body>
9+<param><ul><li><a href='top.htm'>はじめに</a><li><a href='objects.htm'>オブジェクトの種類</a><ul><li><a href='instance.htm'>Instance</a><li><a href='dialog.htm'>CommDialog</a><ul><li><a href='dialog.htm#OPENDIALOG'>ファイルを開く</a><li><a href='dialog.htm#SAVEDIALOG'>名前を付けて保存</a><li><a href='dialog.htm#BROWSEFOLDER'>フォルダ参照</a><li><a href='dialog.htm#CHOOSECOLOR'>カラー選択</a><li><a href='dialog.htm#MESSAGEBOX'>メッセージボックス</a><li><a href='dialog.htm#ENV'>環境設定</a></ul>
10+<li><a href='overlapped.htm'>OverlappedWindow</a><ul><li><a href='form.htm'>フォーム</a><ul><li><a href='control.htm'>コントロール</a><li><a href='tree.htm'>ツリーアイテム</a></ul>
11+<li><a href='event.htm'>イベント</a></ul>
12+<li><a href='canvas.htm'>キャンパス</a><ul><li><a href='canvas.htm'>Canvas</a><li><a href='canvas.htm#LAYER'>レイヤー</a></ul>
13+<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>
14+<li><a href='howtocreate.htm'>使用方法</a><ul><li><a href='howtocreate.htm'>基礎編</a><li><a href='howtocreate2.htm'>応用編</a></ul>
15+</ul>
16+</body>
17+</html>
Show on old repository browser