-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgui.py
More file actions
179 lines (153 loc) · 3.39 KB
/
Copy pathgui.py
File metadata and controls
179 lines (153 loc) · 3.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# This file was generated by the Tkinter Designer by Parth Jadhav
# https://github.com/ParthJadhav/Tkinter-Designer
from pathlib import Path
# from tkinter import *
# Explicit imports to satisfy Flake8
from tkinter import Tk, Canvas, Entry, Text, Button, PhotoImage
OUTPUT_PATH = Path(__file__).parent
ASSETS_PATH = OUTPUT_PATH / Path("./assets")
def relative_to_assets(path: str) -> Path:
return ASSETS_PATH / Path(path)
w = Tk()
w.title("블로그 PDF변환")
w.geometry("600x500")
w.configure(bg ="#FFFFFF")
canvas = Canvas(
w,
bg = "#FFFFFF",
height = 500,
width = 600,
bd = 0,
highlightthickness = 0,
relief = "ridge"
)
canvas.place(x = 0, y = 0)
canvas.create_rectangle(
0.0,
0.0,
360.0,
500.0,
fill="#207BE5",
outline="")
canvas.create_text(
22.0,
226.0,
anchor="nw",
text="사용 방법\n1. 블로그 주인 아이디 입력\n2. 저장 경로 지정 ( 지정 안할 시 C드라이브에 자동 저장)\n3. 변환 버튼 클릭",
fill="#FFFFFF",
font=("JejuGothic", 14 * -1)
)
canvas.create_text(
20.0,
40.0,
anchor="nw",
text="블로그 모든 게시글 PDF 변환 프로그램",
fill="#FFFFFF",
font=("JejuGothic", 18 * -1)
)
canvas.create_rectangle(
20.0,
69.0,
94.0,
72.0,
fill="#FFFFFF",
outline="")
canvas.create_text(
20.0,
96.0,
anchor="nw",
text="이 프로그램은 블로그의 모든 게시글을\nPDF로 변환하여 지정된 경로에\n[작성날짜][게시글 제목] 순으로\n저장해주는 프로그램입니다. ",
fill="#FFFFFF",
font=("JejuGothic", 16 * -1)
)
canvas.create_text(
20.0,
385.0,
anchor="nw",
text="※ 블로그 주인 아이디는\n블로그 주소 blog.naver.com/\n뒤에 붙는 아이디를 확인하여 입력해주시기 바랍니다.",
fill="#E6E6E6",
font=("JejuGothic", 14 * -1)
)
canvas.create_text(
20.0,
460.0,
anchor="nw",
text="문의: ohjayhoi@gmail.com",
fill="#FFFFFF",
font=("JejuGothic", 12 * -1)
)
button_image_1 = PhotoImage(
file=relative_to_assets("button_1.png"))
btn_save = Button(
image=button_image_1,
borderwidth=0,
highlightthickness=0,
command=ask_dir,
relief="flat"
)
btn_save.place(
x=374.0,
y=414.0,
width=197.0,
height=46.0
)
canvas.create_text(
374.0,
292.0,
anchor="nw",
text="현재 경로: ",
fill="#1D5CA7",
font=("JejuGothic", 15 * -1)
)
button_image_2 = PhotoImage(
file=relative_to_assets("button_2.png"))
btn_dir = Button(
image=button_image_2,
borderwidth=0,
highlightthickness=0,
command=press,
relief="flat"
)
btn_dir.place(
x=395.0,
y=220.0,
width=154.0,
height=39.0
)
entry_image_1 = PhotoImage(
file=relative_to_assets("entry_1.png"))
entry_bg_1 = canvas.create_image(
472.0,
169.0,
image=entry_image_1
)
entry1 = Entry(
bd=0,
bg="#ECECEC",
highlightthickness=0
)
entry1.place(
x=390.0,
y=167.0,
width=169.0,
height=20.0
)
canvas.create_text(
390.0,
155.0,
anchor="nw",
text="주인 아이디",
fill="#1D5CA7",
font=("JejuGothic", 8 * -1)
)
canvas.create_text(
385.0,
96.0,
anchor="nw",
text="아이디를 입력해주세요",
fill="#1D5CA6",
font=("JejuGothic", 18 * -1)
)
w.resizable(False, False)
w.protocol('WM_DELETE_WINDOW', on_close)
w.mainloop()