WWWCHtmlConverter 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/WWWCHtmlConverter/version.rb +1 -1
- data/lib/WWWCHtmlConverter.rb +63 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af731d4200a6560b292ecd5962a621e91d4929b7509c2e02e3c2e29e3e86cd98
|
4
|
+
data.tar.gz: a135e9c6bfcce38248f01035d83dc159cf7dedb310b43929a691ee5cfced29b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2226806b3c0a79de61ad0cc267b875c1e068cdb082c598b1566401484527677dc4e360527930332e4cc756e3f847b1e69bf0f954483a4530842b5933525069d
|
7
|
+
data.tar.gz: 4d677bbbb951c9f7ecd0538bca6c2850f8d89338a03bb1285384631a6045ce5b59edf9c13da656719c729b7dbdaa4229e4178f0dfeac4922730c90e9d2f888a5
|
data/Gemfile.lock
CHANGED
data/lib/WWWCHtmlConverter.rb
CHANGED
@@ -14,17 +14,73 @@ end
|
|
14
14
|
#wwwc_html_converter = WWWCHTMLConverter::WWWCHTMLConverter.new
|
15
15
|
|
16
16
|
|
17
|
+
# ペインドウィンドウ 1
|
18
|
+
pw1 = TkPanedWindow.new(sashrelief: 'ridge')
|
19
|
+
pw1.pack(expand: true, fill: 'both')
|
20
|
+
|
21
|
+
pw2 = TkPanedWindow.new(sashrelief: 'ridge')
|
22
|
+
pw2.pack(expand: true, fill: 'both')
|
23
|
+
|
24
|
+
# フォントの設定
|
25
|
+
TkOptionDB.add('*font', 'Takaoゴシック 14')
|
26
|
+
|
27
|
+
# 式を格納するオブジェクト
|
28
|
+
$buffer_1 = TkVariable.new('')
|
29
|
+
$buffer_2 = TkVariable.new('')
|
30
|
+
|
31
|
+
# Entry の生成
|
17
32
|
lavel_1 = TkLabel.new(text: "WWWC path")
|
18
|
-
|
33
|
+
lavel_1.pack(expand: true, fill: 'both')
|
34
|
+
button_4 = TkButton.new(text: "in",command: proc { load_file_1() })
|
35
|
+
button_4.pack(expand: true, side: 'right')
|
36
|
+
text_1 = TkEntry.new(textvariable: $buffer_1)
|
37
|
+
text_1.pack(expand: true, fill: 'both')
|
38
|
+
pw1.add(lavel_1)
|
39
|
+
pw1.add(text_1)
|
40
|
+
pw1.add(button_4)
|
19
41
|
|
20
|
-
|
21
|
-
|
42
|
+
# Entry の生成
|
43
|
+
lavel_2 = TkLabel.new(text: "html path")
|
44
|
+
lavel_2.pack(expand: true, fill: 'both')
|
45
|
+
button_5 = TkButton.new(text: "out",command: proc { load_file_2() })
|
46
|
+
button_5.pack(expand: true, side: 'right')
|
47
|
+
text_2 = TkEntry.new(textvariable: $buffer_2)
|
48
|
+
text_2.pack(expand: true, fill: 'both')
|
49
|
+
pw2.add(lavel_2)
|
50
|
+
pw2.add(text_2)
|
51
|
+
pw2.add(button_5)
|
22
52
|
|
23
|
-
button_1 = TkButton.new(text: "
|
24
|
-
button_1.pack
|
53
|
+
button_1 = TkButton.new(text: "保 存",command: proc { exit })
|
54
|
+
button_1.pack(fill: 'both')
|
25
55
|
|
26
|
-
|
27
|
-
|
56
|
+
button_3 = TkButton.new(text: "実 行",command: proc { exit })
|
57
|
+
button_3.pack(fill: 'both')
|
28
58
|
|
59
|
+
button_2 = TkButton.new(text: "キャンセル",command: proc { exit })
|
60
|
+
button_2.pack(fill: 'both')
|
61
|
+
|
62
|
+
# ファイルの選択
|
63
|
+
def load_file_1()
|
64
|
+
filetype = "{{Item Files} {.dat}}"
|
65
|
+
filename = Tk.getOpenFile(filetypes: filetype, initialdir: $path_name)
|
66
|
+
if filename != ""
|
67
|
+
$path_name = File::dirname(filename)
|
68
|
+
p $path_name
|
69
|
+
#$image_data = TkPhotoImage.new(file: filename)
|
70
|
+
#$label.configure(image: $image_data)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# ファイルの選択
|
75
|
+
def load_file_2()
|
76
|
+
filetype = "{{html Files} {.htm}} {{html Files} {.html}} {{All Files} {*}}"
|
77
|
+
filename = Tk.getOpenFile(filetypes: filetype, initialdir: $path_name)
|
78
|
+
if filename != ""
|
79
|
+
$path_name = File::dirname(filename)
|
80
|
+
p $path_name
|
81
|
+
#$image_data = TkPhotoImage.new(file: filename)
|
82
|
+
#$label.configure(image: $image_data)
|
83
|
+
end
|
84
|
+
end
|
29
85
|
|
30
86
|
Tk.mainloop
|