[Item/Text] 适合艺术文科类文献阅读笔记关联注释 #1165
Closed
swimpinkNo1
started this conversation in
Note Templates
Replies: 2 comments 4 replies
-
建议使用模板编辑器下方选项-复制模板分享码,方便其他用户直接复制导入 |
Beta Was this translation helpful? Give feedback.
3 replies
-
求各位大神能够在优化一下笔记模板,在再次阅读文献和编辑注释的时候,笔记可以同步自动更新和修改? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
适合苹果系统的,文科艺术类阅读或文献笔记,主打一个高效和高颜值。
我的 zotero 版本是 7.07 MacBook 的系统是14.6.1 (23G93)
用不同的颜色整理笔记自动归类 tag 标签,然后自动将标签内容整理成阅读笔记
在B 站 UP 主科研少女王同学和[Item/Text] 一个可以关联注释的模板
#1101 的这个版本上进行了一些修改。
Screenshots
Test on Zotero version
最新 7.07 版本
Test on Better Notes version
2.0.16
Template Type
QuickNote
Template Share Code
`${await new Promise(async (r) => {
const getAnnotationsByTag = async (tagName) => {
const pdfItem = await topItem.getBestAttachment();
let result = "";
for (let annoItem of pdfItem.getAnnotations()) {
if (annoItem.getTags().find(i => i.tag.includes(tagName))) {
}
}
return result;
};
// 辅助函数:检测字符串是否包含中文字符
const containsChinese = (text) => /[\u4e00-\u9fa5]/.test(text);
// 提取影响因子
let impactFactor = Zotero.ZoteroStyle.api.renderCell(topItem, "publicationTags").textContent.trim();
let impactFactorValues = impactFactor.match(/\d+(.\d+)?/g); // 提取数字部分
// 获取翻译标题,如果没有或者为空,则使用原始标题
let titleTranslationMatch = topItem.getField("extra").match(/titleTranslation:(.+)/);
let titleTranslation = (titleTranslationMatch && titleTranslationMatch[1].trim()) ? titleTranslationMatch[1].trim() : topItem.getField("title");
// 检查标题是否为中文
let isChineseTitle = containsChinese(topItem.getField("title"));
// 根据标题语言决定IFQ的显示方式
let impactFactorDisplay = isChineseTitle ? impactFactor : (impactFactorValues ? impactFactorValues.join(' / ') : '');
// 获取作者显示内容
let creators = topItem.getCreators();
let authorDisplay = "";
if (isChineseTitle) {
// 中文标题:显示第一作者全名,格式为“姓 前名”
if (creators.length > 0) {
let firstAuthor = creators[0];
let fullName =
${firstAuthor.lastName} ${firstAuthor.firstName}
;authorDisplay = fullName;
}
} else {
// 非中文标题:显示第一作者姓氏并附加“et al.”
if (creators.length > 0) {
let firstAuthorLastName = creators[0].lastName;
authorDisplay =
${firstAuthorLastName} et al.
;}
}
// 生成标题,处理中文和英文情况
let res = `
🔤${titleTranslation} (${topItem.getField("year")}, ${authorDisplay}) ${topItem.getField("journalAbbreviation")} (${impactFactorDisplay})
原名:${topItem.getField('title')}
译名:${titleTranslation}
作者:${authorDisplay}
期刊:${topItem.getField('publicationTitle')}
IFQ:${impactFactorDisplay}
${(() => {
const doi = topItem.getField("DOI");
if (doi) {
return
<b><span style="color: #283593">DOI:</span></strong> </b><a href="https://doi.org/${topItem.getField('DOI')}">${topItem.getField('DOI')}</a>
;} else {
return
<b><span style="color: #283593">URL:</span></strong> </b><a href="${topItem.getField('url')}">${topItem.getField('url')}</a>
;}
})()}
发表时间:${topItem.getField('date')}
${(() => { const attachments = Zotero.Items.get(topItem.getAttachments()); if (attachments && attachments.length > 0) { return `本地链接: ${attachments[0].getFilename()}`; } else { return `本地链接: `; } })()} ${(() => { const abstractTranslation = topItem.getField('abstractTranslation'); if (abstractTranslation) { return `摘要翻译: ${abstractTranslation}`; } else { return `摘要: ${topItem.getField('abstractNote')}`; } })()}💡Keynotes
${topItem.getField('journalAbbreviation')} (${impactFactorDisplay}): ${titleTranslation};${topItem.getField('date')}
${await getAnnotationsByTag('Keynotes')}
🗝️ background:
${await getAnnotationsByTag('background')}
🗝️ method:
${await getAnnotationsByTag('method')}
🥳 conclusion:
${await getAnnotationsByTag('conclusion')}
🔬innovation:
${await getAnnotationsByTag('innovation')}
📌 shortage:
${await getAnnotationsByTag('shortage')}
🧐 question:
${await getAnnotationsByTag('question')}
📝 somethingNew:
${await getAnnotationsByTag('somethingNew')}
🗂️ case study:
${await getAnnotationsByTag('case study')}
📊 evidence analyse:
${await getAnnotationsByTag('evidence analyse')}
`;
r(res);
})}
`
Anything else
No response
Beta Was this translation helpful? Give feedback.
All reactions