From ef255852e836f2ba067caa3b51530815d11537fc Mon Sep 17 00:00:00 2001 From: Segunlee Date: Mon, 27 Apr 2020 21:34:46 +0900 Subject: [PATCH] update --- README.md | 3 +- icon.ico | Bin 23305 -> 21063 bytes lightcomics.py | 80 ++++++++++++++++++++++------------------------- requirements.txt | 1 + 4 files changed, 40 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index d15020a..9aecfb7 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ ``` Flask Pillow +requests Tkinter ``` @@ -22,7 +23,7 @@ Tkinter ## How To Run? -원도우: https://github.com/segunlee/LightProvider/releases/download/1.0.2/LightProvider.exe +원도우: https://github.com/segunlee/LightProvider/releases/download/1.0.3/LightProvider.exe diff --git a/icon.ico b/icon.ico index 6a63fc42a2e4257435ff84df257ed9cce30918d0..410bf188037fa103ac1c94dfc4fcf1fe7ac5e19e 100644 GIT binary patch literal 21063 zcmeGj2|QKV`##U^*_Brr6s44s6k4BY7@Gb_*-E0CYAQ>K5yc~9nG%hx@sdPJtEJ77 ztyDrti=|ceB|Gn(|2c0dnL<-d)BN7~{l0hZIrp4zJKy=vcfWfdhT$+SOhg2OwJf%U z6T^%#3?mX5Z67`iONV{3vW#{-9H%XWVam$P_GAoemWC5xLG#ZGV%U+NFl;Jp!=bQ; z(GM#OgLsA(FsecWfZ7iLjXL~jbRUfy477oFbI|ojINpthSCB3$z3l)zItf5iDWg3U z2diD12SCnF0B*SgaMK0WZU9`j1Rz=xfCCulPSOW`^(BABf%rwGz!v~741fSm`gm{< z2S6|f0Dr>1a9+^jj)9I`f5uqW9Moc67ybd~!m**e0E9psp*#Q_6^GYc^meNc209B4 z4m016K^M&phIo!Z+L0o#Mz}aZ>wY-@7Nmg+i{{|#!tZ_lXX@|ouHRqmXDGK!)NWEw}=@yS#q+vVLj9zd}7X!4eMg~sW2=cIOw!j^LgxLU`B>|AMhzScB?RX`IZ#@Y8Tp$K$VFIA#xH{;( z34JgsEF6s1`@gJv7xV$}Mf33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;LQ1ikRZuSsL(>(5vgoEa6N(!ub=Qkb{Q0iUp&~OSj!+dCKGdHuobIO#_pI!mrobngt#8Ss|uX^zdfW3D^Dz#_iugHHK=6WK>AJ@kx8MGr!?Ob9zHYn?i8 z_laS6w`}Gs{u(lvUsSh>{0zCE{1MhVL*EaEzD;dA98HTZZhu@LbI9qJvI_OG@VSq= z-KZ2@)rMNWm~+bq`bD8`9XTI)W6iCKg)&Bt0!EHo`$LAj zcy`II639wUVvjp(I*U1GSpsI*U}5jhdgy2^KYpTvJ0@VmI<9M__l za%|z z266Py9gyT^O?7h-P8ZVbcx;n-HAuNgMn>h>if1?Tazjl*$joephMgR&T9#6j5wc`$ zW##c%5h~mnpHz0*ZntV{HWUr5<*&QEmujy*W2q~*2R92AK*qHyE?L`H_hxF*(>Ke{ zBsl(R6FOAMclZ#D+|;GVCnn7yzFkXMR`Q@K3hR?hA51CN3m=>vJ{Uu*RUFC``q;y> zbNhMaH+8RLiIK(Ub@`+yj=GC7V|iG*29I|R9`CgZe;Hu-v0}Bb;d#*=ekq0~9Na4| zz22-E=8EGX$j?vivUnfo$~=o}=EKy8tkj4XXDquP&v|fH%2c){=S*brD%DLM?2<*p z#_@6l`7=Gbd_INl&qZ^)HIJr6sco|e-}=aNj-B(48DViNFN7#P5sK=F*pgTG5yK=N zYMq{+dF&9|6aM9zqZbZE{bZeS*^S3=1ODN{|9DHj|~6- diff --git a/lightcomics.py b/lightcomics.py index 4daceb0..630d216 100755 --- a/lightcomics.py +++ b/lightcomics.py @@ -17,6 +17,7 @@ import re import socket import threading +import requests from flask import request from PIL import Image from io import BytesIO @@ -27,7 +28,7 @@ from tkinter import filedialog from tkinter import messagebox from urllib.request import urlopen -from urllib.parse import * +from urllib.parse import unquote # 버전 __version__ = (1, 0, 3) @@ -352,11 +353,11 @@ def getSizeOf(path): return total_size for item in os.listdir(path): - itempath = os.path.join(folder, item).replace("\\", "/") + itempath = os.path.join(path, item).replace("\\", "/") if os.path.isfile(itempath): total_size += os.path.getsize(itempath) elif os.path.isdir(itempath): - total_size += getFolderSize(itempath) + total_size += getSizeOf(itempath) return total_size @@ -522,30 +523,43 @@ def get_identifier(req_path): response = flask.Response(data, headers=None, mimetype='application/json') return response +@app.route('/stop') +def stop_server_by_request(): + func = request.environ.get('werkzeug.server.shutdown') + if func is None: + raise RuntimeError('Not running with the Werkzeug Server') + app.logger.info("shutdown...") + func() + app.logger.info("shutdown...") -# UI 구현 for Windows or Mac OSX +# UI 구현 for Windows or Mac OSX +server_run = False def onClickServerState(): global server_run global server_state_label global server_on_off_button - global server_threading if server_run == True: - tk.messagebox.showinfo( - "알림", "서버 정지는 정상적으로 동작되지 않습니다.\n프로그램 종료후 재시작 해야 합니다.") - return shutdown_server() server_state_label['text'] = "서버: 정지됨" server_on_off_button['text'] = " 가동 " + + server_port_textbox.configure(state="normal") + password_textbox.configure(state="normal") + else: updateServerPort() updatePassword() + server_threading = threading.Thread(target=start_server) server_threading.start() server_state_label['text'] = "서버: 가동중" server_on_off_button['text'] = " 정지 " + server_port_textbox.configure(state="disabled") + password_textbox.configure(state="disabled") + server_run = not server_run @@ -555,13 +569,9 @@ def start_server(): def shutdown_server(): - # TODO: 서버 어떻게 멈추냐.. 안되네 - # func = request.environ.get('werkzeug.server.shutdown') - # if func is None: - # raise RuntimeError('Not running with the Werkzeug Server') - # func() + URL = "http://" + CONF_HOST + ":" + str(CONF_SERVER_PORT) + "/stop" + requests.get(URL) app.logger.info("Sever Stopped") - # server_threading.join() def getPublicIp(): @@ -570,7 +580,9 @@ def getPublicIp(): def updateServerIP(): + global CONF_HOST app.logger.info(getPublicIp()) + CONF_HOST = socket.gethostbyname(socket.gethostname()) local_ip.set(socket.gethostbyname(socket.gethostname())) public_ip.set(getPublicIp()) @@ -589,6 +601,11 @@ def updatePassword(): def updateRootPath(): global CONF_ROOT_PATH + + if server_run == True: + tk.messagebox.showinfo("알림", "서버 가동중에 경로를 변경할 수 없습니다.") + return + folder_selected = filedialog.askdirectory() CONF_ROOT_PATH = folder_selected root_path_var.set(CONF_ROOT_PATH) @@ -604,25 +621,11 @@ def resource_path(relative_path): # Set UI values for Windows -server_run = False if IS_OS_WINDOWS: - server_threading = threading.Thread(target=start_server) - window = tk.Tk() - server_state_label = tk.Label(window, - text="서버: 중지됨", - width=15, - anchor="w", - padx=10, - pady=5) - server_on_off_button = tk.Button(window, - text=" 가동 ", - command=onClickServerState, - width=20) - change_root_path_button = tk.Button(window, - text=" 변경 ", - command=updateRootPath, - width=20) + server_state_label = tk.Label(window, text="서버: 중지됨", width=15, anchor="w", padx=10, pady=5) + server_on_off_button = tk.Button(window, text=" 가동 ", command=onClickServerState, width=20) + change_root_path_button = tk.Button(window, text=" 변경 ", command=updateRootPath, width=20) public_ip = tk.StringVar() local_ip = tk.StringVar() @@ -633,20 +636,11 @@ def resource_path(relative_path): root_path_var = tk.StringVar() root_path_var.set(CONF_ROOT_PATH) - local_ip_textbox = tk.Entry(window, - width=20, - textvariable=local_ip, - state='readonly') - public_ip_textbox = tk.Entry(window, - width=20, - textvariable=public_ip, - state='readonly') + local_ip_textbox = tk.Entry(window, width=20, textvariable=local_ip, state='readonly') + public_ip_textbox = tk.Entry(window, width=20, textvariable=public_ip, state='readonly') server_port_textbox = tk.Entry(window, width=20, textvariable=server_port) password_textbox = tk.Entry(window, width=20, textvariable=password_var) - root_path_textbox = tk.Entry(window, - width=20, - textvariable=root_path_var, - state='readonly') + root_path_textbox = tk.Entry(window, width=20, textvariable=root_path_var, state='readonly') def applicationUI(): diff --git a/requirements.txt b/requirements.txt index f2d6949..8b02045 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ flask Pillow +requests