-
Notifications
You must be signed in to change notification settings - Fork 103
[+] Chusan events convert tool #143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
noarchwastaken
wants to merge
1
commit into
MewoLab:v1-dev
Choose a base branch
from
noarchwastaken:chusan_events_script
base: v1-dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chusan_game_event 表的实体关系图erDiagram
chusan_game_event {
int id PK "事件 ID"
int type "事件类型"
datetime start_date "开始日期"
datetime end_date "结束日期"
boolean enable "是否启用"
}
文件级别更改
提示和命令与 Sourcery 互动
自定义您的体验访问您的 仪表板 以:
获得帮助Original review guide in EnglishReviewer's GuideIntroduces a new Python-based CLI tool that scans given directories for event XMLs, extracts event IDs and types, and assembles a multi-line SQL migration script. Sequence Diagram for Event XML to SQL Conversion ProcesssequenceDiagram
actor User
participant Script as "chusan-events.py"
participant FileSystem as "File System"
User->>Script: Execute with <dir_name>...
Script->>FileSystem: For each <dir_name>:
Script->>FileSystem: Access <dir_name>/event/
Script->>FileSystem: List subdirectories in event/
loop For each event subdirectory
Script->>FileSystem: Access Event.xml
alt Event.xml exists
Script->>FileSystem: Read Event.xml
Script->>Script: Parse XML, extract id & type (extract_id_type function)
Script->>Script: Format SQL INSERT value string
else Event.xml does not exist
Script->>Script: Skip directory
end
end
Script->>User: Print combined SQL INSERT statement
Entity Relationship Diagram for the chusan_game_event TableerDiagram
chusan_game_event {
int id PK "Event ID"
int type "Event Type"
datetime start_date "Start Date"
datetime end_date "End Date"
boolean enable "Is Enabled"
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
3afe88f
to
4d1b9af
Compare
4d1b9af
to
97ed4b6
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It takes option folders and convert the events to database migration scripts.
好的,这是翻译成中文的 pull request 摘要:
Sourcery 提供的摘要
添加一个 CLI 工具,用于将 Chusan 活动 XML 文件转换为 chusan_game_event 的 SQL 迁移脚本
新功能:
Original summary in English
Summary by Sourcery
Add a CLI tool to convert Chusan event XML files into SQL migration scripts for chusan_game_event
New Features: