-
Notifications
You must be signed in to change notification settings - Fork 19
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
从 xpi 包获取 id 和 description #49
Conversation
另外,是否需要考虑对于同时存在z6、z7的插件,开发者使用了不同的id的极端情况?(目前未遇到) |
无法正确获取到极个别插件id
严格的来说,id 变更就意味着已经是两个插件了,所以我觉得可以不用考虑?(主要是现在也没遇到)(我的想法是以从7里面获取到的为主) |
考虑了下也行,如果真遇到了,在plugins内把对应插件拆成两个就行。 |
或者就是,id 不放 |
两种方案都可行吧。 |
This comment was marked as outdated.
This comment was marked as outdated.
下面是没有考虑不同版本 id 不同的,感觉应该是和 zotero-addons-scraper 比较接近的,你看下需不需要修改呢? 优先从 另外为了节省传输的体积, [
{
"name": "Zotero Format Metadata",
"repo": "northword/zotero-format-metadata",
"releases": [
{
"targetZoteroVersion": "7",
"tagName": "latest",
"currentVersion": "1.6.11",
"assetId": 135864033,
"releaseData": "2023-11-16T14:35:35Z",
"downloadCount": 2250,
"xpiDownloadUrl": {
"github": "https://github.com/northword/zotero-format-metadata/releases/download/1.6.11/zotero-format-metadata.xpi",
"gitee": "https://gitee.com/northword/zotero-plugins/raw/gh-pages/dist/xpi/135864033.xpi",
"ghProxy": "https://ghproxy.com/?q=https://github.com/northword/zotero-format-metadata/releases/download/1.6.11/zotero-format-metadata.xpi",
"jsdeliver": "https://cdn.jsdelivr.net/gh/northword/zotero-plugins@gh-pages/dist/xpi/135864033.xpi",
"kgithub": "https://kkgithub.com/northword/zotero-format-metadata/releases/download/1.6.11/zotero-format-metadata.xpi"
}
},
{
"targetZoteroVersion": "6",
"tagName": "0.4.4",
"currentVersion": "0.4.4",
"assetId": 112232528,
"releaseData": "2023-06-11T06:51:01Z",
"downloadCount": 12669,
"xpiDownloadUrl": {
"github": "https://github.com/northword/zotero-format-metadata/releases/download/0.4.4/zotero-format-metadata.xpi",
"gitee": "https://gitee.com/northword/zotero-plugins/raw/gh-pages/dist/xpi/112232528.xpi",
"ghProxy": "https://ghproxy.com/?q=https://github.com/northword/zotero-format-metadata/releases/download/0.4.4/zotero-format-metadata.xpi",
"jsdeliver": "https://cdn.jsdelivr.net/gh/northword/zotero-plugins@gh-pages/dist/xpi/112232528.xpi",
"kgithub": "https://kkgithub.com/northword/zotero-format-metadata/releases/download/0.4.4/zotero-format-metadata.xpi"
}
}
],
"description": "Linter for Zotero. An addon for Zotero to format item metadata. Shortcut to set rich text, set journal abbreviations, university places, item languages, etc.",
"star": 164,
"watchers": 164,
"author": {
"name": "Northword",
"url": "https://northword.dev",
"avatar": "https://avatars.githubusercontent.com/u/44738481?v=4"
},
"id": "zotero-format-metadata@northword.cn"
},
{
"name": "Chartero",
"repo": "volatile-static/Chartero",
"releases": [
{
"targetZoteroVersion": "6",
"tagName": "latest",
"currentVersion": "2.2.0",
"assetId": 137018637,
"releaseData": "2023-11-23T05:28:49Z",
"downloadCount": 1278,
"xpiDownloadUrl": {
"github": "https://github.com/volatile-static/Chartero/releases/download/2.2.0/chartero.xpi",
"gitee": "https://gitee.com/northword/zotero-plugins/raw/gh-pages/dist/xpi/137018637.xpi",
"ghProxy": "https://ghproxy.com/?q=https://github.com/volatile-static/Chartero/releases/download/2.2.0/chartero.xpi",
"jsdeliver": "https://cdn.jsdelivr.net/gh/northword/zotero-plugins@gh-pages/dist/xpi/137018637.xpi",
"kgithub": "https://kkgithub.com/volatile-static/Chartero/releases/download/2.2.0/chartero.xpi"
}
}
],
"description": "Chart in Zotero",
"star": 233,
"watchers": 233,
"author": {
"name": "volatile-static",
"url": "https://github.com/volatile-static",
"avatar": "https://avatars.githubusercontent.com/u/59945270?v=4"
},
"id": "chartero@volatile.static"
}
] |
get,没问题 |
CC @volatile-static , 这个 PR 里变更了 ts-node,也许你要看下你那边能不能正常运行(我觉得是没啥问题的) |
我暂时不需要本地跑了。你那边测着正常就ok |
ref: #41
修改
ts-node
为tsc
,因为ts-node
+ Node.js 20.x + ESM 似乎不兼容,见import
statements in ts file or not being able to run.ts
files TypeStrong/ts-node#2086reportTSError
are not serialised correctly when using ESM loader TypeStrong/ts-node#2026从 xpi 获取
plugin.id
,若plugin.description
为空,则从 xpi 补全。待办:补全
description
,install.rdf
结构居然不一样,需要额外适配一下:奇怪的 rdf 再加一:(
em:id
)