update releaseData to releaseDate
This commit is contained in:
parent
fc8daa01ec
commit
c8a40fddc0
@ -11,6 +11,7 @@ ghProxy = "ghProxy"
|
||||
jsdeliver = "jsdeliver"
|
||||
kgithub = "kgithub"
|
||||
releaseData = "releaseData"
|
||||
releaseDate = "releaseDate"
|
||||
downloadCount = "downloadCount"
|
||||
assetId = "assetId"
|
||||
id = "id"
|
||||
@ -25,7 +26,7 @@ avatar = "avatar"
|
||||
# from https://github.com/zotero-chinese/zotero-plugins/blob/main/src/plugins.ts
|
||||
# export interface PluginInfo {
|
||||
# // plugin id
|
||||
# // @deprecated This property is deprecated. Use the id in releases instead.
|
||||
# // @deprecated This property is deprecated. Use `id` in releases instead.
|
||||
# id?: string;
|
||||
#
|
||||
# // plugin name
|
||||
@ -45,7 +46,7 @@ avatar = "avatar"
|
||||
# // `pre`: Latest pre-release
|
||||
# // `string`: Corresponding to the `git.tag_name` of the release;
|
||||
# tagName: "latest" | "pre" | string;
|
||||
# // @deprecated This property is deprecated. Use tagName instead.
|
||||
# // @deprecated This property is deprecated. Use `tagName` instead.
|
||||
# currentVersion?: string;
|
||||
# xpiDownloadUrl?: {
|
||||
# github: string;
|
||||
@ -54,6 +55,8 @@ avatar = "avatar"
|
||||
# jsdeliver: string;
|
||||
# kgithub: string;
|
||||
# };
|
||||
# releaseDate?: string;
|
||||
# // @deprecated This property is deprecated. Use `releaseDate` instead.
|
||||
# releaseData?: string;
|
||||
# downloadCount?: number;
|
||||
# assetId?: number;
|
||||
|
||||
8
main.py
8
main.py
@ -111,7 +111,7 @@ def parse(plugin, **kwargs):
|
||||
release[tagName] = release_info['tag_name']
|
||||
# todo: 删除currentVersion
|
||||
# zotero-addons插件相关:
|
||||
# 等待影响降低后再删除 (影响2023-12-14日之前的版本)
|
||||
# 等待影响降低后再删除 (影响2023-12-14日[1.4.0]之前的版本)
|
||||
release[currentVersion] = release_info['tag_name']
|
||||
|
||||
if 'assets' not in release_info:
|
||||
@ -129,6 +129,10 @@ def parse(plugin, **kwargs):
|
||||
release[assetId] = release_asset['id']
|
||||
if 'download_count' in release_asset:
|
||||
release[downloadCount] = release_asset['download_count']
|
||||
release[releaseDate] = release_asset['updated_at']
|
||||
# todo: releaseData
|
||||
# zotero-addons插件相关:
|
||||
# 等待影响降低后再删除 (影响2023-12-18日[1.4.1]之前的版本)
|
||||
release[releaseData] = release_asset['updated_at']
|
||||
release[xpiDownloadUrl] = {
|
||||
'github': xpi_url,
|
||||
@ -162,7 +166,7 @@ def parse(plugin, **kwargs):
|
||||
release[id] = detail_id
|
||||
# todo: 删除plugin外层的id
|
||||
# zotero-addons插件相关:
|
||||
# 等待影响降低后再删除 (影响2023-12-14日之前的版本)
|
||||
# 等待影响降低后再删除 (影响2023-12-14日[1.4.0]之前的版本)
|
||||
plugin[id] = detail_id
|
||||
if not plugin.get(name) and (detail_name := details.get('name')):
|
||||
plugin[name] = detail_name
|
||||
|
||||
Loading…
Reference in New Issue
Block a user