Skip to content

Commit

Permalink
更新为0.0.15,增加删除其它、删除摘要
Browse files Browse the repository at this point in the history
  • Loading branch information
redleafnew committed May 28, 2022
1 parent faa6795 commit dce60b2
Show file tree
Hide file tree
Showing 7 changed files with 538 additions and 370 deletions.
3 changes: 3 additions & 0 deletions chrome/content/overlay.xul
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
<menuitem id="zotero-itemmenu-delatt" label="&zotero.delitem.delatt.label;" oncommand="Zotero.DelItem.DelAtt()"/> <!-- 仅删除附件 -->
<menuitem id="zotero-itemmenu-delsnap" label="&zotero.delitem.delsnap.label;" oncommand="Zotero.DelItem.DelSnap()"/> <!-- 仅删除快照 -->
<menuitem id="zotero-itemmenu-delnote" label="&zotero.delitem.delnote.label;" oncommand="Zotero.DelItem.DelNote()"/> <!-- 仅删除笔记 -->
<menuitem id="zotero-itemmenu-delextra" label="&zotero.delitem.delextra.label;" oncommand="Zotero.DelItem.DelExtra()"/> <!-- 仅删除其它 -->
<menuitem id="zotero-itemmenu-delabstract" label="&zotero.delitem.delabstract.label;" oncommand="Zotero.DelItem.DelAbstract()"/> <!-- 仅删除摘要 -->

</menupopup>
</menu>

Expand Down
845 changes: 475 additions & 370 deletions chrome/content/scripts/delitem.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions chrome/locale/en-US/diwa.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ delete.snapshot.sig = Are you sure you want to delete the snapsh
delete.snapshot.mul = Are you sure you want to delete the snapshots of the items?
delete.note.sig = Are you sure you want to delete the note of the item?
delete.note.mul = Are you sure you want to delete the notes of the items?
delete.extra.sig = Are you sure you want to delete the extra of the item?
delete.extra.mul = Are you sure you want to delete the extras of the items?
delete.abstract.sig = Are you sure you want to delete the abstract of the item?
delete.abstract.mul = Are you sure you want to delete the abstracts of the items?


file.is.open = The file can not be deleted. Please close the file if you have opened it and try again.
file.export.error = The file exporting error. Please close the file if you have opened it and try again.
file.exported.sig = attachment was exported to
Expand Down
4 changes: 4 additions & 0 deletions chrome/locale/en-US/overlay.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!ENTITY zotero.delitem.delsnap.label "Delete Snapshot(s) only">
<!ENTITY zotero.delitem.delnote.label "Delete Note(s) only">
<!ENTITY zotero.delitem.namehandler.label "Delete Attachment(s)">
<!ENTITY zotero.delitem.delextra.label "Delete Extra(s) only">
<!ENTITY zotero.delitem.delabstract.label "Delete Abstract(s) only">


<!-- 导出附件 -->
<!ENTITY zotero.delitem.exp.coll.atts.label "Export Attachment(s)">
<!ENTITY zotero.itemmenu.exp.att.label "Export Attachment(s)">
Expand Down
6 changes: 6 additions & 0 deletions chrome/locale/zh-CN/diwa.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ delete.snapshot.sig = 您确定将所选条目的快照移
delete.snapshot.mul = 您确定将所选条目的快照移动到回收站?
delete.note.sig = 您确定将所选条目的笔记删除?
delete.note.mul = 您确定将所选条目的笔记删除?
delete.extra.sig = 您确定将所选条目的其它内容删除?
delete.extra.mul = 您确定将所选条目的其它内容删除?
delete.abstract.sig = 您确定将所选条目的摘要删除?
delete.abstract.mul = 您确定将所选条目的摘要删除?


file.is.open = 无法删除文件。如果文件已经打开, 请关闭后重试。
file.export.error = 附件导出出错。如果文件已经打开, 请关闭后重试。
file.exported.sig = 个附件导出到
Expand Down
3 changes: 3 additions & 0 deletions chrome/locale/zh-CN/overlay.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<!ENTITY zotero.delitem.delsnap.label "仅删除快照">
<!ENTITY zotero.delitem.delnote.label "仅删除笔记">
<!ENTITY zotero.delitem.namehandler.label "删除附件">
<!ENTITY zotero.delitem.delextra.label "仅删除其它">
<!ENTITY zotero.delitem.delabstract.label "仅删除摘要">

<!-- 导出附件 -->
<!ENTITY zotero.delitem.exp.coll.atts.label "导出附件">
<!ENTITY zotero.itemmenu.exp.att.label "导出附件">
Expand Down
41 changes: 41 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/sh

# 文件来源于https://github.com/UB-Mannheim/zotero-ocr/blob/master/release.sh
# 和https://github.com/UB-Mannheim/zotero-ocr/blob/master/build.sh
read -p "Enter new version number: " version


##############
## Update install.rdf
##############

perl -pi -e "s/em:version=\"[^\"]*/em:version=\"$version/;" "install.rdf"
# rm "install.rdf.bak"
git add "install.rdf"


##############
## Update update.rdf
##############

perl -pi -e "s/<em:version>[^<]*/<em:version>$version/;" \
-e "s/<em:updateLink>[^<]*/<em:updateLink>https:\/\/github.com\/redleafnew\/delitemwithatt\/releases\/download\/$version\/delitemwithatt.xpi/;" \
-e "s/<em:updateInfoURL>[^<]*/<em:updateInfoURL>https:\/\/github.com\/redleafnew\/delitemwithatt\/releases\/tag\/$version/;" \
update.rdf
git add "update.rdf"
# rm "update.rdf.bak"

git commit -m "Release $version" 1>&2

##############
## 生成xpi
##############
#./build.sh "$version"

#version="$1"
#if [ -z "$version" ]; then
# read -p "Enter new version number: " version
#fi

rm -f delitemwithatt.xpi
zip -r delitemwithatt.xpi chrome/* chrome.manifest install.rdf

0 comments on commit dce60b2

Please sign in to comment.