From 321b1c03a093a31eb28af8a4baf8168ef01d7f17 Mon Sep 17 00:00:00 2001 From: user01 Date: Fri, 17 Jul 2026 11:27:16 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=BC=EB=8B=A8=20=EC=A0=80=EC=9E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MgrCalibreUI.py | 55 ++++--------------------------------------------- 1 file changed, 4 insertions(+), 51 deletions(-) diff --git a/MgrCalibreUI.py b/MgrCalibreUI.py index bc6f6fc..976d009 100644 --- a/MgrCalibreUI.py +++ b/MgrCalibreUI.py @@ -1,6 +1,5 @@ import sys import os -import json import shutil import UtilPack as util import DataClass_Pupil as pupil @@ -235,15 +234,12 @@ class MyApp(QMainWindow): btn_ChkDuplicate.clicked.connect(self.on_btn_Validate_clicked) btn_Archive = QPushButton("압축 및 데이터 저장") btn_Archive.clicked.connect(self.on_btn_Archive_clicked) - btn_EnterCalibre = QPushButton("컬리버에 삽입") - btn_EnterCalibre.clicked.connect(self.on_btn_EnterCalibre_clicked) - btn_MakeDownList = QPushButton("다운로드 목록 생성") - btn_MakeDownList.clicked.connect(self.on_btn_MakeDownList_clicked) + btn_EnterCalibre = QPushButton(".Download 리스트 작성") + btn_EnterCalibre.clicked.connect(self.on_btn_MakeDownList_clicked) layout_mid.addWidget(btn_ChkDuplicate) layout_mid.addWidget(btn_Archive) layout_mid.addWidget(btn_EnterCalibre) - layout_mid.addWidget(btn_MakeDownList) self.tableWidget_Src = QTableWidget() self.tableWidget_Src.verticalHeader().setVisible(False) @@ -583,53 +579,10 @@ class MyApp(QMainWindow): # - def on_btn_EnterCalibre_clicked(self): + def on_btn_MakeDownList_clicked(self): pass - # - def on_btn_MakeDownList_clicked(self): - folder_path = QFileDialog.getExistingDirectory(self, '폴더 선택', '') - if util.IsEmptyStr(folder_path): - return - - result = {} - listDirs = util.ListChildDirectories(folder_path) - for item in listDirs: - pathDir = os.path.join(folder_path, item) - if not os.path.isdir(pathDir): - continue - - metadataPath = os.path.join(pathDir, ".metadata") - if not os.path.exists(metadataPath): - continue - - data = pupil.PupilData(metadataPath) - if data.m_data is None: - continue - - title = data.GetTitle() - strID = data.GetHitomiID() - if util.IsEmptyStr(strID): - strID = util.GetTextInBrakets(item)[0] - - nImgListLen = data.GetImgFileCount() - nImgFileCnt = len(util.ListContainFiles(pathDir)) - - if nImgFileCnt <= 0 or nImgListLen <= 0 or nImgFileCnt != nImgListLen: - if not util.IsEmptyStr(strID): - result[strID] = title - - if result: - timestamp = util.GetCurrentTime() - filename = f"download_{timestamp}.json" - savePath = os.path.join(folder_path, filename) - with open(savePath, "w", encoding="utf-8") as f: - json.dump(result, f, ensure_ascii=False, indent=2) - util.DbgOut(f"다운로드 목록이 생성되었습니다: {savePath}", True) - else: - util.DbgOut("완료되지 않은 다운로드가 없습니다.", True) - - """ +""" if __name__ == '__main__': app = QApplication(sys.argv)