Skip to content

Commit

Permalink
chore: bump scaffold
Browse files Browse the repository at this point in the history
  • Loading branch information
northword committed Jan 5, 2025
1 parent e111e49 commit 0e6306c
Show file tree
Hide file tree
Showing 10 changed files with 376 additions and 1,583 deletions.
83 changes: 35 additions & 48 deletions addon/content/preferences.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@
<!-- 添加时自动执行格式化 -->
<checkbox
data-l10n-id="lint-on-item-added"
preference="__prefsPrefix__.lint.onAdded"
preference="lint.onAdded"
native="true"
/>
<!-- 添加时自动执行格式化(群组条目) -->
<checkbox
data-l10n-id="lint-on-groupItem-added"
preference="__prefsPrefix__.lint.onGroup"
preference="lint.onGroup"
native="true"
/>

<!-- 是否启用富文本工具框 -->
<checkbox
data-l10n-id="enable-richtext-toolbar"
preference="__prefsPrefix__.richtext.toolBar"
preference="richtext.toolBar"
native="true"
/>
<checkbox
data-l10n-id="enable-richtext-hotkey"
preference="__prefsPrefix__.richtext.hotkey"
preference="richtext.hotkey"
native="true"
disabled="true"
/>
Expand All @@ -43,19 +43,19 @@
<!-- 检测是否存在重复条目 -->
<checkbox
data-l10n-id="item-noDuplication"
preference="__prefsPrefix__.noDuplicationItems"
preference="noDuplicationItems"
native="true"
/>
<!-- 检测网页条目 -->
<checkbox
data-l10n-id="item-checkWebpage"
preference="__prefsPrefix__.checkWebpage"
preference="checkWebpage"
native="true"
/>
<!-- 检测预印本误存为期刊文章 -->
<checkbox
data-l10n-id="item-NoPreprintJournalArticle"
preference="__prefsPrefix__.noPreprintJournalArticle"
preference="noPreprintJournalArticle"
native="true"
/>
</groupbox>
Expand All @@ -66,13 +66,13 @@
<!-- 修改标题大小写 -->
<checkbox
data-l10n-id="title-sentenceCase"
preference="__prefsPrefix__.titleSentenceCase"
preference="titleSentenceCase"
native="true"
/>
<vbox class="indented-pref">
<checkbox
data-l10n-id="title-shortTitle"
preference="__prefsPrefix__.title.shortTitle"
preference="title.shortTitle"
native="true"
/>
<hbox align="center">
Expand All @@ -83,7 +83,7 @@
readonly="true"
size="50"
data-l10n-id="title-custom-term"
preference="__prefsPrefix__.title.customTermPath"
preference="title.customTermPath"
>
</html:input>
<button
Expand All @@ -99,7 +99,7 @@
</vbox>
<checkbox
data-l10n-id="title-dotend"
preference="__prefsPrefix__.titleDotEnd"
preference="titleDotEnd"
native="true"
/>
</groupbox>
Expand All @@ -110,52 +110,43 @@
<!-- 修改作者大小写 -->
<checkbox
data-l10n-id="creators-case"
preference="__prefsPrefix__.creatorsCase"
preference="creatorsCase"
native="true"
/>
<!-- 去除国籍 -->
<checkbox
data-l10n-id="creators-country"
preference="__prefsPrefix__."
native="true"
disabled="true"
/>
<checkbox data-l10n-id="creators-country" native="true" disabled="true" />
</groupbox>

<!-- 字段:语言 -->
<groupbox>
<label><html:h2 data-l10n-id="section-language" /></label>
<checkbox
data-l10n-id="language-fill"
preference="__prefsPrefix__.lang"
native="true"
/>
<checkbox data-l10n-id="language-fill" preference="lang" native="true" />
<vbox class="indented-pref">
<checkbox
id="__addonRef__-lang-only"
data-l10n-id="language-fill-option-only"
preference="__prefsPrefix__.lang.only"
preference="lang.only"
native="true"
/>
<vbox class="indented-pref">
<hbox align="center">
<checkbox
id="__addonRef__-lang-only-cmn"
data-l10n-id="language-fill-option-only-cmn"
preference="__prefsPrefix__.lang.only.cmn"
preference="lang.only.cmn"
native="true"
/>
<checkbox
id="__addonRef__-lang-only-eng"
data-l10n-id="language-fill-option-only-eng"
preference="__prefsPrefix__.lang.only.eng"
preference="lang.only.eng"
native="true"
/>
<label data-l10n-id="language-fill-option-only-other" />
<html:input
type="text"
id="__addonRef__-lang-only-other"
preference="__prefsPrefix__.lang.only.other"
preference="lang.only.other"
/>
<label
data-l10n-id="language-fill-option-only-other-doc"
Expand All @@ -176,11 +167,7 @@
<groupbox>
<label><html:h2 data-l10n-id="section-date" /></label>
<!-- 更新日期格式 -->
<checkbox
data-l10n-id="date-iso"
preference="__prefsPrefix__.dateISO"
native="true"
/>
<checkbox data-l10n-id="date-iso" preference="dateISO" native="true" />
</groupbox>

