feat(mods): 实现模组列表导出功能#6233
Conversation
实现模组列表导出功能,支持CSV和JSON格式,可自定义导出字段
3gf8jv4dv
left a comment
There was a problem hiding this comment.
默认窗口大小下,对话框高度几乎撑满窗口了。要不限制一下?
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
|
解决一下CheckStyle? |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a feature to export the mod list to CSV or JSON format, including a UI dialog for selecting export formats and fields, and backend logic for generating the files and computing SHA1/SHA512 hashes. The review feedback highlights three critical improvements: offloading the export and hash computation to a background thread to prevent blocking the JavaFX UI thread, adding defensive null checks when retrieving mod field values to avoid potential NullPointerExceptions, and localizing the hardcoded English labels in the export dialog to support proper internationalization.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
会不会考虑做成 Prsim 那样,导出的格式更多一点,还能自定义 |
|
话说支不支持mcmod的格式? (方便整合包作者) |
具体是什么格式 |
…o modlist-output
https://www.mcmod.cn/class/2995.html https://bbs.mcmod.cn/thread-21260-1-1.html 应该是这种格式吧 |
已支持 |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a feature to export the mod list to CSV, JSON, or custom text formats asynchronously, complete with a configuration dialog in the UI and corresponding localization updates. The review feedback highlights several key areas for improvement: addressing thread-safety issues by replacing the remoteModInfoCache's HashMap with a ConcurrentHashMap, preventing potential NullPointerExceptions by adding null checks for fetched remote addons, improving error dialogs when exception.getMessage() is null, refactoring duplicated emoji-filtering logic, and resolving performance bottlenecks caused by sequential network requests during bulk exports.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
当异常无详细信息时,使用异常类全名代替空提示,让用户能获取足够的错误信息
3gf8jv4dv
left a comment
There was a problem hiding this comment.
我尝试在 Fabulously Optimized 里导出,但排最上面/最左边的不是模组名/模组 ID,而是 CF 的 URL。感觉如果人要去读的话不太友好。
| mods.export.field.mod_loader_type=Mod Loader Type | ||
| mods.export.field.mcmod_id=MCMod ID | ||
| mods.export.field.abbr=Abbreviation | ||
| mods.export.field.chinese_name=Chinese Name |
There was a problem hiding this comment.
这个字段是其他工具/模组会使用的么?建议明确一下「简体中文译名」
There was a problem hiding this comment.
噢,我怕改了字段其他地方不兼容。其实我想建议改成 simpChineseName。
There was a problem hiding this comment.
噢,我怕改了字段其他地方不兼容。其实我想建议改成
simpChineseName。
我看其他地方都是说 Chinese Name 的呀🤔
There was a problem hiding this comment.
我看其他地方都是说
Chinese Name的呀🤔
看了下代码,确实。那就不动了。
| extension.csv=CSV Files | ||
| extension.json=JSON Files | ||
| extension.txt=Text Files | ||
| button.export=Export |
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
这里的网盘连接过期了,找不到源文件,也没有讲是啥格式( |
我看了下,bbs.mcmod.cn 链接里说是用 https://www.mcmod.cn/class/2995.html 这个模组。 用这个模组导出的结构,和这个 PR JSON 格式的一致。 |
支持CSV和JSON格式,可自定义导出字段
要在模组列表选择要导出的项,然后就有导出清单按钮
close #6158