How yuangezhizao/6dylan6-jdpro works
Main Components
• Task Executor/Script Engine: Represent the many individual scripts (named “jd_*”, “jx_*”, etc.) that perform operations. These scripts form the core of the application.
• Configuration Management: Depicted by the “config” directory and the dynamic environment variables (e.g., JD_COOKIE, notification keys, proxy settings). This component loads system configurations.
• Notification Module: Highlight components like “sendNotify.js/sendNotify.py” and references in the README that cover multiple notification methods (server酱, tg bot, enterprise chat bots, etc.).
• Utility Modules: Include “function” and “utils” directories. These include helper functions, caching (e.g., function/cache), common libraries, proxies, and specialized modules like “Rebels” for enhanced operations.
• Backup/Safe Scripts: The “backUp” directory with additional scripts to manage or kill keys shows that there is a secondary safety or management layer.
Relationships and Data Flow
• The Configuration Module feeds critical information (such as cookies, proxies, and API keys) into both the Task Executor and Notification Module.
• The Task Executor reads from the configuration to run the JD (and related) tasks. It concurrently executes scripts as determined by Cron jobs in Qinglong.
• The Notification Module receives status updates or alerts from the Task Executor and then dispatches messages via various integrated platforms.
• The Utility Modules support common operations (like encryption, token generation, cache management) that are used by many JD task scripts.
• Docker (and its associated scripts) acts as the deployment and orchestration layer, ensuring that all modules are correctly containerized and that tasks run in the intended environment.
Architectural Patterns & Design Principles
• Modularity: The file structure is clearly modular (with separate directories for functions, utilities, backUp, and docker). Each module is responsible for a distinct aspect of the system.
• Configuration Driven: Environment variables and configuration files (found in “config”) are central in determining behavior. This separation ensures that deployments can be customized easily.
• Extensibility: The use of multiple similarly prefixed scripts (jd_, jx_, etc.) suggests that new tasks can be added modularly.
• Deployment and Containerization: The docker directory demonstrates a best practice of containerization for deployment in stable environments (like the specified Qinglong Docker image).
Relevant Technologies, Frameworks, and Libraries
• JavaScript: The core language used for tasks.
• Python: Some Python scripts indicate cross-language support.
• Docker & Docker Compose: For containerization and orchestration.
• Qinglong Environment: As the scheduling and execution system.
• Notification APIs: Integration with various messaging platforms (server酱, go-cqhttp, etc.).