<!-- 字段:期刊名 -->
Expand All @@ -189,7 +176,7 @@
<!-- 修正期刊名大小写 -->
<checkbox
data-l10n-id="publicationTitle-case"
preference="__prefsPrefix__.publicationTitleCase"
preference="publicationTitleCase"
native="true"
/>
</groupbox>
Expand All @@ -200,36 +187,36 @@
<!-- 更新期刊缩写 -->
<checkbox
data-l10n-id="abbr-journal"
preference="__prefsPrefix__.abbr.journalArticle"
preference="abbr.journalArticle"
native="true"
/>
<vbox class="indented-pref">
<checkbox
id="__addonRef__-abbr-infer"
data-l10n-id="abbr-infer"
preference="__prefsPrefix__.abbr.infer"
preference="abbr.infer"
native="true"
/>
<hbox align="center">
<label data-l10n-id="abbr-usefull" />
<checkbox
id="__addonRef__-abbr-usefull"
data-l10n-id="abbr-usefull-en"
preference="__prefsPrefix__.abbr.usefull"
preference="abbr.usefull"
native="true"
/>
<checkbox
id="__addonRef__-abbr-usefull"
data-l10n-id="abbr-usefull-zh"
preference="__prefsPrefix__.abbr.usefullZh"
preference="abbr.usefullZh"
native="true"
/>
</hbox>
</vbox>
<!-- 更新会议名简写 -->
<checkbox
data-l10n-id="abbr-conferencePaper"
preference="__prefsPrefix__.abbr.conferencePaper"
preference="abbr.conferencePaper"
native="true"
/>

