SOY NV AI commited on
Commit ·
cb9dbfe
1
Parent(s): ca24d52
濡쒖뺄 ?묒뾽 ?댁슜 ?낅뜲?댄듃
Browse files
check_recent_files.py
CHANGED
|
@@ -1,67 +1,12 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
if not db_path.exists():
|
| 11 |
-
print("데이터베이스 파일을 찾을 수 없습니다.")
|
| 12 |
-
exit(1)
|
| 13 |
-
|
| 14 |
-
try:
|
| 15 |
-
conn = sqlite3.connect(str(db_path))
|
| 16 |
-
cursor = conn.cursor()
|
| 17 |
-
|
| 18 |
-
# 최근 업로드된 파일 20개 확인
|
| 19 |
-
cursor.execute("""
|
| 20 |
-
SELECT id, original_filename, model_name, tags, uploaded_at, uploaded_by
|
| 21 |
-
FROM uploaded_file
|
| 22 |
-
ORDER BY uploaded_at DESC
|
| 23 |
-
LIMIT 20
|
| 24 |
-
""")
|
| 25 |
-
|
| 26 |
-
files = cursor.fetchall()
|
| 27 |
-
|
| 28 |
-
print(f"최근 업로드된 파일 목록 (최대 20개):")
|
| 29 |
-
print("=" * 100)
|
| 30 |
-
print(f"{'ID':<5} {'파일명':<40} {'모델':<20} {'태그':<10} {'업로드 시간':<20} {'업로드자':<10}")
|
| 31 |
print("-" * 100)
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
model_short = (model_name[:17] + "...") if model_name and len(model_name) > 20 else (model_name or "없음")
|
| 36 |
-
has_tags = "있음" if tags and tags.strip() else "없음"
|
| 37 |
-
uploaded_at_str = uploaded_at[:19] if uploaded_at else "없음"
|
| 38 |
-
|
| 39 |
-
print(f"{file_id:<5} {filename_short:<40} {model_short:<20} {has_tags:<10} {uploaded_at_str:<20} {uploaded_by or '없음':<10}")
|
| 40 |
-
|
| 41 |
-
print("=" * 100)
|
| 42 |
-
|
| 43 |
-
# 태그가 있는 파일 상세 정보
|
| 44 |
-
cursor.execute("""
|
| 45 |
-
SELECT id, original_filename, tags
|
| 46 |
-
FROM uploaded_file
|
| 47 |
-
WHERE tags IS NOT NULL AND tags != ''
|
| 48 |
-
""")
|
| 49 |
-
|
| 50 |
-
tagged_files = cursor.fetchall()
|
| 51 |
-
|
| 52 |
-
if tagged_files:
|
| 53 |
-
print(f"\n태그가 있는 파일 상세:")
|
| 54 |
-
for file_id, filename, tags in tagged_files:
|
| 55 |
-
print(f"\n 파일 ID: {file_id}")
|
| 56 |
-
print(f" 파일명: {filename}")
|
| 57 |
-
print(f" 태그 길이: {len(tags)} 문자")
|
| 58 |
-
else:
|
| 59 |
-
print("\n태그가 있는 파일이 없습니다.")
|
| 60 |
-
|
| 61 |
-
conn.close()
|
| 62 |
-
|
| 63 |
-
except Exception as e:
|
| 64 |
-
print(f"오류 발생: {e}")
|
| 65 |
-
import traceback
|
| 66 |
-
traceback.print_exc()
|
| 67 |
-
|
|
|
|
| 1 |
+
from app import create_app
|
| 2 |
+
from app.database import db, UploadedFile
|
| 3 |
+
import os
|
| 4 |
+
|
| 5 |
+
app = create_app()
|
| 6 |
+
with app.app_context():
|
| 7 |
+
files = UploadedFile.query.order_by(UploadedFile.id.desc()).limit(5).all()
|
| 8 |
+
print(f"{'ID':<5} | {'Filename':<30} | {'Path':<50} | {'Exists':<6}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
print("-" * 100)
|
| 10 |
+
for f in files:
|
| 11 |
+
exists = os.path.exists(f.file_path)
|
| 12 |
+
print(f"{f.id:<5} | {f.original_filename[:30]:<30} | {f.file_path[:50]:<50} | {exists}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
force_update_menu.py
CHANGED
|
@@ -56,5 +56,6 @@ if __name__ == "__main__":
|
|
| 56 |
|
| 57 |
|
| 58 |
|
|
|
|
| 59 |
|
| 60 |
|
|
|
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
+
|
| 60 |
|
| 61 |
|
templates/admin_webtoon_milestone_producer_manager.html
CHANGED
|
@@ -352,3 +352,4 @@
|
|
| 352 |
|
| 353 |
|
| 354 |
|
|
|
|
|
|
| 352 |
|
| 353 |
|
| 354 |
|
| 355 |
+
|