MCDReforged/PluginCatalogue

Preserve `author`with link and `introduction` in `MetaInfo`?

Closed this issue · 1 comments

I suppose that all origin data of plugin_info.json will be copied to meta, and merged with plugin meta.

meta_info.authors = list(map(lambda a: a.name, plugin.authors))


For introduction in code, maybe parse introduction url first, and provide to meta branch, and use this url to get Text introduction. Or at least it should be a dict or null, instead of be removed.

e.g.

  • QBM:
"introduction": {
    "en_us": "https://raw.githubusercontent.com/MCDReforged/PluginCatalogue/master/plugins/quick_backup_multi/introduction-zh_cn.md",
    "zh_cn": "https://raw.githubusercontent.com/MCDReforged/PluginCatalogue/master/plugins/quick_backup_multi/introduction.md"
}
  • Bot:

"introduction": {
"en_us": "readme.md",
"zh_cn": "readme.md"
}

"introduction": {
    "en_us": "https://raw.githubusercontent.com/AnzhiZhang/MCDReforgedPlugins/master/bot/readme.md",
    "zh_cn": "https://raw.githubusercontent.com/AnzhiZhang/MCDReforgedPlugins/master/bot/readme.md"
}

introduction: Text

There are 2 kinds of information for a plugin:

  • The one as a valid MCDR plugin, stored in meta.json or mcdreforged.plugin.json
  • The one as a published plugin in this catalogue, stored in plugin_info.json

Although there are some shared data in these 2 kinds of information, it's not correct to just mix them together: the former one is required in each releases, but for the latter one only the latest is needed

There are 2 fields in your request: author and introduction

  • For the author fields, the request is reasonable, but it's not good to just put everything inside the author array. I'll add a separated file to store all authors information
  • For the introduction field, it's part of the information of a published plugin, which means I'll also store that into another file, like the meta branch version of the plugin_info.json. I was mixing these 2 information kinds in the solution of #256, and now it's going to be fixed