Expand All @@ -243,7 +230,7 @@
size="50"
id="__addonRef__-abbr-custom-path"
data-l10n-id="choose-custom-abbr-data-input"
preference="__prefsPrefix__.abbr.customDataPath"
preference="abbr.customDataPath"
>
</html:input>
<button
Expand All @@ -261,13 +248,13 @@
<!-- 去除期卷页0 -->
<checkbox
data-l10n-id="pages-remove-zeros"
preference="__prefsPrefix__.noExtraZeros"
preference="noExtraZeros"
native="true"
/>
<!-- 页码连接符 -->
<checkbox
data-l10n-id="pages-connector"
preference="__prefsPrefix__.pagesConnector"
preference="pagesConnector"
native="true"
/>
</groupbox>
Expand All @@ -278,7 +265,7 @@
<!-- 更新DOI格式 -->
<checkbox
data-l10n-id="doi-noPrefix"
preference="__prefsPrefix__.noDOIPrefix"
preference="noDOIPrefix"
native="true"
/>
</groupbox>
Expand All @@ -289,19 +276,19 @@
<!-- 纠正学位论文类别 -->
<checkbox
data-l10n-id="university-type"
preference="__prefsPrefix__.thesisType"
preference="thesisType"
native="true"
/>
<!-- 更新大学字段 -->
<checkbox
data-l10n-id="university-brackets"
preference="__prefsPrefix__.university"
preference="university"
native="true"
/>
<!-- 更新地点字段 -->
<checkbox
data-l10n-id="university-place"
preference="__prefsPrefix__.universityPlace"
preference="universityPlace"
native="true"
/>
</groupbox>
Expand All @@ -312,7 +299,7 @@
<!-- 清理被不合理占用的字段 -->
<checkbox
data-l10n-id="std-clean-fileld"
preference="__prefsPrefix__.cleanExtra"
preference="cleanExtra"
native="true"
disabled="true"
/>
Expand All @@ -325,7 +312,7 @@
<!-- 条目类型变更时要求确认 -->
<checkbox
data-l10n-id="update-metadata-confirm-when-itemtype-change"
preference="__prefsPrefix__.updateMetadate.confirmWhenItemTypeChange"
preference="updateMetadate.confirmWhenItemTypeChange"
native="true"
/>
<hbox align="center">
Expand All @@ -335,7 +322,7 @@
type="text"
size="60"
data-l10n-id="others-semanticScholarToken"
preference="__prefsPrefix__.semanticScholarToken"
preference="semanticScholarToken"
>
</html:input>
<label
Expand Down
75 changes: 38 additions & 37 deletions addon/prefs.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
pref("__prefsPrefix__.lint.onAdded", true);
pref("__prefsPrefix__.lint.onGroup", false);
pref("__prefsPrefix__.richtext.toolBar", true);
pref("__prefsPrefix__.richtext.hotkey", true);
pref("__prefsPrefix__.noDuplicationItems", true);
pref("__prefsPrefix__.checkWebpage", true);
pref("__prefsPrefix__.noPreprintJournalArticle", true);
pref("__prefsPrefix__.titleSentenceCase", true);
pref("__prefsPrefix__.title.shortTitle", true);
pref("__prefsPrefix__.title.customTermPath", "");
pref("__prefsPrefix__.titleDotEnd", true);
pref("__prefsPrefix__.creatorsCase", true);
pref("__prefsPrefix__.lang", true);
pref("__prefsPrefix__.lang.only", true);
pref("__prefsPrefix__.lang.only.cmn", true);
pref("__prefsPrefix__.lang.only.eng", true);
pref("__prefsPrefix__.lang.only.other", "");
pref("__prefsPrefix__.dateISO", true);
pref("__prefsPrefix__.publicationTitleCase", true);
pref("__prefsPrefix__.abbr.journalArticle", true);
pref("__prefsPrefix__.abbr.conferencePaper", true);
// pref("__prefsPrefix__.abbr.type", "ISO4dot");
pref("__prefsPrefix__.abbr.infer", true);
pref("__prefsPrefix__.abbr.usefull", false);
pref("__prefsPrefix__.abbr.usefullZh", false);
pref("__prefsPrefix__.abbr.customDataPath", "");
pref("__prefsPrefix__.noExtraZeros", true);
pref("__prefsPrefix__.pagesConnector", true);
pref("__prefsPrefix__.noDOIPrefix", true);
pref("__prefsPrefix__.university", true);
pref("__prefsPrefix__.thesisType", true);
pref("__prefsPrefix__.universityPlace", true);
pref("__prefsPrefix__.cleanExtra", false);
pref("__prefsPrefix__.updateMetadate.confirmWhenItemTypeChange", false);
pref("__prefsPrefix__.semanticScholarToken", "");
// pref("__prefsPrefix__.richtext.isEnableChem", true);
// pref("__prefsPrefix__.lintAfterRetriveByDOI", true);
pref("version", "0.0.0");
pref("lint.onAdded", true);
pref("lint.onGroup", false);
pref("richtext.toolBar", true);
pref("richtext.hotkey", true);
pref("noDuplicationItems", true);
pref("checkWebpage", true);
pref("noPreprintJournalArticle", true);
pref("titleSentenceCase", true);
pref("title.shortTitle", true);
pref("title.customTermPath", "");
pref("titleDotEnd", true);
pref("creatorsCase", true);
pref("lang", true);
pref("lang.only", true);
pref("lang.only.cmn", true);
pref("lang.only.eng", true);
pref("lang.only.other", "");
pref("dateISO", true);
pref("publicationTitleCase", true);
pref("abbr.journalArticle", true);
pref("abbr.conferencePaper", true);
// pref("abbr.type", "ISO4dot");
pref("abbr.infer", true);
pref("abbr.usefull", false);
pref("abbr.usefullZh", false);
pref("abbr.customDataPath", "");
pref("noExtraZeros", true);
pref("pagesConnector", true);
pref("noDOIPrefix", true);
pref("university", true);
pref("thesisType", true);
pref("universityPlace", true);
pref("cleanExtra", false);
pref("updateMetadate.confirmWhenItemTypeChange", false);
pref("semanticScholarToken", "");
// pref("richtext.isEnableChem", true);
// pref("lintAfterRetriveByDOI", true);
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"main": "src/index.ts",
"scripts": {
"start": "zotero-plugin serve",
"build": "tsc --noEmit && zotero-plugin build",
"build": "zotero-plugin build && tsc --noEmit",
"lint:check": "eslint .",
"lint:fix": "eslint . --fix",
"update-data": "bash data/update-data.sh",
Expand All @@ -40,15 +40,14 @@
},
"devDependencies": {
"@antfu/eslint-config": "^3.12.1",
"@release-it/keep-a-changelog": "^5.0.0",
"@types/node": "^22.10.3",
"@types/node": "^22.10.5",
"conventional-changelog": "^6.0.0",
"eslint": "^9.17.0",
"eslint-plugin-format": "^0.1.3",
"prettier": "^3.4.2",
"typescript": "^5.7.2",
"vitest": "^2.1.8",
"zotero-plugin-scaffold": "0.2.0-beta.13",
"zotero-plugin-scaffold": "0.2.0-beta.14",
"zotero-types": "^3.1.1"
}
}
Loading

0 comments on commit 0e6306c

Please sign in to comment.