From d246b0879934d94daac6a16cc8a029b44962cf70 Mon Sep 17 00:00:00 2001 From: Taehoon Date: Wed, 4 Mar 2026 17:58:54 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=A9=94=EC=9D=BC=20=EA=B4=80=EB=A6=AC?= =?UTF-8?q?=20UI=20=EA=B0=9C=ED=8E=B8=20=EB=B0=8F=20=EC=8B=9C=EC=8A=A4?= =?UTF-8?q?=ED=85=9C=20=EA=B5=AC=EC=A1=B0=20=EC=B5=9C=EC=A0=81=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - UI/UX: 메일 관리 레이아웃 고도화 및 미리보기 토글 핸들 도입 - 기능: 주소록 CRUD 기능 추가 및 모달 인터페이스 개선 - 구조: CSS 파일 기능별 분리 및 Jinja2 템플릿 엔진 도입 - 백엔드: OCR 비동기 처리 및 CSV 파싱(BOM) 안정화 - 데이터: 2026.03.04 기준 최신 프로젝트 현황 업데이트 --- analyze.py | 3 +- crawler_service.py | 30 +- dashboard.html | 360 ------------------------ debug_modal.html | 88 ++---- index.html | 142 ---------- js/common.js | 9 + js/dashboard.js | 267 ++++++++++++++++++ js/mail.js | 403 +++++++++++++++++++++++++++ mailTest.html | 410 ---------------------------- server.py | 68 ++++- sheet.csv | 34 +-- style/common.css | 281 +++++++++++++++++++ style/dashboard.css | 264 ++++++++++++++++++ style/mail.css | 404 +++++++++++++++++++++++++++ style/style.css | 126 +-------- templates/dashboard.html | 61 +++++ templates/index.html | 46 ++++ templates/mailTest.html | 140 ++++++++++ templates/modals/address_book.html | 54 ++++ templates/modals/path_selector.html | 22 ++ 20 files changed, 2074 insertions(+), 1138 deletions(-) delete mode 100644 dashboard.html delete mode 100644 index.html create mode 100644 js/common.js create mode 100644 js/dashboard.js create mode 100644 js/mail.js delete mode 100644 mailTest.html create mode 100644 style/common.css create mode 100644 style/dashboard.css create mode 100644 style/mail.css create mode 100644 templates/dashboard.html create mode 100644 templates/index.html create mode 100644 templates/mailTest.html create mode 100644 templates/modals/address_book.html create mode 100644 templates/modals/path_selector.html diff --git a/analyze.py b/analyze.py index bd5637f..70108e4 100644 --- a/analyze.py +++ b/analyze.py @@ -142,7 +142,8 @@ def analyze_file_content(filename: str): if images: ocr_result = pytesseract.image_to_string(images[0], lang='kor+eng') page_text += "\n" + ocr_result - except: pass + except Exception as ocr_err: + print(f"OCR Error on page {i+1}: {ocr_err}") text_by_pages.append(page_text) elif filename.lower().endswith(('.xlsx', '.xls')): import pandas as pd diff --git a/crawler_service.py b/crawler_service.py index f20ce38..30b4384 100644 --- a/crawler_service.py +++ b/crawler_service.py @@ -21,19 +21,20 @@ async def run_crawler_service(): results = [] async with async_playwright() as p: - yield f"data: {json.dumps({'type': 'log', 'message': '브라우저 실행 중...'})}\n\n" - browser = await p.chromium.launch(headless=True, args=[ - "--no-sandbox", - "--disable-dev-shm-usage", - "--disable-blink-features=AutomationControlled" - ]) - context = await browser.new_context( - viewport={'width': 1920, 'height': 1080}, - user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36" - ) - page = await context.new_page() - + browser = None try: + yield f"data: {json.dumps({'type': 'log', 'message': '브라우저 실행 중...'})}\n\n" + browser = await p.chromium.launch(headless=True, args=[ + "--no-sandbox", + "--disable-dev-shm-usage", + "--disable-blink-features=AutomationControlled" + ]) + context = await browser.new_context( + viewport={'width': 1920, 'height': 1080}, + user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36" + ) + page = await context.new_page() + yield f"data: {json.dumps({'type': 'log', 'message': '사이트 접속 및 로그인 중...'})}\n\n" await page.goto("https://overseas.projectmastercloud.com/", wait_until="domcontentloaded") @@ -131,7 +132,10 @@ async def run_crawler_service(): yield f"data: {json.dumps({'type': 'done', 'data': results})}\n\n" + except GeneratorExit: + # SSE 연결이 클라이언트 측에서 먼저 끊겼을 때 실행 + if browser: await browser.close() except Exception as e: yield f"data: {json.dumps({'type': 'log', 'message': f'치명적 오류: {str(e)}'})}\n\n" finally: - await browser.close() + if browser: await browser.close() diff --git a/dashboard.html b/dashboard.html deleted file mode 100644 index 59e224b..0000000 --- a/dashboard.html +++ /dev/null @@ -1,360 +0,0 @@ - - - - - - - Project Master Overseas 관리자 - - - - - - - - -
-
-
-

프로젝트 현황

-
-
- -
접속자: 이태훈[전체관리자]
-
-
- - - - -
- -
-
- - - - - \ No newline at end of file diff --git a/debug_modal.html b/debug_modal.html index 8e345ea..31b4811 100644 --- a/debug_modal.html +++ b/debug_modal.html @@ -1,6 +1,6 @@
-
+
로그필터 @@ -10,11 +10,11 @@ 활동시간
시작 - +
종료 - +
@@ -35,64 +35,64 @@
파일 / 폴더관련 유저관련 기타 @@ -114,46 +114,15 @@ -
-
-