How zhenda-hub/random_recipe works
Project Type and Purpose
• This is a standalone desktop application built with Python and PyQt5.
• It provides a “random choice” utility: users load or edit option pools (stored as text files), click a button, and the tool picks an item at random.
File‐Structure Analysis
• Top level:
• main_gui.py – entry point, sets up the Qt application and main window.
• requirements.txt & freeze.yml – environment and dependency specs.
• settings/ – folder of plain‑text option pools (e.g., “美食.txt”, “旅游地选择.txt”).
• ui/ – Qt Designer files (.ui) and their Python wrappers (random_recipe.py, random_recipe2.py).
• Patterns:
• UI layer separated into .ui and generated Python wrappers.
• Configuration as text resources, loaded at runtime.
• Business logic (random selection, config management) in main_gui.py or imported modules.
Key README Insights
• Built on PyQt5.
• Users can freely add/remove option files.
• Packaged via PyInstaller for distribution.
Detailed Checklist
• [ ] UI Layer: .ui files → Python wrappers → Qt Widgets
• [ ] Controller: main_gui.py binds UI to services
• [ ] Random‐Selection Service: logic module
• [ ] Configuration Data: settings/*.txt
• [ ] Static Resources: statics/food.ico, images
• [ ] External Dependencies: PyQt5, Python runtime
• [ ] Build/Packaging: PyInstaller step