feat: Refactor and reorganize project structure with new modules and files
- Deleted obsolete files including test scripts and configuration files to streamline the project. - Introduced new modules for handling Douyin functionalities, including core operations, logging, and GUI components. - Updated import paths to reflect the new module structure, enhancing code organization and maintainability. - Added configuration files and documentation to support the new structure and improve user guidance.
This commit is contained in:
1 parent
ea7159355b
commit
c67f22f76f
139 files changed
+7571
-7828
No files matched your search
@@ -0,0 +1,179 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
"""检查项目依赖库的安装状态"""
|
||||
|
||||
import sys
|
||||
import io
|
||||
|
||||
# 设置UTF-8输出
|
||||
if sys.platform == 'win32':
|
||||
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8', errors='replace')
|
||||
|
||||
dependencies = {
|
||||
'PIL': ('Pillow', 'Image Processing'),
|
||||
'cv2': ('opencv-python', 'Computer Vision'),
|
||||
'numpy': ('numpy', 'Numerical Computing'),
|
||||
'paddleocr': ('paddleocr', 'OCR Recognition'),
|
||||
'paddlepaddle': ('paddlepaddle', 'Deep Learning'),
|
||||
'ttkbootstrap': ('ttkbootstrap', 'GUI Framework'),
|
||||
'easyocr': ('easyocr', 'OCR Recognition (Optional)'),
|
||||
}
|
||||
|
||||
print("=" * 60)
|
||||
print("Dependency Check Report")
|
||||
print("=" * 60)
|
||||
print(f"Python Version: {sys.version}\n")
|
||||
|
||||
missing = []
|
||||
installed = []
|
||||
optional_missing = []
|
||||
|
||||
for module_name, (package_name, description) in dependencies.items():
|
||||
try:
|
||||
__import__(module_name)
|
||||
print(f"[OK] {package_name:20s} ({description:25s}) - Installed")
|
||||
installed.append(package_name)
|
||||
except ImportError:
|
||||
if module_name == 'easyocr':
|
||||
print(f"[OPT] {package_name:20s} ({description:25s}) - Not Installed (Optional)")
|
||||
optional_missing.append(package_name)
|
||||
else:
|
||||
print(f"[MISS] {package_name:20s} ({description:25s}) - Not Installed")
|
||||
missing.append(package_name)
|
||||
except Exception as e:
|
||||
print(f"[ERR] {package_name:20s} - Error: {e}")
|
||||
|
||||
print("\n" + "=" * 60)
|
||||
print("Summary")
|
||||
print("=" * 60)
|
||||
print(f"Installed: {len(installed)}/{len(dependencies)}")
|
||||
if missing:
|
||||
print(f"\nMissing Required Dependencies ({len(missing)}):")
|
||||
for pkg in missing:
|
||||
print(f" - {pkg}")
|
||||
if optional_missing:
|
||||
print(f"\nMissing Optional Dependencies ({len(optional_missing)}):")
|
||||
for pkg in optional_missing:
|
||||
print(f" - {pkg}")
|
||||
|
||||
if missing:
|
||||
print("\nInstall Command:")
|
||||
print(f"pip install {' '.join(missing)}")
|
||||
print("\nOr use:")
|
||||
print(" pip install -r requirements.txt")
|
||||
sys.exit(1)
|
||||
else:
|
||||
print("\n[SUCCESS] All required dependencies are installed!")
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user