# Python 脚本工具 **Repository Path**: sound-of-the-string/python-utils ## Basic Information - **Project Name**: Python 脚本工具 - **Description**: 实用小脚本、工具类代码 - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2026-07-16 - **Last Updated**: 2026-07-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Python Utility Collection A collection of various practical Python tools, primarily for file organization and clothing cleaning data processing. ## Project Structure ``` python-utils/ ├── clothes_clean/ # Clothing cleaning tools │ ├── generate_excel.py # Excel generation script │ ├── index.html # Web interface │ └── mold_removal_methods.csv # Mold removal methods data └── file_arrange/ # File organization tools ├── auto_process.py # Automated document processing (OCR, text extraction) ├── dashboard_server.py # Data dashboard server ├── launcher.py # Launcher ├── physics_auto_process.py # Physics-specific file processing └── physics_dashboard_server.py # Physics data dashboard ``` ## Features ### 1. Clothing Cleaning Tools (clothes_clean) - **Excel Generation**: Generate cleaning recommendation tables from data - **Web Interface**: Visualize mold removal methods, problem analysis, radar charts, etc. - **Mold Removal Library**: Contains multiple clothing mold removal and cleaning solutions ### 2. File Organization Tools (file_arrange) #### General Features - **OCR Document Recognition**: Extract text from images - **Text Extraction**: Extract text and images from Word documents - **Student Name Matching**: Automatically identify student information from filenames - **Deduplication**: Detect and handle duplicate submissions - **Data Dashboard**: Web interface displaying statistical information #### Physics-Specific Features - Specialized processing workflow for physics assignment files - Physics-specific data dashboard ## Quick Start ### Prerequisites - Python 3.7+ - Required dependencies (see import statements in the code) ### Installation ```bash # Clone the repository git clone https://gitee.com/sound-of-the-string/python-utils.git cd python-utils ``` ### Usage #### File Organization Tools ```bash # Launch file processing and dashboard cd file_arrange python launcher.py ``` Or start components separately: ```bash # Launch automated processing python file_arrange/auto_process.py # Launch dashboard python file_arrange/dashboard_server.py ``` #### Clothing Cleaning Tools ```bash # Run Excel generation python clothes_clean/generate_excel.py ``` ## Main Module Details ### file_arrange/auto_process.py | Function | Description | |----------|-------------| | `load_tracker()` | Load processing tracking data | | `save_tracker()` | Save processing tracking data | | `_get_ocr()` | Initialize OCR engine | | `_ocr_image_bytes()` | Extract text from images | | `_extract_docx_text()` | Extract text from Word documents | | `_extract_docx_images()` | Extract images from Word documents | | `extract_text_parallel()` | Process multiple documents in parallel | | `match_student_name()` | Match student names from filenames | | `verify_document()` | Validate document content | | `deduplicate_files()` | Remove duplicate files | | `scan_and_process()` | Scan and process files | | `print_summary()` | Print processing summary | ### file_arrange/launcher.py - `_check_port()`: Check port availability - `run_processing()`: Run file processing - `run_dashboards()`: Start dashboard services ## Technology Stack - Python 3.7+ - http.server - Built-in HTTP server - OCR image recognition - python-docx - Word document processing - Pandas - Data processing ## License This project is intended solely for learning and communication purposes. ## Contribution Guidelines Pull requests and issues are welcome to improve this utility collection.