[Item] item_Flow_Notes #1016
ramonmi
started this conversation in
Note Templates
Replies: 1 comment
-
Green Frog插件 0.19.02 版本后,无法使用 [Item] item_Flow_Notes // @author ramonmi(ramonmi@163.com)
<h1><strong>✳️Flow笔记🆙</strong>${topItem.getField('title')}</h1>
<p>Authors: ${topItem.getCreators().map((v)=>v.firstName+" "+v.lastName).join("; ")}</p>
<p style="background-color: #efe3da;">📆Date: ${topItem.getField('date')}  🔗附件: <a href=${{
async function getPDFLink(item) {
const att = await item.getBestAttachment();
if (!att || !att.isPDFAttachment()) {
return "";
}
key = att.key;
if (att.libraryID === 1) {
return `zotero://open-pdf/library/items/${key}`;
} else {
groupID = Zotero.Libraries.get(att.libraryID).id;
return `zotero://open-pdf/groups/${groupID}/items/${key}`;
}
}
sharedObj.getPDFLink = getPDFLink;
return await getPDFLink(topItem);
}}$>${{
async function getPDFTitle(item) {
const att = await item.getBestAttachment();
if (!att || !att.isPDFAttachment()) {
return "";
}
let title = att.getField('title');
return `${title}`;
}
sharedObj.getPDFTitle = getPDFTitle;
return await getPDFTitle(topItem);
}}$</a></p>
<p style="background-color: #efe3da;">🔴Journal: ${topItem.getField('journalAbbreviation')}  🔴DOI: <a href="https://doi.org/${topItem.getField('DOI')}">${topItem.getField('DOI')}</a>
<p style="background-color: #efe3da;">🔴中科院分区升级版:
<!-- 获取extra数据并正则提取 -->
${(topItem.getField("extra").match(/中科院分区升级版: \s*(.*?)($|\n)/) ? topItem.getField("extra").match(/中科院分区升级版: \s*(.*?)($|\n)/)[0]:"").replace(/(\r\n)|(\n)/g,"").split(":").slice(1)}${(topItem.getField("extra").match(/中科院升级版Top分区: \s*(.*?)($|\n)/) ? topItem.getField("extra").match(/中科院升级版Top分区: \s*(.*?)($|\n)/)[0]:"").replace(/(\r\n)|(\n)/g,"").split(":").slice(1)}  🔴IF: ${(topItem.getField("extra").match(/影响因子: \s*(.*?)($|\n)/) ? topItem.getField("extra").match(/影响因子: \s*(.*?)($|\n)/)[0]:"").replace(/(\r\n)|(\n)/g,"").split(":").slice(1)}  🔴JCR分区: ${(topItem.getField("extra").match(/JCR分区: \s*(.*?)($|\n)/) ? topItem.getField("extra").match(/JCR分区: \s*(.*?)($|\n)/)[0]:"").replace(/(\r\n)|(\n)/g,"").split(":").slice(1)}</p>
<hr>
<h2 style="color: #1565C0; background-color: #E0F7FA;"><strong>🎓 Keypoint 1</strong></h2>
<blockquote>
<p></p>
<p></p>
</blockquote>
<hr>
<h2 style="color: #1565C0; background-color: #E0F7FA;"><strong>🎓 Keypoint 2</strong></h2>
<blockquote>
<p></p>
<p></p>
</blockquote>
<hr>
<h2 style="color:red; background-color: #efe3da;"><strong>🎓 我的评价</strong></h2>
<blockquote>
<p></p>
<p></p>
</blockquote> [Item] update_IF_CAS <p style="background-color: #efe3da;">🔴中科院分区升级版:
<!-- 获取extra数据并正则提取 -->
${(topItem.getField("extra").match(/中科院分区升级版: \s*(.*?)($|\n)/) ? topItem.getField("extra").match(/中科院分区升级版: \s*(.*?)($|\n)/)[0]:"").replace(/(\r\n)|(\n)/g,"").split(":").slice(1)}${(topItem.getField("extra").match(/中科院升级版Top分区: \s*(.*?)($|\n)/) ? topItem.getField("extra").match(/中科院升级版Top分区: \s*(.*?)($|\n)/)[0]:"").replace(/(\r\n)|(\n)/g,"").split(":").slice(1)}  🔴IF: ${(topItem.getField("extra").match(/影响因子: \s*(.*?)($|\n)/) ? topItem.getField("extra").match(/影响因子: \s*(.*?)($|\n)/)[0]:"").replace(/(\r\n)|(\n)/g,"").split(":").slice(1)}  🔴JCR分区: ${(topItem.getField("extra").match(/JCR分区: \s*(.*?)($|\n)/) ? topItem.getField("extra").match(/JCR分区: \s*(.*?)($|\n)/)[0]:"").replace(/(\r\n)|(\n)/g,"").split(":").slice(1)}</p> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
Screenshots
Test on Zotero version
7.0.0-beta.92+d5bb667fb (64-bit)
Test on Better Notes version
1.1.4-beta.91
Template Type
Item
Template Share Code
Anything else
[Item] update_IF_CAS
Beta Was this translation helpful? Give feedback.
All reactions